⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 diagmatrix.3.man

📁 COOOL:CWP面向对象最优化库(CWP Object Oriented Optimization Library) COOOL是C++类的一个集合
💻 MAN
字号:
DIAGMATRIX(derived)C++ UITILITY CLASSES DIAGMATRIX(derived)                                                     Jun  1 15:17NAME    DiagMatrix class template, inherited from MatrixSYNOPSIS    #include <spamatrix.hh>    class DiagMatrix : public Matrix<Type>        \fIPublic members\fP            DiagMatrix();            DiagMatrix(int m);            DiagMatrix(const Vector<Type>&);            DiagMatrix(const DiagMatrix<Type>&);            ~DiagMatrix();            const char* matrixType() const;            Type max();            Type min();            int indexMax();            int indexMin();            const Vector<Type> diagVector();            const Vector<Type> rowVector(int) const;            const Vector<Type> colVector(int) const;            operator DiagMatrix<int>();            operator DiagMatrix<long>();            operator DiagMatrix<float>();            operator DiagMatrix<double>();            const int size() const;            const Type elem(int) const;            Type& operator[](int);            Type operator() (char*, int);            Type operator() (int, char*);            Type rowMax(int);            Type rowMin(int);            Type colMax(int);            Type colMin(int);            DiagMatrix<Type>& operator=(const DiagMatrix<Type>&);            DiagMatrix<Type>& operator=(const Vector<Type>&);            DiagMatrix<Type>& operator= (const Type);            DiagMatrix<Type>& operator= (const Type*);            DiagMatrix<Type>& operator+=(const DiagMatrix<Type>&);            DiagMatrix<Type>& operator-=(const DiagMatrix<Type>&);            DiagMatrix<Type>& operator+=(const Type);            DiagMatrix<Type>& operator-=(const Type);            DiagMatrix<Type>& operator*=(const Type);            DiagMatrix<Type>& operator/=(const Type);            Vector<Type> atdotx(const Vector<Type>&);            Vector<Type> adotx(const Vector<Type>&);        \fIFriends\fP            ostream& operator<<(ostream&, const DiagMatrix<Type>&);            Vector<Type> operator*(const DiagMatrix<Type>&, const Vector<Type>&            Vector<Type> operator*(const Vector<Type>&, const DiagMatrix<Type>&            DiagMatrix<Type> operator+(const DiagMatrix<Type>&, Type);            DiagMatrix<Type> operator+(Type, const DiagMatrix<Type>&);            DiagMatrix<Type> operator-(const DiagMatrix<Type>&, Type);            DiagMatrix<Type> operator-(Type, const DiagMatrix<Type>&);            DiagMatrix<Type> operator*(const DiagMatrix<Type>&, Type);            DiagMatrix<Type> operator*(Type, const DiagMatrix<Type>&);            DiagMatrix<Type> operator/(const DiagMatrix<Type>&, Type);        \fIPrivate members\fP            Vector<Type> *a;DESCRIPTION    DiagMatrix    is a siffffmple class for Diagonal matrices derived from     Matrix, it manages to do some simple operations of with     other matrices, vectors, and scalars.    DESCRIPTION    Constructors:      DiagMatrix(): construct a SpaMatrix of size 1x1;      DiagMatrix(m): construct a SpaMatrix of size mxm;      DiagMatrix(v): construct a SpaMatrix having the diagonal        elements of Vector v;      DiagMatrix(A): copy the DiagMatrix A to a new DiagMatrix;        Fetching information of the DiagMatrix:      char* matrixType(): returns the name of the matrix type;      Type max(): returns the maximum diagonal element;      Type min():  returns the minimum diagonal element;      int indexMax(): returns the row index of the maximum          element;      int indexMin(): returns the row index of the minimum          element;      Vector<Type> diagVector(): returns the diagonal as a          Vector;      Vector<Type> rowVector(i): returns the ith row;      Vector<Type> colVector(int): returns the ith column;       int size(): returns number of rows (column);      Type elem(i): returns the ith diagonal element;      Type operator()("", i): summation of the ith row;      Type operator()(i, ""):  summation of the ith column;      Type rowMax(i): Maximum element of the ith row;      Type rowMin(i): Minimum element of the ith row;      Type colMax(i): Maximum element of the ith column;      Type colMin(i): Minimum element of the ith column;        Modifying the DiagMatrix:      Type& operator[](i):  access the ith diagonal element;        Arithmatic:      Operators -, =, +=, -=, *= /=, +, -, *, /,         arithmatics with other Matrix, Vectors, a single number;      Vector<Type> adotx(x): dot product with Vector x;      Vector<Type> atdotx(x): transpose of the SpaMatrix dots with          Vector x;        I/O operators: <<, >>DEFINED MACROS    DIAGMATRIX_HHINCLUDED FILES    "Vector.hh"    "Matrix.hh"SOURCE FILES    diagmatrix.hh

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -