Changeset 766 for library/bdm/math

Show
Ignore:
Timestamp:
01/11/10 22:55:57 (14 years ago)
Author:
mido
Message:

abstract methods restored wherever they are meaningful
macros NOT_IMPLEMENTED and NOT_IMPLEMENTED_VOID defined to make sources shorter
emix::set_parameters and mmix::set_parameters removed, corresponding acces methods created and the corresponding validate methods improved appropriately
some compilator warnings were avoided
and also a few other things cleaned up

Location:
library/bdm/math
Files:
2 modified

Legend:

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

    r738 r766  
    7777          it shouldn't actually be called. 
    7878        */ 
    79         chmat ( const chmat &M, const ivec &perm ) { 
    80                 bdm_error ( "not implemented" ); 
    81         } 
     79        chmat ( const chmat &M, const ivec &perm ) NOT_IMPLEMENTED_VOID; 
    8280 
    8381        //! Access function 
  • library/bdm/math/square_mat.h

    r737 r766  
    4242         BLAS-2b operation. 
    4343         */ 
    44         virtual void opupdt ( const vec &v, double w ) { 
    45                 bdm_error ( "not implemented" ); 
    46         }; 
     44        virtual void opupdt ( const vec &v, double w ) = 0; 
    4745 
    4846        /*! \brief Conversion to full matrix. 
    4947        */ 
    50  
    51         virtual mat to_mat() const { 
    52                 bdm_error ( "not implemented" ); 
    53                 return mat ( 0, 0 ); 
    54         } 
     48        virtual mat to_mat() const = 0; 
    5549 
    5650        /*! \brief Inplace symmetric multiplication by a SQUARE matrix \f$C\f$, i.e. \f$V = C*V*C'\f$ 
    5751        @param C multiplying matrix, 
    5852        */ 
    59         virtual void mult_sym ( const mat &C ) { 
    60                 bdm_error ( "not implemented" ); 
    61         }; 
     53        virtual void mult_sym ( const mat &C ) = 0; 
    6254 
    6355        /*! \brief Inplace symmetric multiplication by a SQUARE transpose of matrix \f$C\f$, i.e. \f$V = C'*V*C\f$ 
    6456        @param C multiplying matrix, 
    6557        */ 
    66         virtual void mult_sym_t ( const mat &C ) { 
    67                 bdm_error ( "not implemented" ); 
    68         } 
    69  
     58        virtual void mult_sym_t ( const mat &C ) = 0; 
    7059 
    7160        /*! 
     
    7362 
    7463        */ 
    75         virtual double logdet() const { 
    76                 bdm_error ( "not implemented" ); 
    77                 return 0; 
    78         }; 
     64        virtual double logdet() const = 0; 
    7965 
    8066        /*! 
     
    8369        Used e.g. in generating normal samples. 
    8470        */ 
    85         virtual vec sqrt_mult ( const vec &v )  const { 
    86                 bdm_error ( "not implemented" ); 
    87                 return vec ( 0 ); 
    88         }; 
     71        virtual vec sqrt_mult ( const vec &v )  const = 0; 
    8972 
    9073        /*! 
     
    9275 
    9376        */ 
    94         virtual double qform ( const vec &v ) const { 
    95                 bdm_error ( "not implemented" ); 
    96                 return 0; 
    97         }; 
     77        virtual double qform ( const vec &v ) const = 0; 
    9878 
    9979        /*! 
     
    10181 
    10282        */ 
    103         virtual double invqform ( const vec &v ) const { 
    104                 bdm_error ( "not implemented" ); 
    105                 return 0; 
    106         }; 
     83        virtual double invqform ( const vec &v ) const = 0; 
    10784 
    10885//      //! easy version of the 
     
    11087 
    11188        //! Clearing matrix so that it corresponds to zeros. 
    112         virtual void clear() { 
    113                 bdm_error ( "not implemented" ); 
    114         }; 
     89        virtual void clear() = 0; 
    11590 
    11691        //! Reimplementing common functions of mat: cols().