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

#include <newmat.h>

Inheritance diagram for RowVector:
Matrix GeneralMatrix BaseMatrix

Public Member Functions

 RowVector ()
 
 ~RowVector ()
 
 RowVector (ArrayLengthSpecifier n)
 
 RowVector (const BaseMatrix &)
 
 RowVector (const RowVector &gm)
 
void operator= (const BaseMatrix &)
 
void operator= (Real f)
 
void operator= (const RowVector &m)
 
Real & operator() (int)
 
Real & element (int)
 
Real operator() (int) const
 
Real element (int) const
 
MatrixType Type () const
 
void GetCol (MatrixRowCol &)
 
void GetCol (MatrixColX &)
 
void NextCol (MatrixRowCol &)
 
void NextCol (MatrixColX &)
 
void RestoreCol (MatrixRowCol &)
 
void RestoreCol (MatrixColX &c)
 
GeneralMatrixTranspose (TransposedMatrix *, MatrixType)
 
void ReSize (int)
 
void ReSize (int, int)
 
void ReSize (const GeneralMatrix &A)
 
Realnric () const
 
void CleanUp ()
 
void MiniCleanUp ()
 
void operator+= (const Matrix &M)
 
void operator-= (const Matrix &M)
 
void operator+= (Real f)
 
void operator-= (Real f)
 
- Public Member Functions inherited from Matrix
 Matrix ()
 
 ~Matrix ()
 
 Matrix (int, int)
 
 Matrix (const BaseMatrix &)
 
void operator= (const BaseMatrix &)
 
void operator= (Real f)
 
void operator= (const Matrix &m)
 
Real & operator() (int, int)
 
Real & element (int, int)
 
Real operator() (int, int) const
 
Real element (int, int) const
 
 Matrix (const Matrix &gm)
 
GeneralMatrixMakeSolver ()
 
Real Trace () const
 
void GetRow (MatrixRowCol &)
 
void NextRow (MatrixRowCol &)
 
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
 
void operator+= (const Matrix &M)
 
void operator-= (const Matrix &M)
 
void operator+= (Real f)
 
void operator-= (Real f)
 
- 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 Solver (MatrixColX &, const MatrixColX &)
 
virtual void RestoreRow (MatrixRowCol &)
 
Real SumSquare () const
 
Real SumAbsoluteValue () const
 
Real Sum () const
 
Real MaximumAbsoluteValue1 (int &i) const
 
Real MinimumAbsoluteValue1 (int &i) const
 
Real Maximum1 (int &i) const
 
Real Minimum1 (int &i) const
 
Real MaximumAbsoluteValue () const
 
Real MinimumAbsoluteValue () const
 
Real Maximum () const
 
Real Minimum () const
 
LogAndSign LogDeterminant () const
 
virtual bool IsEqual (const GeneralMatrix &) const
 
void CheckStore () const
 
virtual void SetParameters (const GeneralMatrix *)
 
 operator ReturnMatrix () const
 
ReturnMatrix ForReturn () const
 
virtual bool SameStorageType (const GeneralMatrix &A) const
 
virtual void ReSizeForAdd (const GeneralMatrix &A, const GeneralMatrix &B)
 
virtual void ReSizeForSP (const GeneralMatrix &A, const GeneralMatrix &B)
 
MatrixInput operator<< (Real)
 
MatrixInput operator<< (int f)
 
- 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
 
virtual MatrixBandWidth BandWidth () const
 
void IEQND () const
 

Private Member Functions

GeneralMatrixImage () const
 

Additional Inherited Members

- 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
 
void CheckConversion (const BaseMatrix &)
 
void ReSize (int, int, int)
 
virtual short SimpleAddOK (const GeneralMatrix *)
 
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 822 of file newmat.h.

Constructor & Destructor Documentation

◆ RowVector() [1/4]

RowVector::RowVector ( )
inline

Definition at line 826 of file newmat.h.

Referenced by Image().

826 :Matrix() { nrows = 1; }
Matrix()
Definition: newmat.h:547

◆ ~RowVector()

RowVector::~RowVector ( )
inline

Definition at line 827 of file newmat.h.

827 {}

◆ RowVector() [2/4]

RowVector::RowVector ( ArrayLengthSpecifier  n)
inline

Definition at line 828 of file newmat.h.

828 : Matrix(1,n.Value()) {}
Matrix()
Definition: newmat.h:547
os2<< "> n<< " > nendobj n

◆ RowVector() [3/4]

RowVector::RowVector ( const BaseMatrix M)

Definition at line 101 of file newmat4.cpp.

References GeneralMatrix::nrows, and REPORT.

101  : Matrix(M)
102 {
103  REPORT
104  if (nrows!=1)
105  {
106  Tracer tr("RowVector");
107  Throw(VectorException(*this));
108  }
109 }
Matrix()
Definition: newmat.h:547
#define REPORT
Definition: newmat4.cpp:19

◆ RowVector() [4/4]

RowVector::RowVector ( const RowVector gm)
inline

Definition at line 830 of file newmat.h.

830 :Matrix(gm) { GetMatrix(&gm); }
Matrix()
Definition: newmat.h:547
void GetMatrix(const GeneralMatrix *)
Definition: newmat4.cpp:610

Member Function Documentation

◆ CleanUp()

void RowVector::CleanUp ( )
virtual

Reimplemented from GeneralMatrix.

Definition at line 892 of file newmat4.cpp.

References GeneralMatrix::CleanUp(), GeneralMatrix::nrows, and REPORT.

void CleanUp()
Definition: newmat4.cpp:874
#define REPORT
Definition: newmat4.cpp:19

◆ element() [1/2]

Real & RowVector::element ( int  n)

Definition at line 769 of file newmat6.cpp.

References n, and REPORT.

Referenced by SVD().

770 {
771  REPORT
772  if (n<0 || n>= ncols) Throw(IndexException(n,*this,true));
773  return store[n];
774 }
os2<< "> n<< " > nendobj n
#define REPORT
Definition: newmat6.cpp:19
Real * store
Definition: newmat.h:393

◆ element() [2/2]

Real RowVector::element ( int  n) const

Definition at line 776 of file newmat6.cpp.

References n, and REPORT.

777 {
778  REPORT
779  if (n<0 || n>= ncols) Throw(IndexException(n,*this,true));
780  return store[n];
781 }
os2<< "> n<< " > nendobj n
#define REPORT
Definition: newmat6.cpp:19
Real * store
Definition: newmat.h:393

◆ GetCol() [1/2]

void RowVector::GetCol ( MatrixRowCol mrc)
virtual

Reimplemented from Matrix.

Definition at line 525 of file newmat3.cpp.

References MatrixRowCol::cw, MatrixRowCol::data, MatrixRowCol::length, REPORT, MatrixRowCol::rowcol, MatrixRowCol::skip, MatrixRowCol::storage, and StoreHere.

526 {
527  REPORT
528  // do not allow StoreHere
529  if (+(mrc.cw*StoreHere))
530  Throw(InternalException("RowVector::GetCol(MatrixRowCol&)"));
531 
532  mrc.skip=0; mrc.storage=1; mrc.length=nrows; mrc.data = store+mrc.rowcol;
533 
534 }
#define REPORT
Definition: newmat3.cpp:20
Real * data
Definition: newmatrc.h:43
int storage
Definition: newmatrc.h:40
LoadAndStoreFlag cw
Definition: newmatrc.h:44
Real * store
Definition: newmat.h:393
int rowcol
Definition: newmatrc.h:41
int length
Definition: newmatrc.h:38

◆ GetCol() [2/2]

void RowVector::GetCol ( MatrixColX mrc)
virtual

Reimplemented from Matrix.

Definition at line 536 of file newmat3.cpp.

References MatrixRowCol::cw, MatrixRowCol::data, MatrixRowCol::length, LoadOnEntry, REPORT, MatrixRowCol::rowcol, MatrixRowCol::skip, and MatrixRowCol::storage.

537 {
538  REPORT
539  mrc.skip=0; mrc.storage=1; mrc.length=nrows;
540  if (mrc.cw >= LoadOnEntry)
541  { REPORT *(mrc.data) = *(store+mrc.rowcol); }
542 
543 }
#define REPORT
Definition: newmat3.cpp:20
Real * data
Definition: newmatrc.h:43
int storage
Definition: newmatrc.h:40
LoadAndStoreFlag cw
Definition: newmatrc.h:44
Real * store
Definition: newmat.h:393
int rowcol
Definition: newmatrc.h:41
int length
Definition: newmatrc.h:38

◆ Image()

GeneralMatrix * RowVector::Image ( ) const
privatevirtual

Reimplemented from Matrix.

Definition at line 782 of file newmat4.cpp.

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

783 {
784  REPORT
785  GeneralMatrix* gm = new RowVector(*this); MatrixErrorNoSpace(gm);
786  return gm;
787 }
void MatrixErrorNoSpace(const void *)
Definition: newmatex.cpp:292
#define REPORT
Definition: newmat4.cpp:19
RowVector()
Definition: newmat.h:826

◆ MiniCleanUp()

void RowVector::MiniCleanUp ( )
inlinevirtual

Reimplemented from GeneralMatrix.

Definition at line 856 of file newmat.h.

856 { store = 0; storage = 0; nrows = 1; ncols = 0; tag = -1; }
Real * store
Definition: newmat.h:393
int storage
Definition: newmat.h:392

◆ NextCol() [1/2]

void RowVector::NextCol ( MatrixRowCol mrc)
virtual

Reimplemented from Matrix.

Definition at line 545 of file newmat3.cpp.

References MatrixRowCol::data, REPORT, and MatrixRowCol::rowcol.

546 { REPORT mrc.rowcol++; mrc.data++; }
#define REPORT
Definition: newmat3.cpp:20
Real * data
Definition: newmatrc.h:43
int rowcol
Definition: newmatrc.h:41

◆ NextCol() [2/2]

void RowVector::NextCol ( MatrixColX mrc)
virtual

Reimplemented from Matrix.

Definition at line 548 of file newmat3.cpp.

References MatrixRowCol::cw, MatrixRowCol::data, LoadOnEntry, REPORT, MatrixRowCol::rowcol, and StoreOnExit.

549 {
550  if (+(mrc.cw*StoreOnExit)) { REPORT *(store+mrc.rowcol)=*(mrc.data); }
551 
552  mrc.rowcol++;
553  if (mrc.rowcol < ncols)
554  {
555  if (+(mrc.cw*LoadOnEntry)) { REPORT *(mrc.data)=*(store+mrc.rowcol); }
556  }
557  else { REPORT mrc.cw -= StoreOnExit; }
558 }
#define REPORT
Definition: newmat3.cpp:20
Real * data
Definition: newmatrc.h:43
LoadAndStoreFlag cw
Definition: newmatrc.h:44
Real * store
Definition: newmat.h:393
int rowcol
Definition: newmatrc.h:41

◆ nric()

Real* RowVector::nric ( ) const
inline

Definition at line 853 of file newmat.h.

854  { CheckStore(); return store-1; } // for use by NRIC
void CheckStore() const
Definition: newmat4.cpp:864
Real * store
Definition: newmat.h:393

◆ operator()() [1/2]

Real & RowVector::operator() ( int  n)

Definition at line 85 of file newmat6.cpp.

References n, and REPORT.

86 {
87  REPORT
88  if (n<=0 || n> ncols) Throw(IndexException(n,*this));
89  return store[n-1];
90 }
os2<< "> n<< " > nendobj n
#define REPORT
Definition: newmat6.cpp:19
Real * store
Definition: newmat.h:393

◆ operator()() [2/2]

Real RowVector::operator() ( int  n) const

Definition at line 197 of file newmat6.cpp.

References n, and REPORT.

198 {
199  REPORT
200  if (n<=0 || n> ncols) Throw(IndexException(n,*this));
201  return store[n-1];
202 }
os2<< "> n<< " > nendobj n
#define REPORT
Definition: newmat6.cpp:19
Real * store
Definition: newmat.h:393

◆ operator+=() [1/2]

void RowVector::operator+= ( const Matrix M)
inline

Definition at line 858 of file newmat.h.

858 { PlusEqual(M); }
void PlusEqual(const GeneralMatrix &gm)
Definition: newmat7.cpp:148

◆ operator+=() [2/2]

void RowVector::operator+= ( Real  f)
inline

Definition at line 860 of file newmat.h.

References GeneralMatrix::Add().

860 { GeneralMatrix::Add(f); }
void Add(GeneralMatrix *, Real)
Definition: newmat5.cpp:311

◆ operator-=() [1/2]

void RowVector::operator-= ( const Matrix M)
inline

Definition at line 859 of file newmat.h.

859 { MinusEqual(M); }
void MinusEqual(const GeneralMatrix &gm)
Definition: newmat7.cpp:178

◆ operator-=() [2/2]

void RowVector::operator-= ( Real  f)
inline

Definition at line 861 of file newmat.h.

References GeneralMatrix::Add().

861 { GeneralMatrix::Add(-f); }
void Add(GeneralMatrix *, Real)
Definition: newmat5.cpp:311

◆ operator=() [1/3]

void RowVector::operator= ( const BaseMatrix X)

Definition at line 369 of file newmat6.cpp.

References REPORT, and MatrixType::RV.

370 {
371  REPORT // CheckConversion(X);
372  // MatrixConversionCheck mcc;
373  Eq(X,MatrixType::RV);
374  if (nrows!=1)
375  { Tracer tr("RowVector(=)"); Throw(VectorException(*this)); }
376 }
#define REPORT
Definition: newmat6.cpp:19
void Eq(const BaseMatrix &, MatrixType)
Definition: newmat4.cpp:637

◆ operator=() [2/3]

void RowVector::operator= ( Real  f)
inline

Definition at line 832 of file newmat.h.

References GeneralMatrix::operator=().

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

◆ operator=() [3/3]

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

Definition at line 833 of file newmat.h.

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

◆ ReSize() [1/3]

void RowVector::ReSize ( int  nc)

Definition at line 259 of file newmat4.cpp.

References REPORT, and GeneralMatrix::ReSize().

Referenced by ReSize().

260 { REPORT GeneralMatrix::ReSize(1,nc,nc); }
#define REPORT
Definition: newmat4.cpp:19
void ReSize(int, int, int)
Definition: newmat4.cpp:216

◆ ReSize() [2/3]

void RowVector::ReSize ( int  nr,
int  nc 
)
virtual

Reimplemented from Matrix.

Definition at line 265 of file newmat4.cpp.

References REPORT, and GeneralMatrix::ReSize().

266 {
267  Tracer tr("RowVector::ReSize");
268  if (nr != 1) Throw(VectorException(*this));
269  REPORT GeneralMatrix::ReSize(1,nc,nc);
270 }
#define REPORT
Definition: newmat4.cpp:19
void ReSize(int, int, int)
Definition: newmat4.cpp:216

◆ ReSize() [3/3]

void RowVector::ReSize ( const GeneralMatrix A)
virtual

Reimplemented from Matrix.

Definition at line 304 of file newmat4.cpp.

References A, REPORT, and ReSize().

305 { REPORT ReSize(A.Nrows(), A.Ncols()); }
void ReSize(int)
Definition: newmat4.cpp:259
#define A(r, c)
#define REPORT
Definition: newmat4.cpp:19

◆ RestoreCol() [1/2]

void RowVector::RestoreCol ( MatrixRowCol )
inlinevirtual

Reimplemented from Matrix.

Definition at line 847 of file newmat.h.

847 {}

◆ RestoreCol() [2/2]

void RowVector::RestoreCol ( MatrixColX c)
virtual

Reimplemented from Matrix.

Definition at line 560 of file newmat3.cpp.

References MatrixRowCol::data, REPORT, and MatrixRowCol::rowcol.

561  { REPORT *(store+mrc.rowcol)=*(mrc.data); } // not accessed
#define REPORT
Definition: newmat3.cpp:20
Real * store
Definition: newmat.h:393

◆ Transpose()

GeneralMatrix * RowVector::Transpose ( TransposedMatrix ,
MatrixType  mt 
)
virtual

Reimplemented from GeneralMatrix.

Definition at line 68 of file newmat5.cpp.

References MatrixErrorNoSpace(), and REPORT.

69 {
70  REPORT
72  gmx->ncols = 1; gmx->nrows = gmx->storage = storage;
73  return BorrowStore(gmx,mt);
74 }
friend class ColumnVector
Definition: newmat.h:509
void MatrixErrorNoSpace(const void *)
Definition: newmatex.cpp:292
#define REPORT
Definition: newmat5.cpp:20
GeneralMatrix * BorrowStore(GeneralMatrix *, MatrixType)
Definition: newmat4.cpp:617
int storage
Definition: newmat.h:392

◆ Type()

MatrixType RowVector::Type ( ) const
virtual

Reimplemented from Matrix.

Definition at line 419 of file newmat4.cpp.

References MatrixType::RV.

419 { return MatrixType::RV; }

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