Show
Ignore:
Timestamp:
08/19/09 16:54:24 (15 years ago)
Author:
vbarta
Message:

using own error macros (basically copied from IT++, but never aborting)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/math/chmat.h

    r495 r565  
    1414#define CHMAT_H 
    1515 
    16  
     16#include "../bdmerror.h" 
    1717#include "square_mat.h" 
    1818 
     
    4444        //! add another chmat \c A2 with weight \c w. 
    4545        void add ( const chmat &A2, double w = 1.0 ) { 
    46                 it_assert_debug ( dim == A2.dim, "Matrices of unequal dimension" ); 
     46                bdm_assert_debug ( dim == A2.dim, "Matrices of unequal dimension" ); 
    4747                mat pre = concat_vertical ( Ch, sqrt ( w ) * A2.Ch ); 
    4848                mat post = zeros ( pre.rows(), pre.cols() ); 
    4949                if ( !qr ( pre, post ) ) { 
    50                         it_warning ( "Unstable QR in chmat add" ); 
     50                        bdm_warning ( "Unstable QR in chmat add" ); 
    5151                } 
    5252                Ch = post ( 0, dim - 1, 0, dim - 1 ); 
     
    7070        chmat ( const chmat &Ch0 ) : sqmat ( Ch0.dim ), Ch ( Ch0.dim, Ch0.dim ) { 
    7171                Ch = Ch0.Ch; 
    72         }; 
     72        } 
     73 
    7374        //! Default constructor (m3k:cholform) 
    7475        chmat ( const mat &M ) : sqmat ( M.rows() ), Ch ( M.rows(), M.cols() ) { 
    7576                mat Q; 
    76                 it_assert_debug ( M.rows() == M.cols(), "chmat:: input matrix must be square!" ); 
     77                bdm_assert_debug ( M.rows() == M.cols(), "chmat:: input matrix must be square!" ); 
    7778                Ch = chol ( M ); 
    78         }; 
    79         //! Constructor 
    80         chmat ( const chmat &M, const ivec &perm ) : sqmat ( M.rows() ) { 
    81                 it_error ( "not implemneted" ); 
    82         }; 
     79        } 
     80 
     81        /*! 
     82          Some templates require this constructor to compile, but 
     83          it shouldn't actually be called. 
     84        */ 
     85        chmat ( const chmat &M, const ivec &perm ) { 
     86                bdm_error ( "not implemented" ); 
     87        } 
     88 
    8389        //! Access function 
    8490        mat & _Ch() { 
     
    95101        //! Access functions 
    96102        void setCh ( const vec &chQ ) { 
    97                 it_assert_debug ( chQ.length() == dim*dim, "" ); 
     103                bdm_assert_debug ( chQ.length() == dim * dim, "wrong length" ); 
    98104                copy_vector ( dim*dim, chQ._data(), Ch._data() ); 
    99105        } 
     106 
    100107        //! Access functions 
    101108        void setD ( const vec &nD, int i ) {