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

#include <newmatrm.h>

Inheritance diagram for RectMatrixCol:
RectMatrixRowCol

Public Member Functions

 RectMatrixCol (const Matrix &, int, int, int)
 
 RectMatrixCol (const Matrix &, int)
 
void Reset (const Matrix &, int, int, int)
 
void Reset (const Matrix &, int)
 
void Down ()
 
void Right ()
 
void Up ()
 
void Left ()
 
- Public Member Functions inherited from RectMatrixRowCol
Real operator* (const RectMatrixRowCol &) const
 
void AddScaled (const RectMatrixRowCol &, Real)
 
void Divide (const RectMatrixRowCol &, Real)
 
void Divide (Real)
 
void Negate ()
 
void Zero ()
 
Real & operator[] (int i)
 
Real SumSquare () const
 
Real & First ()
 
void DownDiag ()
 
void UpDiag ()
 

Friends

void ComplexScale (RectMatrixCol &, RectMatrixCol &, Real, Real)
 
void Rotate (RectMatrixCol &, RectMatrixCol &, Real, Real)
 

Additional Inherited Members

- Protected Member Functions inherited from RectMatrixRowCol
 RectMatrixRowCol (Real *st, int nx, int sp, int sh)
 
void Reset (Real *st, int nx, int sp, int sh)
 
- Protected Attributes inherited from RectMatrixRowCol
Real * store
 
int n
 
int spacing
 
int shift
 

Detailed Description

Definition at line 63 of file newmatrm.h.

Constructor & Destructor Documentation

◆ RectMatrixCol() [1/2]

RectMatrixCol::RectMatrixCol ( const Matrix M,
int  skip,
int  col,
int  length 
)
inline

Definition at line 101 of file newmatrm.h.

102  : RectMatrixRowCol( M.Store()+col+skip*M.Ncols(), length, M.Ncols(), 1 ) {}
int Ncols() const
Definition: newmat.h:431
RectMatrixRowCol(Real *st, int nx, int sp, int sh)
Definition: newmatrm.h:27
Real * Store() const
Definition: newmat.h:433

◆ RectMatrixCol() [2/2]

RectMatrixCol::RectMatrixCol ( const Matrix M,
int  col 
)
inline

Definition at line 104 of file newmatrm.h.

105  : RectMatrixRowCol( M.Store()+col, M.Nrows(), M.Ncols(), 1 ) {}
int Ncols() const
Definition: newmat.h:431
RectMatrixRowCol(Real *st, int nx, int sp, int sh)
Definition: newmatrm.h:27
int Nrows() const
Definition: newmat.h:430
Real * Store() const
Definition: newmat.h:433

Member Function Documentation

◆ Down()

void RectMatrixCol::Down ( )
inline

Definition at line 70 of file newmatrm.h.

References n.

Referenced by SVD().

70 { store += spacing; n--; }
Real * store
Definition: newmatrm.h:23

◆ Left()

void RectMatrixCol::Left ( )
inline

Definition at line 73 of file newmatrm.h.

Referenced by SVD().

73 { store--; }
Real * store
Definition: newmatrm.h:23

◆ Reset() [1/2]

void RectMatrixCol::Reset ( const Matrix M,
int  skip,
int  col,
int  length 
)

Definition at line 38 of file newmatrm.cpp.

References GeneralMatrix::Ncols(), REPORT, RectMatrixRowCol::Reset(), and GeneralMatrix::Store().

39 {
40  REPORT
42  ( M.Store()+col+skip*M.Ncols(), length, M.Ncols(), 1 );
43 }
void Reset(Real *st, int nx, int sp, int sh)
Definition: newmatrm.h:29
int Ncols() const
Definition: newmat.h:431
Real * Store() const
Definition: newmat.h:433
#define REPORT
Definition: newmatrm.cpp:18

◆ Reset() [2/2]

void RectMatrixCol::Reset ( const Matrix M,
int  col 
)

Definition at line 45 of file newmatrm.cpp.

References GeneralMatrix::Ncols(), GeneralMatrix::Nrows(), REPORT, RectMatrixRowCol::Reset(), and GeneralMatrix::Store().

46 {
47  REPORT
48  RectMatrixRowCol::Reset( M.Store()+col, M.Nrows(), M.Ncols(), 1 );
49 }
void Reset(Real *st, int nx, int sp, int sh)
Definition: newmatrm.h:29
int Ncols() const
Definition: newmat.h:431
int Nrows() const
Definition: newmat.h:430
Real * Store() const
Definition: newmat.h:433
#define REPORT
Definition: newmatrm.cpp:18

◆ Right()

void RectMatrixCol::Right ( )
inline

Definition at line 71 of file newmatrm.h.

Referenced by SVD().

71 { store++; }
Real * store
Definition: newmatrm.h:23

◆ Up()

void RectMatrixCol::Up ( )
inline

Definition at line 72 of file newmatrm.h.

References n.

Referenced by SVD().

72 { store -= spacing; n++; }
Real * store
Definition: newmatrm.h:23

Friends And Related Function Documentation

◆ ComplexScale

void ComplexScale ( RectMatrixCol U,
RectMatrixCol V,
Real  x,
Real  y 
)
friend

Definition at line 132 of file newmatrm.cpp.

133 {
134  REPORT
135  int n = U.n;
136  if (n != V.n)
137  {
138  Tracer tr("newmatrm");
139  Throw(InternalException("Dimensions differ in ComplexScale"));
140  }
141  Real* u = U.store; Real* v = V.store;
142  int su = U.spacing; int sv = V.spacing;
143  //while (n--)
144  //{
145  // Real z = *u * x - *v * y; *v = *u * y + *v * x; *u = z;
146  // u += su; v += sv;
147  //}
148  if (n) for (;;)
149  {
150  Real z = *u * x - *v * y; *v = *u * y + *v * x; *u = z;
151  if (!(--n)) break;
152  u += su; v += sv;
153  }
154 }
ossim_uint32 x
double Real
Definition: include.h:57
ossim_uint32 y
Real * store
Definition: newmatrm.h:23
#define REPORT
Definition: newmatrm.cpp:18

◆ Rotate

void Rotate ( RectMatrixCol U,
RectMatrixCol V,
Real  tau,
Real  s 
)
friend

Definition at line 156 of file newmatrm.cpp.

157 {
158  REPORT
159  // (U, V) = (U, V) * (c, s) where tau = s/(1+c), c^2 + s^2 = 1
160  int n = U.n;
161  if (n != V.n)
162  {
163  Tracer tr("newmatrm");
164  Throw(InternalException("Dimensions differ in Rotate"));
165  }
166  Real* u = U.store; Real* v = V.store;
167  int su = U.spacing; int sv = V.spacing;
168  //while (n--)
169  //{
170  // Real zu = *u; Real zv = *v;
171  // *u -= s * (zv + zu * tau); *v += s * (zu - zv * tau);
172  // u += su; v += sv;
173  //}
174  if (n) for(;;)
175  {
176  Real zu = *u; Real zv = *v;
177  *u -= s * (zv + zu * tau); *v += s * (zu - zv * tau);
178  if (!(--n)) break;
179  u += su; v += sv;
180  }
181 }
double Real
Definition: include.h:57
Real * store
Definition: newmatrm.h:23
#define REPORT
Definition: newmatrm.cpp:18

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