OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Member Functions | Friends | List of all members
BaseMatrix Class Referenceabstract

#include <newmat.h>

Inheritance diagram for BaseMatrix:
GeneralMatrix GenericMatrix LinearEquationSolver MultipliedMatrix NegatedMatrix ReturnMatrix ShiftedMatrix BandLUMatrix BandMatrix CroutMatrix DiagonalMatrix IdentityMatrix LowerTriangularMatrix Matrix SymmetricBandMatrix SymmetricMatrix UpperTriangularMatrix AddedMatrix ConcatenatedMatrix KPMatrix SolvedMatrix ColedMatrix DiagedMatrix GetSubMatrix InvertedMatrix MatedMatrix ReversedMatrix RowedMatrix TransposedMatrix NegShiftedMatrix ScaledMatrix

Public Member Functions

virtual GeneralMatrixEvaluate (MatrixType mt=MatrixTypeUnSp)=0
 
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
 
virtual LogAndSign LogDeterminant () const
 
Real Determinant () const
 
virtual Real SumSquare () const
 
Real NormFrobenius () const
 
virtual Real SumAbsoluteValue () const
 
virtual Real Sum () const
 
virtual Real MaximumAbsoluteValue () const
 
virtual Real MaximumAbsoluteValue1 (int &i) const
 
virtual Real MaximumAbsoluteValue2 (int &i, int &j) const
 
virtual Real MinimumAbsoluteValue () const
 
virtual Real MinimumAbsoluteValue1 (int &i) const
 
virtual Real MinimumAbsoluteValue2 (int &i, int &j) const
 
virtual Real Maximum () const
 
virtual Real Maximum1 (int &i) const
 
virtual Real Maximum2 (int &i, int &j) const
 
virtual Real Minimum () const
 
virtual Real Minimum1 (int &i) const
 
virtual Real Minimum2 (int &i, int &j) const
 
virtual Real Trace () const
 
Real Norm1 () const
 
Real NormInfinity () const
 
virtual MatrixBandWidth BandWidth () const
 
virtual void CleanUp ()
 
void IEQND () const
 

Protected Member Functions

virtual int search (const BaseMatrix *) const =0
 

Friends

class GeneralMatrix
 
class Matrix
 
class SquareMatrix
 
class nricMatrix
 
class RowVector
 
class ColumnVector
 
class SymmetricMatrix
 
class UpperTriangularMatrix
 
class LowerTriangularMatrix
 
class DiagonalMatrix
 
class CroutMatrix
 
class BandMatrix
 
class LowerBandMatrix
 
class UpperBandMatrix
 
class SymmetricBandMatrix
 
class AddedMatrix
 
class MultipliedMatrix
 
class SubtractedMatrix
 
class SPMatrix
 
class KPMatrix
 
class ConcatenatedMatrix
 
class StackedMatrix
 
class SolvedMatrix
 
class ShiftedMatrix
 
class NegShiftedMatrix
 
class ScaledMatrix
 
class TransposedMatrix
 
class ReversedMatrix
 
class NegatedMatrix
 
class InvertedMatrix
 
class RowedMatrix
 
class ColedMatrix
 
class DiagedMatrix
 
class MatedMatrix
 
class GetSubMatrix
 
class ReturnMatrix
 
class LinearEquationSolver
 
class GenericMatrix
 

Detailed Description

Definition at line 275 of file newmat.h.

Member Function Documentation

◆ AsColumn()

ColedMatrix BaseMatrix::AsColumn ( ) const

Definition at line 332 of file newmat6.cpp.

References REPORT.

Referenced by NonLinearLeastSquares::GetStandardErrors(), and MLE_D_FI::GetStandardErrors().

333 { REPORT return ColedMatrix(this); }
friend class ColedMatrix
Definition: newmat.h:373
#define REPORT
Definition: newmat6.cpp:19

◆ AsDiagonal()

DiagedMatrix BaseMatrix::AsDiagonal ( ) const

Definition at line 335 of file newmat6.cpp.

References REPORT.

336 { REPORT return DiagedMatrix(this); }
friend class DiagedMatrix
Definition: newmat.h:374
#define REPORT
Definition: newmat6.cpp:19

◆ AsMatrix()

MatedMatrix BaseMatrix::AsMatrix ( int  nrx,
int  ncx 
) const

Definition at line 338 of file newmat6.cpp.

References REPORT.

339 { REPORT return MatedMatrix(this,nrx,ncx); }
#define REPORT
Definition: newmat6.cpp:19
friend class MatedMatrix
Definition: newmat.h:375

◆ AsRow()

RowedMatrix BaseMatrix::AsRow ( ) const

Definition at line 329 of file newmat6.cpp.

References REPORT.

330 { REPORT return RowedMatrix(this); }
#define REPORT
Definition: newmat6.cpp:19
friend class RowedMatrix
Definition: newmat.h:372

◆ AsScalar()

Real BaseMatrix::AsScalar ( ) const

Definition at line 254 of file newmat6.cpp.

References GeneralMatrix::Evaluate(), REPORT, and x.

255 {
256  REPORT
257  GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
258 
259  if (gm->nrows!=1 || gm->ncols!=1)
260  {
261  Tracer tr("AsScalar");
262  Try
263  { Throw(ProgramException("Cannot convert to scalar", *gm)); }
264  CatchAll { gm->tDelete(); ReThrow; }
265  }
266 
267  Real x = *(gm->store); gm->tDelete(); return x;
268 }
ossim_uint32 x
double Real
Definition: include.h:57
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat6.cpp:19

◆ BandWidth()

MatrixBandWidth BaseMatrix::BandWidth ( ) const
virtual

◆ CleanUp()

virtual void BaseMatrix::CleanUp ( )
inlinevirtual

Reimplemented in LinearEquationSolver, GenericMatrix, BandLUMatrix, CroutMatrix, ColumnVector, RowVector, nricMatrix, and GeneralMatrix.

Definition at line 336 of file newmat.h.

336 {} // to clear store

◆ Column()

GetSubMatrix BaseMatrix::Column ( int  first_col) const

Definition at line 64 of file submat.cpp.

References REPORT.

Referenced by FFT2(), LeftCircularUpdateCholesky(), and RightCircularUpdateCholesky().

65 {
66  REPORT
67  Tracer tr("SubMatrix(column)");
68  int c = first_col - 1;
69  if (c<0) Throw(SubMatrixDimensionException());
70  return GetSubMatrix(this, 0, -1, c, 1, false);
71 }
#define REPORT
Definition: submat.cpp:17
friend class GetSubMatrix
Definition: newmat.h:376

◆ Columns()

GetSubMatrix BaseMatrix::Columns ( int  first_col,
int  last_col 
) const

Definition at line 73 of file submat.cpp.

References REPORT.

74 {
75  REPORT
76  Tracer tr("SubMatrix(columns)");
77  int c = first_col - 1; int d = last_col - first_col + 1;
78  if (c<0 || d<0) Throw(SubMatrixDimensionException());
79  // allow zero rows or columns
80  return GetSubMatrix(this, 0, -1, c, d, false);
81 }
#define REPORT
Definition: submat.cpp:17
friend class GetSubMatrix
Definition: newmat.h:376

◆ Determinant()

Real BaseMatrix::Determinant ( ) const

Definition at line 711 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), REPORT, and LogAndSign::Value().

712 {
713  REPORT
714  Tracer tr("Determinant");
715  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
716  LogAndSign ld = gm->LogDeterminant();
717  return ld.Value();
718 }
Real Value() const
Definition: newmat8.cpp:633
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ Evaluate()

virtual GeneralMatrix* BaseMatrix::Evaluate ( MatrixType  mt = MatrixTypeUnSp)
pure virtual

◆ i()

InvertedMatrix BaseMatrix::i ( ) const

◆ IEQND()

void BaseMatrix::IEQND ( ) const

Definition at line 309 of file newmatex.cpp.

310  { Throw(NotDefinedException("inequalities", "matrices")); }

◆ LogDeterminant()

LogAndSign BaseMatrix::LogDeterminant ( ) const
virtual

Reimplemented in IdentityMatrix, BandLUMatrix, SymmetricBandMatrix, LowerBandMatrix, UpperBandMatrix, BandMatrix, CroutMatrix, DiagonalMatrix, LowerTriangularMatrix, UpperTriangularMatrix, and GeneralMatrix.

Definition at line 682 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

683 {
684  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
685  LogAndSign sum = gm->LogDeterminant(); return sum;
686 }
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ Maximum()

Real BaseMatrix::Maximum ( ) const
virtual

Reimplemented in SymmetricBandMatrix, BandMatrix, and GeneralMatrix.

Definition at line 490 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

491 {
492  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
493  Real s = gm->Maximum(); return s;
494 }
double Real
Definition: include.h:57
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ Maximum1()

Real BaseMatrix::Maximum1 ( int &  i) const
virtual

Reimplemented in GeneralMatrix.

Definition at line 496 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

497 {
498  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
499  Real s = gm->Maximum1(i); return s;
500 }
double Real
Definition: include.h:57
InvertedMatrix i() const
Definition: newmat6.cpp:325
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ Maximum2()

Real BaseMatrix::Maximum2 ( int &  i,
int &  j 
) const
virtual

Reimplemented in Matrix, and GeneralMatrix.

Definition at line 502 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

503 {
504  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
505  Real s = gm->Maximum2(i, j); return s;
506 }
double Real
Definition: include.h:57
InvertedMatrix i() const
Definition: newmat6.cpp:325
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ MaximumAbsoluteValue()

Real BaseMatrix::MaximumAbsoluteValue ( ) const
virtual

Reimplemented in SymmetricBandMatrix, BandMatrix, and GeneralMatrix.

Definition at line 454 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

455 {
456  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
457  Real s = gm->MaximumAbsoluteValue(); return s;
458 }
double Real
Definition: include.h:57
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ MaximumAbsoluteValue1()

Real BaseMatrix::MaximumAbsoluteValue1 ( int &  i) const
virtual

Reimplemented in GeneralMatrix.

Definition at line 460 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

461 {
462  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
463  Real s = gm->MaximumAbsoluteValue1(i); return s;
464 }
double Real
Definition: include.h:57
InvertedMatrix i() const
Definition: newmat6.cpp:325
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ MaximumAbsoluteValue2()

Real BaseMatrix::MaximumAbsoluteValue2 ( int &  i,
int &  j 
) const
virtual

Reimplemented in Matrix, and GeneralMatrix.

Definition at line 466 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

467 {
468  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
469  Real s = gm->MaximumAbsoluteValue2(i, j); return s;
470 }
double Real
Definition: include.h:57
InvertedMatrix i() const
Definition: newmat6.cpp:325
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ Minimum()

Real BaseMatrix::Minimum ( ) const
virtual

Reimplemented in SymmetricBandMatrix, BandMatrix, and GeneralMatrix.

Definition at line 508 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

509 {
510  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
511  Real s = gm->Minimum(); return s;
512 }
double Real
Definition: include.h:57
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ Minimum1()

Real BaseMatrix::Minimum1 ( int &  i) const
virtual

Reimplemented in GeneralMatrix.

Definition at line 514 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

515 {
516  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
517  Real s = gm->Minimum1(i); return s;
518 }
double Real
Definition: include.h:57
InvertedMatrix i() const
Definition: newmat6.cpp:325
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ Minimum2()

Real BaseMatrix::Minimum2 ( int &  i,
int &  j 
) const
virtual

Reimplemented in Matrix, and GeneralMatrix.

Definition at line 520 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

521 {
522  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
523  Real s = gm->Minimum2(i, j); return s;
524 }
double Real
Definition: include.h:57
InvertedMatrix i() const
Definition: newmat6.cpp:325
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ MinimumAbsoluteValue()

Real BaseMatrix::MinimumAbsoluteValue ( ) const
virtual

Reimplemented in SymmetricBandMatrix, BandMatrix, and GeneralMatrix.

Definition at line 472 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

473 {
474  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
475  Real s = gm->MinimumAbsoluteValue(); return s;
476 }
double Real
Definition: include.h:57
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ MinimumAbsoluteValue1()

Real BaseMatrix::MinimumAbsoluteValue1 ( int &  i) const
virtual

Reimplemented in GeneralMatrix.

Definition at line 478 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

479 {
480  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
481  Real s = gm->MinimumAbsoluteValue1(i); return s;
482 }
double Real
Definition: include.h:57
InvertedMatrix i() const
Definition: newmat6.cpp:325
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ MinimumAbsoluteValue2()

Real BaseMatrix::MinimumAbsoluteValue2 ( int &  i,
int &  j 
) const
virtual

Reimplemented in Matrix, and GeneralMatrix.

Definition at line 484 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

485 {
486  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
487  Real s = gm->MinimumAbsoluteValue2(i, j); return s;
488 }
double Real
Definition: include.h:57
InvertedMatrix i() const
Definition: newmat6.cpp:325
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ Norm1()

Real BaseMatrix::Norm1 ( ) const

Definition at line 723 of file newmat7.cpp.

References GeneralMatrix::Evaluate(), LoadOnEntry, GeneralMatrix::Ncols(), MatrixCol::Next(), REPORT, and MatrixRowCol::SumAbsoluteValue().

724 {
725  // maximum of sum of absolute values of a column
726  REPORT
727  GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
728  int nc = gm->Ncols(); Real value = 0.0;
729  MatrixCol mc(gm, LoadOnEntry);
730  while (nc--)
731  { Real v = mc.SumAbsoluteValue(); if (value < v) value = v; mc.Next(); }
732  gm->tDelete(); return value;
733 }
double Real
Definition: include.h:57
int Ncols() const
Definition: newmat.h:431
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat7.cpp:18

◆ NormFrobenius()

Real BaseMatrix::NormFrobenius ( ) const

Definition at line 439 of file newmat8.cpp.

References REPORT, and SumSquare().

440  { REPORT return sqrt(SumSquare()); }
#define REPORT
Definition: newmat8.cpp:21
virtual Real SumSquare() const
Definition: newmat8.cpp:433

◆ NormInfinity()

Real BaseMatrix::NormInfinity ( ) const

Definition at line 735 of file newmat7.cpp.

References GeneralMatrix::Evaluate(), LoadOnEntry, MatrixRow::Next(), GeneralMatrix::Nrows(), REPORT, and MatrixRowCol::SumAbsoluteValue().

736 {
737  // maximum of sum of absolute values of a row
738  REPORT
739  GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
740  int nr = gm->Nrows(); Real value = 0.0;
741  MatrixRow mr(gm, LoadOnEntry);
742  while (nr--)
743  { Real v = mr.SumAbsoluteValue(); if (value < v) value = v; mr.Next(); }
744  gm->tDelete(); return value;
745 }
double Real
Definition: include.h:57
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat7.cpp:18
int Nrows() const
Definition: newmat.h:430

◆ operator &()

StackedMatrix BaseMatrix::operator& ( const BaseMatrix ) const

◆ operator*() [1/2]

MultipliedMatrix BaseMatrix::operator* ( const BaseMatrix bm) const

Definition at line 280 of file newmat6.cpp.

References REPORT.

Referenced by InvertedMatrix::operator*().

281 { REPORT return MultipliedMatrix(this, &bm); }
#define REPORT
Definition: newmat6.cpp:19
friend class MultipliedMatrix
Definition: newmat.h:358

◆ operator*() [2/2]

ScaledMatrix BaseMatrix::operator* ( Real  f) const

Definition at line 304 of file newmat6.cpp.

References REPORT.

305 { REPORT return ScaledMatrix(this, f); }
friend class ScaledMatrix
Definition: newmat.h:367
#define REPORT
Definition: newmat6.cpp:19

◆ operator+() [1/2]

AddedMatrix BaseMatrix::operator+ ( const BaseMatrix bm) const

Definition at line 271 of file newmat6.cpp.

References REPORT.

272 { REPORT return AddedMatrix(this, &bm); }
friend class AddedMatrix
Definition: newmat.h:357
#define REPORT
Definition: newmat6.cpp:19

◆ operator+() [2/2]

ShiftedMatrix BaseMatrix::operator+ ( Real  f) const

Definition at line 295 of file newmat6.cpp.

References REPORT.

296 { REPORT return ShiftedMatrix(this, f); }
#define REPORT
Definition: newmat6.cpp:19
friend class ShiftedMatrix
Definition: newmat.h:365

◆ operator-() [1/3]

SubtractedMatrix BaseMatrix::operator- ( const BaseMatrix bm) const

Definition at line 292 of file newmat6.cpp.

References REPORT.

293 { REPORT return SubtractedMatrix(this, &bm); }
#define REPORT
Definition: newmat6.cpp:19
friend class SubtractedMatrix
Definition: newmat.h:359

◆ operator-() [2/3]

ShiftedMatrix BaseMatrix::operator- ( Real  f) const

Definition at line 313 of file newmat6.cpp.

References REPORT.

314 { REPORT return ShiftedMatrix(this, -f); }
#define REPORT
Definition: newmat6.cpp:19
friend class ShiftedMatrix
Definition: newmat.h:365

◆ operator-() [3/3]

NegatedMatrix BaseMatrix::operator- ( ) const

Definition at line 319 of file newmat6.cpp.

References REPORT.

320 { REPORT return NegatedMatrix(this); }
#define REPORT
Definition: newmat6.cpp:19
friend class NegatedMatrix
Definition: newmat.h:370

◆ operator/()

ScaledMatrix BaseMatrix::operator/ ( Real  f) const

Definition at line 307 of file newmat6.cpp.

References REPORT.

308 { REPORT return ScaledMatrix(this, 1.0/f); }
friend class ScaledMatrix
Definition: newmat.h:367
#define REPORT
Definition: newmat6.cpp:19

◆ operator|()

ConcatenatedMatrix BaseMatrix::operator| ( const BaseMatrix bm) const

Definition at line 283 of file newmat6.cpp.

References REPORT.

284 { REPORT return ConcatenatedMatrix(this, &bm); }
#define REPORT
Definition: newmat6.cpp:19
friend class ConcatenatedMatrix
Definition: newmat.h:362

◆ Reverse()

ReversedMatrix BaseMatrix::Reverse ( ) const

Definition at line 322 of file newmat6.cpp.

References REPORT.

323 { REPORT return ReversedMatrix(this); }
friend class ReversedMatrix
Definition: newmat.h:369
#define REPORT
Definition: newmat6.cpp:19

◆ Row()

GetSubMatrix BaseMatrix::Row ( int  first_row) const

Definition at line 45 of file submat.cpp.

References REPORT.

Referenced by FFT2(), and NonLinearLeastSquares::GetHatDiagonal().

46 {
47  REPORT
48  Tracer tr("SubMatrix(row)");
49  int a = first_row - 1;
50  if (a<0) Throw(SubMatrixDimensionException());
51  return GetSubMatrix(this, a, 1, 0, -1, false);
52 }
#define REPORT
Definition: submat.cpp:17
friend class GetSubMatrix
Definition: newmat.h:376

◆ Rows()

GetSubMatrix BaseMatrix::Rows ( int  first_row,
int  last_row 
) const

Definition at line 54 of file submat.cpp.

References REPORT.

55 {
56  REPORT
57  Tracer tr("SubMatrix(rows)");
58  int a = first_row - 1; int b = last_row - first_row + 1;
59  if (a<0 || b<0) Throw(SubMatrixDimensionException());
60  // allow zero rows or columns
61  return GetSubMatrix(this, a, b, 0, -1, false);
62 }
#define REPORT
Definition: submat.cpp:17
friend class GetSubMatrix
Definition: newmat.h:376

◆ search()

virtual int BaseMatrix::search ( const BaseMatrix ) const
protectedpure virtual

◆ SubMatrix()

GetSubMatrix BaseMatrix::SubMatrix ( int  first_row,
int  last_row,
int  first_col,
int  last_col 
) const

Definition at line 23 of file submat.cpp.

References REPORT.

25 {
26  REPORT
27  Tracer tr("SubMatrix");
28  int a = first_row - 1; int b = last_row - first_row + 1;
29  int c = first_col - 1; int d = last_col - first_col + 1;
30  if (a<0 || b<0 || c<0 || d<0) Throw(SubMatrixDimensionException());
31  // allow zero rows or columns
32  return GetSubMatrix(this, a, b, c, d, false);
33 }
#define REPORT
Definition: submat.cpp:17
friend class GetSubMatrix
Definition: newmat.h:376

◆ Sum()

Real BaseMatrix::Sum ( ) const
virtual

Reimplemented in IdentityMatrix, SymmetricBandMatrix, BandMatrix, SymmetricMatrix, and GeneralMatrix.

Definition at line 448 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

449 {
450  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
451  Real s = gm->Sum(); return s;
452 }
double Real
Definition: include.h:57
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ SumAbsoluteValue()

Real BaseMatrix::SumAbsoluteValue ( ) const
virtual

Reimplemented in IdentityMatrix, SymmetricBandMatrix, BandMatrix, SymmetricMatrix, and GeneralMatrix.

Definition at line 442 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

443 {
444  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
445  Real s = gm->SumAbsoluteValue(); return s;
446 }
double Real
Definition: include.h:57
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ SumSquare()

Real BaseMatrix::SumSquare ( ) const
virtual

Reimplemented in IdentityMatrix, SymmetricBandMatrix, BandMatrix, SymmetricMatrix, and GeneralMatrix.

Definition at line 433 of file newmat8.cpp.

References GeneralMatrix::Evaluate(), and REPORT.

Referenced by NonLinearLeastSquares::GetHatDiagonal().

434 {
435  REPORT GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate();
436  Real s = gm->SumSquare(); return s;
437 }
double Real
Definition: include.h:57
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21

◆ SymSubMatrix()

GetSubMatrix BaseMatrix::SymSubMatrix ( int  first_row,
int  last_row 
) const

Definition at line 35 of file submat.cpp.

References REPORT.

36 {
37  REPORT
38  Tracer tr("SubMatrix(symmetric)");
39  int a = first_row - 1; int b = last_row - first_row + 1;
40  if (a<0 || b<0) Throw(SubMatrixDimensionException());
41  // allow zero rows or columns
42  return GetSubMatrix( this, a, b, a, b, true);
43 }
#define REPORT
Definition: submat.cpp:17
friend class GetSubMatrix
Definition: newmat.h:376

◆ t()

TransposedMatrix BaseMatrix::t ( ) const

Definition at line 316 of file newmat6.cpp.

References REPORT.

Referenced by DowndateCholesky(), FFT2(), NonLinearLeastSquares::MakeCovariance(), MLE_D_FI::MakeCovariance(), and MLE_D_FI::NextPoint().

317 { REPORT return TransposedMatrix(this); }
#define REPORT
Definition: newmat6.cpp:19
friend class TransposedMatrix
Definition: newmat.h:368

◆ Trace()

Real BaseMatrix::Trace ( ) const
virtual

Reimplemented in IdentityMatrix, SymmetricBandMatrix, BandMatrix, DiagonalMatrix, LowerTriangularMatrix, UpperTriangularMatrix, SymmetricMatrix, and Matrix.

Definition at line 609 of file newmat8.cpp.

References MatrixType::Dg, GeneralMatrix::Evaluate(), REPORT, and Trace().

Referenced by Trace().

610 {
611  REPORT
612  MatrixType Diag = MatrixType::Dg; Diag.SetDataLossOK();
613  GeneralMatrix* gm = ((BaseMatrix&)*this).Evaluate(Diag);
614  Real sum = gm->Trace(); return sum;
615 }
double Real
Definition: include.h:57
GeneralMatrix * Evaluate(MatrixType mt=MatrixTypeUnSp)
Definition: newmat5.cpp:79
#define REPORT
Definition: newmat8.cpp:21
virtual Real Trace() const
Definition: newmat8.cpp:609

Friends And Related Function Documentation

◆ AddedMatrix

friend class AddedMatrix
friend

Definition at line 357 of file newmat.h.

◆ BandMatrix

friend class BandMatrix
friend

Definition at line 353 of file newmat.h.

◆ ColedMatrix

friend class ColedMatrix
friend

Definition at line 373 of file newmat.h.

◆ ColumnVector

friend class ColumnVector
friend

Definition at line 347 of file newmat.h.

◆ ConcatenatedMatrix

friend class ConcatenatedMatrix
friend

Definition at line 362 of file newmat.h.

◆ CroutMatrix

friend class CroutMatrix
friend

Definition at line 352 of file newmat.h.

◆ DiagedMatrix

friend class DiagedMatrix
friend

Definition at line 374 of file newmat.h.

◆ DiagonalMatrix

friend class DiagonalMatrix
friend

Definition at line 351 of file newmat.h.

◆ GeneralMatrix

friend class GeneralMatrix
friend

Definition at line 342 of file newmat.h.

◆ GenericMatrix

friend class GenericMatrix
friend

Definition at line 379 of file newmat.h.

◆ GetSubMatrix

friend class GetSubMatrix
friend

Definition at line 376 of file newmat.h.

◆ InvertedMatrix

friend class InvertedMatrix
friend

Definition at line 371 of file newmat.h.

◆ KPMatrix

friend class KPMatrix
friend

Definition at line 361 of file newmat.h.

◆ LinearEquationSolver

friend class LinearEquationSolver
friend

Definition at line 378 of file newmat.h.

◆ LowerBandMatrix

friend class LowerBandMatrix
friend

Definition at line 354 of file newmat.h.

◆ LowerTriangularMatrix

friend class LowerTriangularMatrix
friend

Definition at line 350 of file newmat.h.

◆ MatedMatrix

friend class MatedMatrix
friend

Definition at line 375 of file newmat.h.

◆ Matrix

friend class Matrix
friend

Definition at line 343 of file newmat.h.

◆ MultipliedMatrix

friend class MultipliedMatrix
friend

Definition at line 358 of file newmat.h.

◆ NegatedMatrix

friend class NegatedMatrix
friend

Definition at line 370 of file newmat.h.

◆ NegShiftedMatrix

friend class NegShiftedMatrix
friend

Definition at line 366 of file newmat.h.

◆ nricMatrix

friend class nricMatrix
friend

Definition at line 345 of file newmat.h.

◆ ReturnMatrix

friend class ReturnMatrix
friend

Definition at line 377 of file newmat.h.

◆ ReversedMatrix

friend class ReversedMatrix
friend

Definition at line 369 of file newmat.h.

◆ RowedMatrix

friend class RowedMatrix
friend

Definition at line 372 of file newmat.h.

◆ RowVector

friend class RowVector
friend

Definition at line 346 of file newmat.h.

◆ ScaledMatrix

friend class ScaledMatrix
friend

Definition at line 367 of file newmat.h.

◆ ShiftedMatrix

friend class ShiftedMatrix
friend

Definition at line 365 of file newmat.h.

◆ SolvedMatrix

friend class SolvedMatrix
friend

Definition at line 364 of file newmat.h.

◆ SPMatrix

friend class SPMatrix
friend

Definition at line 360 of file newmat.h.

◆ SquareMatrix

friend class SquareMatrix
friend

Definition at line 344 of file newmat.h.

◆ StackedMatrix

friend class StackedMatrix
friend

Definition at line 363 of file newmat.h.

◆ SubtractedMatrix

friend class SubtractedMatrix
friend

Definition at line 359 of file newmat.h.

◆ SymmetricBandMatrix

friend class SymmetricBandMatrix
friend

Definition at line 356 of file newmat.h.

◆ SymmetricMatrix

friend class SymmetricMatrix
friend

Definition at line 348 of file newmat.h.

◆ TransposedMatrix

friend class TransposedMatrix
friend

Definition at line 368 of file newmat.h.

◆ UpperBandMatrix

friend class UpperBandMatrix
friend

Definition at line 355 of file newmat.h.

◆ UpperTriangularMatrix

friend class UpperTriangularMatrix
friend

Definition at line 349 of file newmat.h.


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