OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Private Member Functions | List of all members
LowerBandMatrix Class Reference

#include <newmat.h>

Inheritance diagram for LowerBandMatrix:
BandMatrix GeneralMatrix BaseMatrix

Public Member Functions

 LowerBandMatrix ()
 
 ~LowerBandMatrix ()
 
 LowerBandMatrix (int n, int lbw)
 
 LowerBandMatrix (const BaseMatrix &)
 
void operator= (const BaseMatrix &)
 
void operator= (Real f)
 
void operator= (const LowerBandMatrix &m)
 
MatrixType Type () const
 
 LowerBandMatrix (const LowerBandMatrix &gm)
 
GeneralMatrixMakeSolver ()
 
void Solver (MatrixColX &, const MatrixColX &)
 
LogAndSign LogDeterminant () const
 
void ReSize (int, int, int)
 
void ReSize (int n, int lbw)
 
void ReSize (const GeneralMatrix &A)
 
Real & operator() (int, int)
 
Real operator() (int, int) const
 
Real & element (int, int)
 
Real element (int, int) const
 
- Public Member Functions inherited from BandMatrix
 BandMatrix ()
 
 ~BandMatrix ()
 
 BandMatrix (int n, int lb, int ub)
 
 BandMatrix (const BaseMatrix &)
 
void operator= (const BaseMatrix &)
 
void operator= (Real f)
 
void operator= (const BandMatrix &m)
 
Real & operator() (int, int)
 
Real & element (int, int)
 
Real operator() (int, int) const
 
Real element (int, int) const
 
 BandMatrix (const BandMatrix &gm)
 
Real Trace () const
 
Real SumSquare () const
 
Real SumAbsoluteValue () const
 
Real Sum () const
 
Real MaximumAbsoluteValue () const
 
Real MinimumAbsoluteValue () const
 
Real Maximum () const
 
Real Minimum () const
 
void GetRow (MatrixRowCol &)
 
void GetCol (MatrixRowCol &)
 
void GetCol (MatrixColX &)
 
void RestoreCol (MatrixRowCol &)
 
void RestoreCol (MatrixColX &c)
 
void NextRow (MatrixRowCol &)
 
bool SameStorageType (const GeneralMatrix &A) const
 
void ReSizeForAdd (const GeneralMatrix &A, const GeneralMatrix &B)
 
void ReSizeForSP (const GeneralMatrix &A, const GeneralMatrix &B)
 
MatrixBandWidth BandWidth () const
 
void SetParameters (const GeneralMatrix *)
 
MatrixInput operator<< (Real)
 
MatrixInput operator<< (int f)
 
void operator<< (const Real *r)
 
void operator<< (const int *r)
 
void operator<< (const BaseMatrix &X)
 
- Public Member Functions inherited from GeneralMatrix
GeneralMatrixEvaluate (MatrixType mt=MatrixTypeUnSp)
 
int Nrows () const
 
int Ncols () const
 
int Storage () const
 
RealStore () const
 
virtual ~GeneralMatrix ()
 
void tDelete ()
 
bool reuse ()
 
void Protect ()
 
int Tag () const
 
bool IsZero () const
 
void Release ()
 
void Release (int t)
 
void ReleaseAndDelete ()
 
void operator<< (const Real *)
 
void operator<< (const int *)
 
void operator<< (const BaseMatrix &X)
 
void Inject (const GeneralMatrix &)
 
void operator+= (const BaseMatrix &)
 
void operator-= (const BaseMatrix &)
 
void operator*= (const BaseMatrix &)
 
void operator|= (const BaseMatrix &)
 
void operator &= (const BaseMatrix &)
 
void operator+= (Real)
 
void operator-= (Real r)
 
void operator*= (Real)
 
void operator/= (Real r)
 
virtual void RestoreRow (MatrixRowCol &)
 
virtual void NextCol (MatrixRowCol &)
 
virtual void NextCol (MatrixColX &)
 
Real MaximumAbsoluteValue1 (int &i) const
 
Real MinimumAbsoluteValue1 (int &i) const
 
Real Maximum1 (int &i) const
 
Real Minimum1 (int &i) const
 
Real MaximumAbsoluteValue2 (int &i, int &j) const
 
Real MinimumAbsoluteValue2 (int &i, int &j) const
 
Real Maximum2 (int &i, int &j) const
 
Real Minimum2 (int &i, int &j) const
 
virtual bool IsEqual (const GeneralMatrix &) const
 
void CheckStore () const
 
 operator ReturnMatrix () const
 
ReturnMatrix ForReturn () const
 
MatrixInput operator<< (Real)
 
MatrixInput operator<< (int f)
 
void CleanUp ()
 
- Public Member Functions inherited from BaseMatrix
AddedMatrix operator+ (const BaseMatrix &) const
 
MultipliedMatrix operator* (const BaseMatrix &) const
 
SubtractedMatrix operator- (const BaseMatrix &) const
 
ConcatenatedMatrix operator| (const BaseMatrix &) const
 
StackedMatrix operator & (const BaseMatrix &) const
 
ShiftedMatrix operator+ (Real) const
 
ScaledMatrix operator* (Real) const
 
ScaledMatrix operator/ (Real) const
 
ShiftedMatrix operator- (Real) const
 
TransposedMatrix t () const
 
NegatedMatrix operator- () const
 
ReversedMatrix Reverse () const
 
InvertedMatrix i () const
 
RowedMatrix AsRow () const
 
ColedMatrix AsColumn () const
 
DiagedMatrix AsDiagonal () const
 
MatedMatrix AsMatrix (int, int) const
 
GetSubMatrix SubMatrix (int, int, int, int) const
 
GetSubMatrix SymSubMatrix (int, int) const
 
GetSubMatrix Row (int) const
 
GetSubMatrix Rows (int, int) const
 
GetSubMatrix Column (int) const
 
GetSubMatrix Columns (int, int) const
 
Real AsScalar () const
 
Real Determinant () const
 
Real NormFrobenius () const
 
Real Norm1 () const
 
Real NormInfinity () const
 
void IEQND () const
 

Private Member Functions

GeneralMatrixImage () const
 

Additional Inherited Members

- Public Attributes inherited from BandMatrix
int lower
 
int upper
 
- Protected Member Functions inherited from BandMatrix
void CornerClear () const
 
short SimpleAddOK (const GeneralMatrix *gm)
 
- Protected Member Functions inherited from GeneralMatrix
 GeneralMatrix ()
 
 GeneralMatrix (ArrayLengthSpecifier)
 
void Add (GeneralMatrix *, Real)
 
void Add (Real)
 
void NegAdd (GeneralMatrix *, Real)
 
void NegAdd (Real)
 
void Multiply (GeneralMatrix *, Real)
 
void Multiply (Real)
 
void Negate (GeneralMatrix *)
 
void Negate ()
 
void ReverseElements ()
 
void ReverseElements (GeneralMatrix *)
 
void operator= (Real)
 
Real * GetStore ()
 
GeneralMatrixBorrowStore (GeneralMatrix *, MatrixType)
 
void GetMatrix (const GeneralMatrix *)
 
void Eq (const BaseMatrix &, MatrixType)
 
void Eq (const GeneralMatrix &)
 
void Eq (const BaseMatrix &, MatrixType, bool)
 
void Eq2 (const BaseMatrix &, MatrixType)
 
int search (const BaseMatrix *) const
 
virtual GeneralMatrixTranspose (TransposedMatrix *, MatrixType)
 
void CheckConversion (const BaseMatrix &)
 
void ReSize (int, int, int)
 
virtual void MiniCleanUp ()
 
void PlusEqual (const GeneralMatrix &gm)
 
void MinusEqual (const GeneralMatrix &gm)
 
void PlusEqual (Real f)
 
void MinusEqual (Real f)
 
- Protected Attributes inherited from GeneralMatrix
int tag
 
int nrows
 
int ncols
 
int storage
 
Realstore
 

Detailed Description

Definition at line 1024 of file newmat.h.

Constructor & Destructor Documentation

◆ LowerBandMatrix() [1/4]

LowerBandMatrix::LowerBandMatrix ( )
inline

Definition at line 1028 of file newmat.h.

Referenced by Image().

1028 :BandMatrix() {}
BandMatrix()
Definition: newmat.h:937

◆ ~LowerBandMatrix()

LowerBandMatrix::~LowerBandMatrix ( )
inline

Definition at line 1029 of file newmat.h.

1029 {}

◆ LowerBandMatrix() [2/4]

LowerBandMatrix::LowerBandMatrix ( int  n,
int  lbw 
)
inline

Definition at line 1030 of file newmat.h.

1031  : BandMatrix(n, lbw, 0) {}
BandMatrix()
Definition: newmat.h:937
os2<< "> n<< " > nendobj n

◆ LowerBandMatrix() [3/4]

LowerBandMatrix::LowerBandMatrix ( const BaseMatrix M)

Definition at line 211 of file bandmat.cpp.

References GeneralMatrix::Evaluate(), MatrixType::LB, and REPORT.

212 {
213  REPORT // CheckConversion(M);
214  // MatrixConversionCheck mcc;
216  GetMatrix(gmx); CornerClear();
217 }
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
void CornerClear() const
Definition: bandmat.cpp:157
#define REPORT
Definition: bandmat.cpp:24
void GetMatrix(const GeneralMatrix *)
Definition: newmat4.cpp:610

◆ LowerBandMatrix() [4/4]

LowerBandMatrix::LowerBandMatrix ( const LowerBandMatrix gm)
inline

Definition at line 1037 of file newmat.h.

1037 :BandMatrix(gm) { GetMatrix(&gm); }
BandMatrix()
Definition: newmat.h:937
void GetMatrix(const GeneralMatrix *)
Definition: newmat4.cpp:610

Member Function Documentation

◆ element() [1/2]

Real & LowerBandMatrix::element ( int  m,
int  n 
)

Definition at line 819 of file newmat6.cpp.

References n, and REPORT.

820 {
821  REPORT
822  int w = lower+1; int i = lower+n-m;
823  if (m<0 || m>= nrows || n<0 || n>= ncols || i<0 || i>=w)
824  Throw(IndexException(m,n,*this,true));
825  return store[w*m+i];
826 }
int lower
Definition: newmat.h:936
InvertedMatrix i() const
Definition: newmat6.cpp:325
os2<< "> n<< " > nendobj n
#define REPORT
Definition: newmat6.cpp:19
Real * store
Definition: newmat.h:393

◆ element() [2/2]

Real LowerBandMatrix::element ( int  m,
int  n 
) const

Definition at line 828 of file newmat6.cpp.

References n, and REPORT.

829 {
830  REPORT
831  int w = lower+1; int i = lower+n-m;
832  if (m<0 || m>= nrows || n<0 || n>= ncols || i<0 || i>=w)
833  Throw(IndexException(m,n,*this,true));
834  return store[w*m+i];
835 }
int lower
Definition: newmat.h:936
InvertedMatrix i() const
Definition: newmat6.cpp:325
os2<< "> n<< " > nendobj n
#define REPORT
Definition: newmat6.cpp:19
Real * store
Definition: newmat.h:393

◆ Image()

GeneralMatrix * LowerBandMatrix::Image ( ) const
privatevirtual

Reimplemented from BandMatrix.

Definition at line 810 of file newmat4.cpp.

References LowerBandMatrix(), MatrixErrorNoSpace(), and REPORT.

811 {
812  REPORT
813  GeneralMatrix* gm = new LowerBandMatrix(*this); MatrixErrorNoSpace(gm);
814  return gm;
815 }
void MatrixErrorNoSpace(const void *)
Definition: newmatex.cpp:292
#define REPORT
Definition: newmat4.cpp:19

◆ LogDeterminant()

LogAndSign LowerBandMatrix::LogDeterminant ( ) const
virtual

Reimplemented from BandMatrix.

Definition at line 404 of file bandmat.cpp.

References REPORT.

405 {
406  REPORT
407  int i = nrows; LogAndSign sum; Real* s = store + lower; int j = lower + 1;
408 // while (i--) { sum *= *s; s += j; }
409  if (i) for (;;) { sum *= *s; if (!(--i)) break; s += j; }
410  ((GeneralMatrix&)*this).tDelete(); return sum;
411 }
double Real
Definition: include.h:57
int lower
Definition: newmat.h:936
InvertedMatrix i() const
Definition: newmat6.cpp:325
Real * store
Definition: newmat.h:393
#define REPORT
Definition: bandmat.cpp:24

◆ MakeSolver()

GeneralMatrix* LowerBandMatrix::MakeSolver ( )
inlinevirtual

Reimplemented from BandMatrix.

Definition at line 1038 of file newmat.h.

1038 { return this; }

◆ operator()() [1/2]

Real & LowerBandMatrix::operator() ( int  m,
int  n 
)

Definition at line 110 of file newmat6.cpp.

References n, and REPORT.

111 {
112  REPORT
113  int w = lower+1; int i = lower+n-m;
114  if (m<=0 || m>nrows || n<=0 || n>ncols || i<0 || i>=w)
115  Throw(IndexException(m,n,*this));
116  return store[w*(m-1)+i];
117 }
int lower
Definition: newmat.h:936
InvertedMatrix i() const
Definition: newmat6.cpp:325
os2<< "> n<< " > nendobj n
#define REPORT
Definition: newmat6.cpp:19
Real * store
Definition: newmat.h:393

◆ operator()() [2/2]

Real LowerBandMatrix::operator() ( int  m,
int  n 
) const

Definition at line 222 of file newmat6.cpp.

References n, and REPORT.

223 {
224  REPORT
225  int w = lower+1; int i = lower+n-m;
226  if (m<=0 || m>nrows || n<=0 || n>ncols || i<0 || i>=w)
227  Throw(IndexException(m,n,*this));
228  return store[w*(m-1)+i];
229 }
int lower
Definition: newmat.h:936
InvertedMatrix i() const
Definition: newmat6.cpp:325
os2<< "> n<< " > nendobj n
#define REPORT
Definition: newmat6.cpp:19
Real * store
Definition: newmat.h:393

◆ operator=() [1/3]

void LowerBandMatrix::operator= ( const BaseMatrix X)

Definition at line 219 of file bandmat.cpp.

References MatrixType::LB, and REPORT.

220 {
221  REPORT // CheckConversion(X);
222  // MatrixConversionCheck mcc;
224 }
void CornerClear() const
Definition: bandmat.cpp:157
void Eq(const BaseMatrix &, MatrixType)
Definition: newmat4.cpp:637
#define REPORT
Definition: bandmat.cpp:24

◆ operator=() [2/3]

void LowerBandMatrix::operator= ( Real  f)
inline

Definition at line 1034 of file newmat.h.

References GeneralMatrix::operator=().

void operator=(Real)
Definition: newmat6.cpp:342

◆ operator=() [3/3]

void LowerBandMatrix::operator= ( const LowerBandMatrix m)
inline

Definition at line 1035 of file newmat.h.

1035 { Eq(m); }
void Eq(const BaseMatrix &, MatrixType)
Definition: newmat4.cpp:637

◆ ReSize() [1/3]

void LowerBandMatrix::ReSize ( int  n,
int  lb,
int  ub 
)
virtual

Reimplemented from BandMatrix.

Definition at line 92 of file bandmat.cpp.

References n, REPORT, and BandMatrix::ReSize().

93 {
94  REPORT
95  if (ub != 0)
96  {
97  Tracer tr("LowerBandMatrix::ReSize");
98  Throw(ProgramException("LowerBandMatrix with non-zero upper band" ));
99  }
100  BandMatrix::ReSize(n, lb, ub);
101 }
virtual void ReSize(int, int, int)
Definition: bandmat.cpp:46
os2<< "> n<< " > nendobj n
#define REPORT
Definition: bandmat.cpp:24

◆ ReSize() [2/3]

void LowerBandMatrix::ReSize ( int  n,
int  lbw 
)
inline

Definition at line 1042 of file newmat.h.

References n, and BandMatrix::ReSize().

1043  { BandMatrix::ReSize(n,lbw,0); }
virtual void ReSize(int, int, int)
Definition: bandmat.cpp:46
os2<< "> n<< " > nendobj n

◆ ReSize() [3/3]

void LowerBandMatrix::ReSize ( const GeneralMatrix A)
inlinevirtual

Reimplemented from BandMatrix.

Definition at line 1044 of file newmat.h.

References A, and BandMatrix::ReSize().

1044 { BandMatrix::ReSize(A); }
#define A(r, c)
virtual void ReSize(int, int, int)
Definition: bandmat.cpp:46

◆ Solver()

void LowerBandMatrix::Solver ( MatrixColX mcout,
const MatrixColX mcin 
)
virtual

Reimplemented from GeneralMatrix.

Definition at line 376 of file bandmat.cpp.

References MatrixRowCol::data, REPORT, MatrixRowCol::skip, and MatrixRowCol::storage.

378 {
379  REPORT
380  int i = mcin.skip-mcout.skip; Real* elx = mcin.data-i;
381  while (i-- > 0) *elx++ = 0.0;
382  int nc = mcin.skip; i = nc+mcin.storage; elx = mcin.data+mcin.storage;
383  int nr = mcout.skip+mcout.storage; int j = nr-i; i = nr-nc;
384  while (j-- > 0) *elx++ = 0.0;
385 
386  Real* el = mcin.data; Real* Ael = store + (lower+1)*nc + lower; j = 0;
387  if (i > 0) for(;;)
388  {
389  elx = el; Real sum = 0.0; int jx = j;
390  while (jx--) sum += *Ael++ * *elx++;
391  *elx = (*elx - sum) / *Ael++;
392  if (--i <= 0) break;
393  if (j<lower) Ael += lower - (++j); else el++;
394  }
395 }
double Real
Definition: include.h:57
int lower
Definition: newmat.h:936
InvertedMatrix i() const
Definition: newmat6.cpp:325
Real * data
Definition: newmatrc.h:43
int storage
Definition: newmatrc.h:40
Real * store
Definition: newmat.h:393
#define REPORT
Definition: bandmat.cpp:24

◆ Type()

MatrixType LowerBandMatrix::Type ( ) const
virtual

Reimplemented from BandMatrix.

Definition at line 424 of file newmat4.cpp.

References MatrixType::LB.

424 { return MatrixType::LB; }

The documentation for this class was generated from the following files: