BaseMatrix.h
Go to the documentation of this file.
00001 #ifndef __NEW_MAT_BASE_MATRIX_H__
00002 #define __NEW_MAT_BASE_MATRIX_H__
00003 
00004 #define MatrixTypeUnSp 0
00005 //static MatrixType MatrixTypeUnSp(MatrixType::US);
00006 //                                              // AT&T needs this
00007 
00009 class BaseMatrix : public Janitor
00010 {
00011 protected:
00012    virtual int search(const BaseMatrix*) const = 0;
00013                                                 // count number of times matrix is referred to
00014 public:
00015    virtual GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp) = 0;
00016                                                 // evaluate temporary
00017    // for old version of G++
00018    //   virtual GeneralMatrix* Evaluate(MatrixType mt) = 0;
00019    //   GeneralMatrix* Evaluate() { return Evaluate(MatrixTypeUnSp); }
00020    AddedMatrix operator+(const BaseMatrix&) const;    // results of operations
00021    MultipliedMatrix operator*(const BaseMatrix&) const;
00022    SubtractedMatrix operator-(const BaseMatrix&) const;
00023    ConcatenatedMatrix operator|(const BaseMatrix&) const;
00024    StackedMatrix operator&(const BaseMatrix&) const;
00025    ShiftedMatrix operator+(Real) const;
00026    ScaledMatrix operator*(Real) const;
00027    ScaledMatrix operator/(Real) const;
00028    ShiftedMatrix operator-(Real) const;
00029    TransposedMatrix t() const;
00030 //   TransposedMatrix t;
00031    NegatedMatrix operator-() const;                   // change sign of elements
00032    ReversedMatrix reverse() const;
00033    ReversedMatrix Reverse() const;
00034    InvertedMatrix i() const;
00035 //   InvertedMatrix i;
00036    RowedMatrix as_row() const;
00037    RowedMatrix AsRow() const;
00038    ColedMatrix as_column() const;
00039    ColedMatrix AsColumn() const;
00040    DiagedMatrix as_diagonal() const;
00041    DiagedMatrix AsDiagonal() const;
00042    MatedMatrix as_matrix(int,int) const;
00043    MatedMatrix AsMatrix(int m, int n) const;
00044    GetSubMatrix submatrix(int,int,int,int) const;
00045    GetSubMatrix SubMatrix(int fr, int lr, int fc, int lc) const;
00046    GetSubMatrix sym_submatrix(int,int) const;
00047    GetSubMatrix SymSubMatrix(int f, int l) const;
00048    GetSubMatrix row(int) const;
00049    GetSubMatrix rows(int,int) const;
00050    GetSubMatrix column(int) const;
00051    GetSubMatrix columns(int,int) const;
00052    GetSubMatrix Row(int f) const;
00053    GetSubMatrix Rows(int f, int l) const;
00054    GetSubMatrix Column(int f) const;
00055    GetSubMatrix Columns(int f, int l) const;
00056    Real as_scalar() const;                      // conversion of 1 x 1 matrix
00057    Real AsScalar() const;
00058    virtual LogAndSign log_determinant() const;
00059    LogAndSign LogDeterminant() const { return log_determinant(); }
00060    Real determinant() const;
00061    Real Determinant() const { return determinant(); }
00062    virtual Real sum_square() const;
00063    Real SumSquare() const { return sum_square(); }
00064    Real norm_Frobenius() const;
00065    Real norm_frobenius() const { return norm_Frobenius(); }
00066    Real NormFrobenius() const { return norm_Frobenius(); }
00067    virtual Real sum_absolute_value() const;
00068    Real SumAbsoluteValue() const { return sum_absolute_value(); }
00069    virtual Real sum() const;
00070    virtual Real Sum() const { return sum(); }
00071    virtual Real maximum_absolute_value() const;
00072    Real MaximumAbsoluteValue() const { return maximum_absolute_value(); }
00073    virtual Real maximum_absolute_value1(int& i) const;
00074    Real MaximumAbsoluteValue1(int& i) const
00075       { return maximum_absolute_value1(i); }
00076    virtual Real maximum_absolute_value2(int& i, int& j) const;
00077    Real MaximumAbsoluteValue2(int& i, int& j) const
00078       { return maximum_absolute_value2(i,j); }
00079    virtual Real minimum_absolute_value() const;
00080    Real MinimumAbsoluteValue() const { return minimum_absolute_value(); }
00081    virtual Real minimum_absolute_value1(int& i) const;
00082    Real MinimumAbsoluteValue1(int& i) const
00083       { return minimum_absolute_value1(i); }
00084    virtual Real minimum_absolute_value2(int& i, int& j) const;
00085    Real MinimumAbsoluteValue2(int& i, int& j) const
00086       { return minimum_absolute_value2(i,j); }
00087    virtual Real maximum() const;
00088    Real Maximum() const { return maximum(); }
00089    virtual Real maximum1(int& i) const;
00090    Real Maximum1(int& i) const { return maximum1(i); }
00091    virtual Real maximum2(int& i, int& j) const;
00092    Real Maximum2(int& i, int& j) const { return maximum2(i,j); }
00093    virtual Real minimum() const;
00094    Real Minimum() const { return minimum(); }
00095    virtual Real minimum1(int& i) const;
00096    Real Minimum1(int& i) const { return minimum1(i); }
00097    virtual Real minimum2(int& i, int& j) const;
00098    Real Minimum2(int& i, int& j) const { return minimum2(i,j); }
00099    virtual Real trace() const;
00100    Real Trace() const { return trace(); }
00101    Real norm1() const;
00102    Real Norm1() const { return norm1(); }
00103    Real norm_infinity() const;
00104    Real NormInfinity() const { return norm_infinity(); }
00105    virtual MatrixBandWidth bandwidth() const;  // bandwidths of band matrix
00106    virtual MatrixBandWidth BandWidth() const { return bandwidth(); }
00107    void IEQND() const;                         // called by ineq. ops
00108    ReturnMatrix sum_square_columns() const;
00109    ReturnMatrix sum_square_rows() const;
00110    ReturnMatrix sum_columns() const;
00111    ReturnMatrix sum_rows() const;
00112    virtual void cleanup() {}
00113    void CleanUp() { cleanup(); }
00114 
00115 //   virtual ReturnMatrix Reverse() const;       // reverse order of elements
00116 //protected:
00117 //   BaseMatrix() : t(this), i(this) {}
00118 
00119    friend class GeneralMatrix;
00120    friend class Matrix;
00121    friend class SquareMatrix;
00122    friend class nricMatrix;
00123    friend class RowVector;
00124    friend class ColumnVector;
00125    friend class SymmetricMatrix;
00126    friend class UpperTriangularMatrix;
00127    friend class LowerTriangularMatrix;
00128    friend class DiagonalMatrix;
00129    friend class CroutMatrix;
00130    friend class BandMatrix;
00131    friend class LowerBandMatrix;
00132    friend class UpperBandMatrix;
00133    friend class SymmetricBandMatrix;
00134    friend class AddedMatrix;
00135    friend class MultipliedMatrix;
00136    friend class SubtractedMatrix;
00137    friend class SPMatrix;
00138    friend class KPMatrix;
00139    friend class ConcatenatedMatrix;
00140    friend class StackedMatrix;
00141    friend class SolvedMatrix;
00142    friend class ShiftedMatrix;
00143    friend class NegShiftedMatrix;
00144    friend class ScaledMatrix;
00145    friend class TransposedMatrix;
00146    friend class ReversedMatrix;
00147    friend class NegatedMatrix;
00148    friend class InvertedMatrix;
00149    friend class RowedMatrix;
00150    friend class ColedMatrix;
00151    friend class DiagedMatrix;
00152    friend class MatedMatrix;
00153    friend class GetSubMatrix;
00154    friend class ReturnMatrix;
00155    friend class LinearEquationSolver;
00156    friend class GenericMatrix;
00157    NEW_DELETE(BaseMatrix)
00158 };
00159 
00160 #endif
00161 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


lo
Author(s): U. Klank
autogenerated on Thu May 23 2013 07:34:44