17 #define REPORT { static ExeCounter ExeCount(__LINE__,4); ++ExeCount; } 23 #define DO_SEARCH // search for LHS of = in RHS 27 static int tristore(
int n)
28 {
return (
n*(
n+1))/2; }
34 { store=0; storage=0; nrows=0; ncols=0; tag=-1; }
39 storage=s.
Value(); tag=-1;
94 Tracer tr(
"SquareMatrix(Matrix)");
116 Tracer tr(
"ColumnVector");
242 Tracer tr(
"SquareMatrix::ReSize");
267 Tracer tr(
"RowVector::ReSize");
274 Tracer tr(
"ColumnVector::ReSize");
292 Tracer tr(
"SquareMatrix::ReSize(GM)");
313 Tracer tr(
"SymmetricMatrix::ReSize(GM)");
325 Tracer tr(
"DiagonalMatrix::ReSize(GM)");
337 Tracer tr(
"UpperTriangularMatrix::ReSize(GM)");
349 Tracer tr(
"LowerTriangularMatrix::ReSize(GM)");
361 Tracer tr(
"IdentityMatrix::ReSize(GM)");
370 Tracer tr(
"GeneralMatrix::ReSize(GM)");
389 return Type() ==
A.Type();
396 {
REPORT return (s==
this) ? 1 : 0; }
459 if (bw2.Lower() < 0) {
REPORT lower = -1; }
470 if (bw2.Upper() < 0) {
REPORT upper = -1; }
491 else {
REPORT return -1; }
507 else {
REPORT return -1; }
551 if (
tag==0) {
REPORT delete this;
return; }
556 static void BlockCopy(
int n,
Real* from,
Real* to)
562 *to++ = *from++; *to++ = *from++; *to++ = *from++; *to++ = *from++;
563 *to++ = *from++; *to++ = *from++; *to++ = *from++; *to++ = *from++;
565 i =
n & 7;
while (i--) *to++ = *from++;
580 tag = 0;
return true;
644 int counter=X.
search(
this);
731 if (!destination) { destination=source;
return true; }
732 if (destination==source)
return true;
733 if (!destination.
DataLossOK && !(destination>=source))
856 if (
i)
for (;;) { *rp++ = s;
if (!(--
i))
break; s+=
ncols; }
952 if (i < 0 || i >=
n) Throw(
Logic_error(
"array index out of range"));
962 if (i < 0 || i >=
n) Throw(
Logic_error(
"array index out of range"));
969 {
REPORT for (
int i = 0; i <
n; i++)
a[i] = ai; }
977 if (b.
n !=
n) Throw(
Logic_error(
"array lengths differ in copy"));
978 for (
int i = 0; i <
n; i++)
a[i] = b.
a[i];
991 for (
int i = 0; i <
n; i++)
a[i] = b.
a[i];
1000 if (n1 ==
n) {
REPORT return; }
1001 else if (n1 == 0) {
REPORT n = 0;
delete []
a;
a = 0; }
1012 for (
int i = 0; i <
n; i++)
a[i] = a1[i];
1013 n = n1;
delete [] a1;
1024 #ifdef use_namespace GeneralMatrix * Image() const
MatrixBandWidth BandWidth() const
GeneralMatrix * Image() const
MatrixBandWidth BandWidth() const
MatrixBandWidth BandWidth() const
MatrixBandWidth BandWidth() const
#define MONITOR_INT_DELETE(Operation, Size, Pointer)
ReturnMatrix ForReturn() const
MatrixBandWidth t() const
GeneralMatrix * Image() const
GeneralMatrix * Image() const
GeneralMatrix * Image() const
virtual int search(const BaseMatrix *) const =0
MatrixBandWidth BandWidth() const
int search(const BaseMatrix *) const
MatrixBandWidth BandWidth() const
virtual void ReSizeForSP(const GeneralMatrix &A, const GeneralMatrix &B)
GeneralMatrix * Image() const
MatrixBandWidth BandWidth() const
int search(const BaseMatrix *) const
MatrixBandWidth BandWidth() const
virtual bool SameStorageType(const GeneralMatrix &A) const
virtual MatrixBandWidth BandWidth() const
virtual void MiniCleanUp()
int search(const BaseMatrix *) const
MatrixBandWidth BandWidth() const
MatrixBandWidth BandWidth() const
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
MatrixBandWidth BandWidth() const
void Eq2(const BaseMatrix &, MatrixType)
bool Compare(const MatrixType &source, MatrixType &destination)
int search(const BaseMatrix *bm) const
MatrixBandWidth BandWidth() const
#define MONITOR_INT_NEW(Operation, Size, Pointer)
MatrixBandWidth BandWidth() const
void MatrixErrorNoSpace(const void *)
virtual void ReSize(int, int)
GeneralMatrix * Image() const
MatrixBandWidth BandWidth() const
MatrixBandWidth BandWidth() const
CroutMatrix(const BaseMatrix &)
GeneralMatrix * Image() const
os2<< "> n<< " > nendobj n
GeneralMatrix * Image() const
#define MONITOR_REAL_DELETE(Operation, Size, Pointer)
MatrixBandWidth BandWidth() const
int search(const BaseMatrix *) const
virtual void ReSizeForAdd(const GeneralMatrix &A, const GeneralMatrix &B)
MatrixBandWidth BandWidth() const
void Eq(const BaseMatrix &, MatrixType)
#define MONITOR_REAL_NEW(Operation, Size, Pointer)
MatrixBandWidth BandWidth() const
MatrixBandWidth BandWidth() const
int search(const BaseMatrix *) const
virtual GeneralMatrix * Image() const
MatrixBandWidth minimum(const MatrixBandWidth &) const
MatrixBandWidth BandWidth() const
void ReSize(int, int, int)
virtual MatrixType Type() const =0
GeneralMatrix * Image() const
MatrixBandWidth BandWidth() const
void ReSize(int m, int n)
GeneralMatrix * Image() const
GeneralMatrix * BorrowStore(GeneralMatrix *, MatrixType)
MatrixBandWidth BandWidth() const
GeneralMatrix * Image() const
GeneralMatrix * Image() const
void Inject(const MatrixRowCol &)
void Inject(const GeneralMatrix &)
GeneralMatrix * Image() const
virtual void SetParameters(const GeneralMatrix *)
void GetMatrix(const GeneralMatrix *)
friend class ReturnMatrix
void ReSize(int i, bool keep=false)