18 namespace NEWMAT {
using namespace RBD_COMMON; }
19 namespace RBD_LIBRARIES {
using namespace NEWMAT; }
26 #define UpperTriangularMatrix UTMatrix 27 #define LowerTriangularMatrix LTMatrix 28 #define SymmetricMatrix SMatrix 29 #define DiagonalMatrix DMatrix 30 #define BandMatrix BMatrix 31 #define UpperBandMatrix UBMatrix 32 #define LowerBandMatrix LBMatrix 33 #define SymmetricBandMatrix SBMatrix 34 #define BandLUMatrix BLUMatrix 54 void operator*=(
Real);
56 void PowEq(
int k) { pow_eq(k); }
61 int Sign()
const {
return sign_val; }
62 int sign()
const {
return sign_val; }
85 void operator++() { nexe++; }
113 UT = Valid + Upper + Square,
114 LT = Valid + Lower + Square,
117 Sm = Valid + Symmetric + Square,
118 Sk = Valid + Skew + Square,
119 Dg = Valid + Diagonal + Band + Lower + Upper + Symmetric
121 Id = Valid + Diagonal + Band + Lower + Upper + Symmetric
125 BM = Valid + Band + Square,
126 UB = Valid + Band + Upper + Square,
127 LB = Valid + Band + Lower + Square,
128 SB = Valid + Band + Symmetric + Square,
129 KB = Valid + Band + Skew + Square,
130 Ct = Valid + LUDeco + Square,
131 BC = Valid + Band + LUDeco + Square,
145 MatrixType (
int i,
bool dlok) : attribute(i), DataLossOK(dlok) {}
147 : attribute(mt.attribute), DataLossOK(mt.DataLossOK) {}
162 {
return ( attribute & ~mt.
attribute & Mask ) == 0; }
164 {
return ( attribute & ~mt.attribute & Mask ) != 0; }
169 bool operator!()
const {
return (attribute & Valid) == 0; }
173 {
return MatrixType(attribute & (Valid + Symmetric + Square)); }
182 const char* value()
const;
183 const char*
Value()
const {
return value(); }
187 bool is_band()
const {
return (attribute & Band) != 0; }
216 int Upper()
const {
return upper_val; }
217 int upper()
const {
return upper_val; }
218 int Lower()
const {
return lower_val; }
219 int lower()
const {
return lower_val; }
287 #define MatrixTypeUnSp 0 295 virtual int search(
const BaseMatrix*)
const = 0;
328 GetSubMatrix SubMatrix(
int fr,
int lr,
int fc,
int lc)
const;
339 Real as_scalar()
const;
340 Real AsScalar()
const;
356 virtual Real maximum_absolute_value1(
int& i)
const;
358 {
return maximum_absolute_value1(i); }
359 virtual Real maximum_absolute_value2(
int& i,
int& j)
const;
361 {
return maximum_absolute_value2(i,j); }
364 virtual Real minimum_absolute_value1(
int& i)
const;
366 {
return minimum_absolute_value1(i); }
367 virtual Real minimum_absolute_value2(
int& i,
int& j)
const;
369 {
return minimum_absolute_value2(i,j); }
372 virtual Real maximum1(
int& i)
const;
374 virtual Real maximum2(
int& i,
int& j)
const;
378 virtual Real minimum1(
int& i)
const;
380 virtual Real minimum2(
int& i,
int& j)
const;
465 void ReverseElements();
467 void operator=(
Real);
479 void resize(
int,
int,
int);
483 { store = 0; storage = 0; nrows_val = 0; ncols_val = 0; tag_val = -1;}
487 void PlusEqual(
Real f);
488 void MinusEqual(
Real f);
494 int Nrows()
const {
return nrows_val; }
495 int Ncols()
const {
return ncols_val; }
499 int nrows()
const {
return nrows_val; }
500 int ncols()
const {
return ncols_val; }
501 int size()
const {
return storage; }
510 int tag()
const {
return tag_val; }
511 int Tag()
const {
return tag_val; }
524 { Eq(X,this->type(),
true); }
532 void operator+=(
Real);
534 void operator*=(
Real);
550 Real maximum_absolute_value1(
int& i)
const;
551 Real minimum_absolute_value1(
int& i)
const;
552 Real maximum1(
int& i)
const;
553 Real minimum1(
int& i)
const;
555 Real maximum_absolute_value2(
int& i,
int& j)
const;
557 Real minimum_absolute_value2(
int& i,
int& j)
const;
559 Real maximum2(
int& i,
int& j)
const;
561 Real minimum2(
int& i,
int& j)
const;
565 void CheckStore()
const;
637 Real& operator()(
int,
int);
638 Real& element(
int,
int);
639 Real operator()(
int,
int)
const;
640 Real element(
int,
int)
const;
641 #ifdef SETUP_C_SUBSCRIPTS 642 Real* operator[](
int m) {
return store+m*ncols_val; }
643 const Real* operator[](
int m)
const {
return store+m*ncols_val; }
659 virtual void resize(
int,
int);
661 virtual void resize_keep(
int,
int);
662 virtual void ReSize(
int m,
int n) { resize(m, n); }
665 Real maximum_absolute_value2(
int& i,
int& j)
const;
666 Real minimum_absolute_value2(
int& i,
int& j)
const;
667 Real maximum2(
int& i,
int& j)
const;
668 Real minimum2(
int& i,
int& j)
const;
690 void operator=(
const Matrix&
m);
696 void resize_keep(
int);
697 void resize_keep(
int,
int);
698 void resize(
int,
int);
699 void ReSize(
int m,
int n) { resize(m, n); }
715 void MakeRowPointer();
716 void DeleteRowPointer();
720 :
Matrix(m,n) { MakeRowPointer(); }
722 :
Matrix(bm) { MakeRowPointer(); }
727 { DeleteRowPointer(); Eq(m); MakeRowPointer(); }
729 { DeleteRowPointer(); Eq(X,this->type(),
true); MakeRowPointer(); }
731 { GetMatrix(&gm); MakeRowPointer(); }
741 Real**
nric()
const { CheckStore();
return row_pointer-1; }
764 Real& operator()(
int,
int);
765 Real& element(
int,
int);
766 Real operator()(
int,
int)
const;
767 Real element(
int,
int)
const;
768 #ifdef SETUP_C_SUBSCRIPTS 769 Real* operator[](
int m) {
return store+(m*(m+1))/2; }
770 const Real* operator[](
int m)
const {
return store+(m*(m+1))/2; }
787 void resize_keep(
int);
812 Real& operator()(
int,
int);
813 Real& element(
int,
int);
814 Real operator()(
int,
int)
const;
815 Real element(
int,
int)
const;
816 #ifdef SETUP_C_SUBSCRIPTS 817 Real* operator[](
int m) {
return store+m*ncols_val-(m*(m+1))/2; }
818 const Real* operator[](
int m)
const 819 {
return store+m*ncols_val-(m*(m+1))/2; }
836 void resize_keep(
int);
861 Real& operator()(
int,
int);
862 Real& element(
int,
int);
863 Real operator()(
int,
int)
const;
864 Real element(
int,
int)
const;
865 #ifdef SETUP_C_SUBSCRIPTS 866 Real* operator[](
int m) {
return store+(m*(m+1))/2; }
867 const Real* operator[](
int m)
const {
return store+(m*(m+1))/2; }
882 void resize_keep(
int);
909 Real& operator()(
int,
int);
910 Real& operator()(
int);
911 Real operator()(
int,
int)
const;
912 Real operator()(
int)
const;
913 Real& element(
int,
int);
915 Real element(
int,
int)
const;
916 Real element(
int)
const;
917 #ifdef SETUP_C_SUBSCRIPTS 918 Real& operator[](
int m) {
return store[
m]; }
919 const Real& operator[](
int m)
const {
return store[
m]; }
936 void resize_keep(
int);
940 { CheckStore();
return store-1; }
965 Real& operator()(
int);
967 Real operator()(
int)
const;
968 Real element(
int)
const;
969 #ifdef SETUP_C_SUBSCRIPTS 970 Real& operator[](
int m) {
return store[
m]; }
971 const Real& operator[](
int m)
const {
return store[
m]; }
986 void resize_keep(
int);
987 void resize_keep(
int,
int);
988 void resize(
int,
int);
989 void ReSize(
int m,
int n) { resize(m, n); }
993 { CheckStore();
return store-1; }
996 { store = 0; storage = 0; nrows_val = 1; ncols_val = 0; tag_val = -1; }
1020 Real& operator()(
int);
1022 Real operator()(
int)
const;
1023 Real element(
int)
const;
1024 #ifdef SETUP_C_SUBSCRIPTS 1025 Real& operator[](
int m) {
return store[
m]; }
1026 const Real& operator[](
int m)
const {
return store[
m]; }
1035 void resize_keep(
int);
1036 void resize_keep(
int,
int);
1037 void resize(
int,
int);
1042 { CheckStore();
return store-1; }
1045 { store = 0; storage = 0; nrows_val = 0; ncols_val = 1; tag_val = -1; }
1074 void lubksb(
Real*,
int=0);
1100 void CornerClear()
const;
1106 BandMatrix(
int n,
int lb,
int ub) { resize(n,lb,ub); CornerClear(); }
1113 Real& operator()(
int,
int);
1114 Real& element(
int,
int);
1115 Real operator()(
int,
int)
const;
1116 Real element(
int,
int)
const;
1117 #ifdef SETUP_C_SUBSCRIPTS 1118 Real* operator[](
int m) {
return store+(upper_val+lower_val)*m+lower_val; }
1119 const Real* operator[](
int m)
const 1120 {
return store+(upper_val+lower_val)*m+lower_val; }
1144 virtual void resize(
int,
int,
int);
1145 virtual void ReSize(
int m,
int n,
int b) { resize(m, n, b); }
1184 void resize(
int,
int,
int);
1185 void ReSize(
int m,
int n,
int b) { resize(m, n, b); }
1192 Real& operator()(
int,
int);
1193 Real operator()(
int,
int)
const;
1194 Real& element(
int,
int);
1195 Real element(
int,
int)
const;
1196 #ifdef SETUP_C_SUBSCRIPTS 1197 Real* operator[](
int m) {
return store+upper_val*
m; }
1198 const Real* operator[](
int m)
const {
return store+upper_val*
m; }
1223 void resize(
int,
int,
int);
1224 void ReSize(
int m,
int n,
int b) { resize(m, n, b); }
1231 Real& operator()(
int,
int);
1232 Real operator()(
int,
int)
const;
1233 Real& element(
int,
int);
1234 Real element(
int,
int)
const;
1235 #ifdef SETUP_C_SUBSCRIPTS 1236 Real* operator[](
int m) {
return store+lower_val*(m+1); }
1237 const Real* operator[](
int m)
const {
return store+lower_val*(m+1); }
1248 void CornerClear()
const;
1259 Real& operator()(
int,
int);
1260 Real& element(
int,
int);
1261 Real operator()(
int,
int)
const;
1262 Real element(
int,
int)
const;
1263 #ifdef SETUP_C_SUBSCRIPTS 1264 Real* operator[](
int m) {
return store+lower_val*(m+1); }
1265 const Real* operator[](
int m)
const {
return store+lower_val*(m+1); }
1288 void resize(
int,
int);
1320 : indx(0), d(true), sing(true), store2(0), storage2(0), m1(0), m2(0) {}
1325 void lubksb(
Real*,
int=0);
1357 { nrows_val = ncols_val = n.
Value(); *store = 1; }
1415 void operator+=(
Real);
1417 void operator*=(
Real);
1442 : bm1(bm1x),bm2(bm2x) {}
1772 row_skip(rs), row_number(rn), col_skip(cs), col_number(cn), IsSym(is) {}
1777 :
NegatedMatrix(g.bm), row_skip(g.row_skip), row_number(g.row_number),
1778 col_skip(g.col_skip), col_number(g.col_number), IsSym(g.IsSym) {}
1792 void operator=(
Real);
1793 void operator+=(
Real);
1795 void operator*=(
Real);
1861 int& operator[](
int i);
1862 int operator[](
int i)
const;
1864 void operator=(
int ai);
1878 void resize(
int i,
bool keep =
false);
1880 void ReSize(
int i,
bool keep =
false) { resize(i, keep); }
2037 {
return ! (A==B); }
2039 {
return ! (A==B); }
2044 { A.
IEQND();
return true; }
2046 { A.
IEQND();
return true; }
2048 { A.
IEQND();
return true; }
2050 { A.
IEQND();
return true; }
2145 {
return as_matrix(m, n); }
2147 {
return submatrix(fr, lr, fc, lc); }
2149 {
return sym_submatrix(f, l); }
2154 {
return columns(f, l); }
2179 #ifdef OPT_COMPATIBLE // for compatibility with opt++ 2188 #ifdef use_namespace static unsigned long Select
void Add(GeneralMatrix *, Real)
void operator<<(const BaseMatrix &)
bool is_symmetric() const
StackedMatrix(const BaseMatrix *bm1x, const BaseMatrix *bm2x)
virtual Real minimum_absolute_value() const
void RestoreCol(MatrixRowCol &)
void swap(UpperBandMatrix &gm)
virtual short SimpleAddOK(const GeneralMatrix *)
LogAndSign LogDeterminant(const BaseMatrix &B)
Real minimum2(int &i, int &j) const
void operator-=(const Matrix &M)
Real maximum_absolute_value() const
void ReSize(int m, int n, int b)
void operator=(const BaseMatrix &bm)
RowVector(const RowVector &gm)
void operator-=(const Matrix &M)
void operator=(const SymmetricMatrix &m)
bool operator!=(const MatrixBandWidth &bw) const
void swap(SymmetricBandMatrix &gm)
MatrixBandWidth bandwidth() const
LogAndSign log_determinant(const BaseMatrix &B)
Real norm_Frobenius() const
bool even_exchanges() const
void swap(DiagonalMatrix &gm)
Real Sum(const BaseMatrix &B)
void operator+=(const BaseMatrix &)
void operator+=(const Matrix &M)
bool operator<(MatrixType mt) const
void operator=(const RowVector &m)
MatrixType sub() const
< type of submatrix
GeneralMatrix * MakeSolver()
void ReSize(int m, int n, int b)
ostream & operator<<(ostream &s, const BaseMatrix &X)
ReturnMatrix crossproduct_rows(const Matrix &A, const Matrix &B)
MatrixBandWidth(const int i)
Miscellaneous exception (details in character string).
LogAndSign LogDeterminant() const
void resize_keep(int i)
change length, keep data
virtual void RestoreRow(MatrixRowCol &)
void operator=(const MatrixType &mt)
void operator<<(const BaseMatrix &X)
ScaledMatrix(const BaseMatrix *bmx, Real fx)
int * data()
pointer to the data
void ReSize(int m, int n)
bool operator!=(MatrixType t) const
void ReSize(const GeneralMatrix &A)
Real maximum(const BaseMatrix &B)
bool operator==(const MatrixBandWidth &bw) const
void change_sign()
change sign
SolvedMatrix(const BaseMatrix *bm1x, const BaseMatrix *bm2x)
virtual Real sum_square() const
virtual Real maximum() const
ShiftedMatrix(const BaseMatrix *bmx, Real fx)
virtual void resize(int, int, int)
Matrix crossproduct(const Matrix &A, const Matrix &B)
GetSubMatrix Columns(int f, int l) const
Real Maximum1(int &i) const
Real Minimum(const BaseMatrix &B)
static unsigned long Select
ReturnMatrix CrossProductColumns(const Matrix &A, const Matrix &B)
IdentityMatrix(ArrayLengthSpecifier n)
Real norm1(const BaseMatrix &B)
NegShiftedMatrix operator-(Real, const BaseMatrix &)
MatrixBandWidth(const int l, const int u)
MatrixType ssub() const
< type of sym submatrix
void swap(SquareMatrix &gm)
LowerBandMatrix(const LowerBandMatrix &gm)
void operator-=(const Matrix &M)
int * Data()
pointer to the data
void release_and_delete()
int * a
pointer to the array
Internal newmat exception - shouldn't happen.
Real norm_frobenius(const BaseMatrix &B)
void ReSize(const GeneralMatrix &A)
Real SumAbsoluteValue() const
SPMatrix SP(const BaseMatrix &, const BaseMatrix &)
void swap(Matrix &A, Matrix &B)
Real Maximum(const BaseMatrix &B)
void operator+=(const Matrix &M)
const int * const_data_indx() const
void operator=(const nricMatrix &m)
Real DotProduct(const Matrix &A, const Matrix &B)
Cannot build matrix with these properties exception.
Real Minimum2(int &i, int &j) const
virtual void ReSize(int m, int n)
void GetCol(MatrixColX &c)
virtual void MiniCleanUp()
void operator=(const DiagonalMatrix &m)
const int * Data() const
pointer to the data
virtual Real trace() const
ShiftedMatrix operator+(Real f, const BaseMatrix &BM)
void swap(GenericMatrix &x)
void ReSize(const GeneralMatrix &A)
const int * const_data_indx() const
void Inject(const GeneralMatrix &GM)
Real Maximum2(int &i, int &j) const
Real minimum(const BaseMatrix &B)
ReversedMatrix(const BaseMatrix *bmx)
ColumnVector(const ColumnVector &gm)
virtual void ReSize(const GeneralMatrix &A)
bool operator>=(MatrixType mt) const
static unsigned long Select
AddedMatrix(const BaseMatrix *bm1x, const BaseMatrix *bm2x)
void ReSize(const GeneralMatrix &A)
NegShiftedMatrix(Real fx, const BaseMatrix *bmx)
LowerTriangularMatrix(const LowerTriangularMatrix &gm)
friend class LinearEquationSolver
void ReSize(const GeneralMatrix &A)
void operator-=(const SymmetricMatrix &M)
void swap(IdentityMatrix &gm)
virtual MatrixBandWidth bandwidth() const
#define FREE_CHECK(Class)
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
void operator=(const ColumnVector &m)
Quaternion operator/(const Real c, const Quaternion &q)
Overload / operator, division by a scalar.
static void Add(GeneralMatrix *gm, GeneralMatrix *gm1, GeneralMatrix *gm2)
void operator=(const UpperTriangularMatrix &m)
DiagonalMatrix(const DiagonalMatrix &gm)
virtual void ReSize(int m, int n, int b)
MatrixType operator|(const MatrixType &mt) const
MultipliedMatrix operator*(const BaseMatrix &) const
UpperBandMatrix(const UpperBandMatrix &gm)
void swap(nricMatrix &gm)
GenericMatrix(const BaseMatrix &bm)
const int * data() const
pointer to the data
Real SumSquare(const BaseMatrix &B)
void CleanUp()
set length to zero
nricMatrix(const BaseMatrix &bm)
KPMatrix KP(const BaseMatrix &, const BaseMatrix &)
Real MinimumAbsoluteValue1(int &i) const
int search(const BaseMatrix *) const
ReversedMatrix Reverse() const
bool CannotConvert() const
Real minimum_absolute_value() const
virtual MatrixBandWidth BandWidth() const
void Inject(const GeneralMatrix &GM)
Upper triangular band matrix.
void operator+=(const Matrix &M)
GeneralMatrix * MakeSolver()
void ReSize(int m, int n)
void RestoreCol(MatrixColX &c)
void operator<<(const BaseMatrix &X)
SPMatrix(const BaseMatrix *bm1x, const BaseMatrix *bm2x)
Real maximum_absolute_value() const
GenericMatrix(const GenericMatrix &bm)
void operator=(const UpperBandMatrix &m)
void operator=(const LowerBandMatrix &m)
GeneralMatrix * MakeSolver()
A matrix is not square exception.
Real MaximumAbsoluteValue() const
IdentityMatrix(const IdentityMatrix &gm)
bool is_zero(const BaseMatrix &A)
ReturnMatrix(const GeneralMatrix *gmx)
virtual Real minimum() const
void ReSize(const GeneralMatrix &A)
MatedMatrix(const BaseMatrix *bmx, int nrx, int ncx)
ColedMatrix(const BaseMatrix *bmx)
UpperBandMatrix(int n, int ubw)
KPMatrix(const BaseMatrix *bm1x, const BaseMatrix *bm2x)
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
void ReSize(int m, int n)
void operator-=(const Matrix &M)
void resize(int n, int lbw)
bool even_exchanges() const
GetSubMatrix Column(int f) const
void operator-=(const BaseMatrix &)
void resize(int n, int ubw)
Real MinimumAbsoluteValue2(int &i, int &j) const
bool operator<=(const BaseMatrix &A, const BaseMatrix &)
Real sum_absolute_value() const
ScaledMatrix operator*(Real t) const
Real Minimum1(int &i) const
Real maximum2(int &i, int &j) const
RowedMatrix AsRow() const
Real NormInfinity(const BaseMatrix &B)
ArrayLengthSpecifier(int l)
void swap(GeneralMatrix &gm)
Real Norm1(const BaseMatrix &B)
void swap(SymmetricMatrix &gm)
MatrixInput operator<<(double)
MatrixBandWidth t() const
void operator+=(const Matrix &M)
GeneralMatrix * MakeSolver()
void operator=(const SymmetricBandMatrix &m)
virtual Real sum_absolute_value() const
void ReSize(const GeneralMatrix &A)
bool Compare(const MatrixType &, MatrixType &)
NegatedMatrix(const BaseMatrix *bmx)
void operator+=(const SymmetricMatrix &M)
void ReSize(const GeneralMatrix &A)
void ReSize(int n, int lbw)
void resize(const GeneralMatrix &A)
resize BandMatrix
Real Trace(const BaseMatrix &B)
Real norm_frobenius() const
virtual Real maximum_absolute_value() const
void swap(LowerTriangularMatrix &gm)
ReturnMatrix(const ReturnMatrix &tm)
Real MaximumAbsoluteValue2(int &i, int &j) const
Real MaximumAbsoluteValue(const BaseMatrix &B)
ColumnVector(ArrayLengthSpecifier n)
Real NormFrobenius() const
SquareMatrix(const SquareMatrix &gm)
Singular matrix exception.
ReturnMatrix crossproduct_columns(const Matrix &A, const Matrix &B)
void RestoreCol(MatrixColX &c)
MatrixBandWidth bandwidth() const
bool operator==(const GeneralMatrix &A, const GeneralMatrix &B)
void operator+=(const Matrix &M)
Matrix CrossProduct(const Matrix &A, const Matrix &B)
Real minimum_absolute_value() const
Real dotproduct(const Matrix &A, const Matrix &B)
Real norm_infinity(const BaseMatrix &B)
int Size() const
return the size of the array
virtual void RestoreCol(MatrixColX &)
Real NormFrobenius(const BaseMatrix &B)
void RestoreCol(MatrixRowCol &)
Real maximum_absolute_value() const
ScaledMatrix operator*(Real f, const BaseMatrix &BM)
Real minimum_absolute_value(const BaseMatrix &B)
SymmetricMatrix(const SymmetricMatrix &gm)
void resize(const GeneralMatrix &A)
resize BandMatrix
Base of the matrix classes.
Real sum_square(const BaseMatrix &B)
const Real * const_data2() const
void ReSize(int m, int b)
GeneralMatrix * MakeSolver()
void operator=(const IdentityMatrix &m)
void ReSize(const GeneralMatrix &A)
Let matrix simulate a C type two dimensional array.
const Real * const_data() const
void GetCol(MatrixColX &c)
void operator+=(const LowerTriangularMatrix &M)
Real norm_infinity() const
void ReSize(const GeneralMatrix &A)
The usual rectangular matrix.
GeneralMatrix * MakeSolver()
MatrixType operator&(const MatrixType &mt) const
SymmetricBandMatrix(int n, int lb)
LowerBandMatrix(int n, int lbw)
void swap(LowerBandMatrix &gm)
GetSubMatrix SymSubMatrix(int f, int l) const
const int * const_data() const
pointer to the data
static unsigned long Select
Real SumAbsoluteValue(const BaseMatrix &B)
static unsigned long Select
Incompatible dimensions exception.
Rectangular matrix for use with Numerical Recipes in C.
void operator=(const SquareMatrix &m)
Submatrix dimension exception.
Real norm_Frobenius(const BaseMatrix &B)
void resize(int m, int n)
FloatVector FloatVector * a
bool Rectangular(MatrixType a, MatrixType b, MatrixType c)
bool operator>(const BaseMatrix &A, const BaseMatrix &)
Real minimum_absolute_value2(int &i, int &j) const
LU decomposition of a band matrix.
BandMatrix(const BandMatrix &gm)
static unsigned long Select
bool operator<(const BaseMatrix &A, const BaseMatrix &)
void operator<<(const BaseMatrix &X)
Real trace(const BaseMatrix &B)
MatedMatrix AsMatrix(int m, int n) const
BandMatrix(int n, int lb, int ub)
virtual GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)=0
void MatrixErrorNoSpace(const void *)
test for allocation fails
void swap(CroutMatrix &gm)
bool operator>=(const BaseMatrix &A, const BaseMatrix &)
SymmetricBandMatrix(const SymmetricBandMatrix &gm)
int sign() const
sign of the value
void operator=(const BandMatrix &m)
void RestoreCol(MatrixColX &c)
GeneralMatrix * Evaluate(MatrixType)
void ReSize(const GeneralMatrix &A)
nricMatrix(const nricMatrix &gm)
Real NormInfinity() const
void RestoreCol(MatrixRowCol &)
const char * Value() const
static unsigned long Select
bool operator!=(const GeneralMatrix &A, const GeneralMatrix &B)
void operator+=(const UpperTriangularMatrix &M)
void ReSize(const GeneralMatrix &A)
UpperTriangularMatrix(const UpperTriangularMatrix &gm)
void operator=(const BaseMatrix &)
virtual void RestoreCol(MatrixRowCol &)
GetSubMatrix Row(int f) const
GetSubMatrix(const GetSubMatrix &g)
int size() const
return the size of the array
void swap(BandLUMatrix &gm)
void swap(ColumnVector &gm)
static unsigned long Select
GetSubMatrix SubMatrix(int fr, int lr, int fc, int lc) const
void operator-=(const UpperTriangularMatrix &M)
Lower triangular band matrix.
void operator=(const Matrix &m)
void operator-=(const Matrix &M)
virtual void resize(int, int)
MatrixType(const MatrixType &mt)
DiagedMatrix(const BaseMatrix *bmx)
void operator-=(const LowerTriangularMatrix &M)
ReturnMatrix ForReturn() const
RowedMatrix(const BaseMatrix *bmx)
void ReSize(const GeneralMatrix &A)
void ReSize(int m, int n)
SimpleIntArray()
build an array length 0
Real sum_absolute_value(const BaseMatrix &B)
void newmat_block_copy(int n, Real *from, Real *to)
ConcatenatedMatrix(const BaseMatrix *bm1x, const BaseMatrix *bm2x)
Real sum(const BaseMatrix &B)
MatrixType(int i, bool dlok)
DiagedMatrix AsDiagonal() const
Not positive definite exception.
void operator<<(const double *)
Real Determinant(const BaseMatrix &B)
static unsigned long Select
static unsigned long Select
Real determinant(const BaseMatrix &B)
void cleanup()
set length to zero
void operator=(const GetSubMatrix &m)
Covergence failure exception.
ColedMatrix AsColumn() const
static unsigned long Select
virtual void Solver(MatrixColX &, const MatrixColX &)
Real MinimumAbsoluteValue(const BaseMatrix &B)
Real MaximumAbsoluteValue1(int &i) const
static unsigned long Select
void swap(BandMatrix &gm)
MatrixType operator+(MatrixType mt) const
void operator-=(const DiagonalMatrix &M)
virtual void resize_keep(int, int)
Real MinimumAbsoluteValue() const
The classes for matrices that can contain data are derived from this.
MultipliedMatrix(const BaseMatrix *bm1x, const BaseMatrix *bm2x)
void operator+=(const DiagonalMatrix &M)
bool IsZero(const BaseMatrix &A)
GeneralMatrix * MakeSolver()
virtual GeneralMatrix * Image() const
void swap(UpperTriangularMatrix &gm)
Cannot convert to vector exception.
static unsigned long Select
void operator=(const LowerTriangularMatrix &m)
#define NEW_DELETE(Class)
void ReSize(int n, int ubw)
void ReSize(const GeneralMatrix &A)
Real sum_absolute_value() const
SubtractedMatrix(const BaseMatrix *bm1x, const BaseMatrix *bm2x)
MatrixType AddEqualEl() const
< add constant to matrix
A matrix which can be of any GeneralMatrix type.
void resize_keep(int m, int n)
TransposedMatrix(const BaseMatrix *bmx)
GeneralMatrix * Evaluate(MatrixType=MatrixTypeUnSp)
virtual void SetParameters(const GeneralMatrix *)
GeneralMatrix * MakeSolver()
RowVector(ArrayLengthSpecifier n)
GetSubMatrix Rows(int f, int l) const
Real maximum_absolute_value(const BaseMatrix &B)
Let matrix simulate a C type const two dimensional array.
bool operator==(MatrixType t) const
ReturnMatrix CrossProductRows(const Matrix &A, const Matrix &B)
void ReSize(int i, bool keep=false)
change length, keep data if keep = true
Real log_value() const
log of the absolute value
InvertedMatrix(const BaseMatrix *bmx)
const Real * data() const
void operator<<(const BaseMatrix &X)
virtual LogAndSign log_determinant() const