Skip to content
  • Sébastien Villemot's avatar
    Dynare++ / sylvester equation solver: refactor Vector and ConstVector classes · c711d34d
    Sébastien Villemot authored
    - these classes now encapsulate a std::shared_ptr<{const, }double>, so that
      they do not perform memory management, and several {Const,}Vector instances
      can transparently share the same underlying data
    
    - make converting constructor from ConstVector to Vector explicit, since that
      entails memory allocation (but the reverse conversion is almost costless, so
      keep it implicit); do the same for GeneralMatrix/ConstGeneralMatrix,
      TwoDMatrix/ConstTwoDMatrix
    
    - remove the constructors that were extracting a row/column from a matrix, and
      replace them by getRow() and getCol() methods on {Const,}GeneralMatrix
    
    - rename and change the API of the complex version Vector::add(), so that it is
      explicit that it deals with complex numbers
    
    - add constructors that take a MATLAB mxArray
    c711d34d