LRAUV  revA
Mtx Class Reference

#include <Mtx.h>

Inheritance diagram for Mtx:
Collaboration diagram for Mtx:

Classes

union  FloatInt
 

Public Member Functions

 Mtx (Logger &logger, int m=0, int n=0, float initVal=nanf(""), Syslog::Severity severity=Syslog::FAULT)
 
 Mtx (Logger &logger, int m, int n, float *ptr, Syslog::Severity severity=Syslog::FAULT)
 
 Mtx (const char *filename, Logger &logger, Syslog::Severity severity=Syslog::FAULT)
 
 Mtx (const char *filename, Logger &logger, int minN, int maxN, Syslog::Severity severity=Syslog::FAULT)
 
 Mtx (const Mtx &rhs)
 
virtual ~Mtx ()
 
void setSize (int m, int n)
 
void clear ()
 
Mtxoperator= (const Mtx &rhs)
 
Mtxoperator*= (const float rhs)
 
Mtxoperator+= (const Mtx &rhs)
 
Mtxoperator+= (const float rhs)
 
Mtxoperator-= (const Mtx &rhs)
 
Mtx operator* (const Mtx &rhs) const
 
int getM () const
 
virtual int getN () const
 
virtual float ** getPtr2d (void)
 
virtual float * getPtr1d (void)
 
float * operator[] (int index)
 
void set (int indexM, int indexN, float value)
 
void setInt (int indexM, int indexN, int value)
 
float get (int indexM, int indexN) const
 
int getInt (int indexM, int indexN) const
 
void setFromPtr (const int m, const int n, const void *ptr)
 
float operator() (int indexM, int indexN) const
 
Mtx subset (int minM=0, int maxM=-1, int minN=0, int maxN=-1) const
 
bool write (const char *filename, Logger &logger, int minM=0, int maxM=-1, int minN=0, int maxN=-1, Syslog::Severity severity=Syslog::FAULT)
 
bool append (const char *filename, Logger &logger, Syslog::Severity severity=Syslog::FAULT)
 
bool valid () const
 
bool isUnlimitedN () const
 
void setUnlimitedN (bool unlimitedN)
 
bool shellSort (int(&comp)(const Mtx &, int, const Mtx &, int))
 Simple sort routine, invented by Donald Shell 1959. More...
 
- Public Member Functions inherited from I2D< float >
virtual ~I2D ()
 

Static Public Member Functions

static bool CopyValues (const Mtx &src, int srcStartM, int srcStartN, const Mtx &dst, int dstStartM, int dstStartN, int numM, int numN)
 
static int Comp0 (const Mtx &lhs, int lhsJ, const Mtx &rhs, int rhsJ)
 Comparison function for indexM = 0;. More...
 
static int Comp1 (const Mtx &lhs, int lhsJ, const Mtx &rhs, int rhsJ)
 Comparison function for indexM = 1;. More...
 
static int Comp2 (const Mtx &lhs, int lhsJ, const Mtx &rhs, int rhsJ)
 Comparison function for indexM = 2;. More...
 
static int Comp01 (const Mtx &lhs, int lhsJ, const Mtx &rhs, int rhsJ)
 Comparison function for indexM = 0 AND indexM = 1;. More...
 
static int Comp02 (const Mtx &lhs, int lhsJ, const Mtx &rhs, int rhsJ)
 Comparison function for indexM = 0 AND indexM = 2;. More...
 
- Static Public Member Functions inherited from I2D< float >
static float ** New2D (int m, int n, bool extra=false)
 
static void Delete2D (float **array)
 

Protected Member Functions

void prepareValueForModification ()
 
- Protected Member Functions inherited from I2D< float >
 I2D ()
 
 I2D (const I2D &)
 

Protected Attributes

int m_
 
int n_
 
float ** value_
 
Loggerlogger_
 
Syslog::Severity severity_
 
bool unlimitedN_
 

Constructor & Destructor Documentation

Mtx::Mtx ( Logger logger,
int  m = 0,
int  n = 0,
float  initVal = nanf( "" ),
Syslog::Severity  severity = Syslog::FAULT 
)

References setSize(), and value_.

Mtx::Mtx ( Logger logger,
int  m,
int  n,
float *  ptr,
Syslog::Severity  severity = Syslog::FAULT 
)

References setSize(), and value_.

Mtx::Mtx ( const char *  filename,
Logger logger,
Syslog::Severity  severity = Syslog::FAULT 
)
Mtx::Mtx ( const char *  filename,
Logger logger,
int  minN,
int  maxN,
Syslog::Severity  severity = Syslog::FAULT 
)
Mtx::Mtx ( const Mtx rhs)
Mtx::~Mtx ( )
virtual

References clear().

Member Function Documentation

bool Mtx::append ( const char *  filename,
Logger logger,
Syslog::Severity  severity = Syslog::FAULT 
)
void Mtx::clear ( )

References I2D< float >::Delete2D(), m_, n_, and value_.

Referenced by operator=(), setSize(), and ~Mtx().

int Mtx::Comp0 ( const Mtx lhs,
int  lhsJ,
const Mtx rhs,
int  rhsJ 
)
static

Comparison function for indexM = 0;.

References AuvMath::Sign().

Referenced by Comp01(), and Comp02().

int Mtx::Comp01 ( const Mtx lhs,
int  lhsJ,
const Mtx rhs,
int  rhsJ 
)
static

Comparison function for indexM = 0 AND indexM = 1;.

References Comp0(), and Comp1().

Referenced by Mtx_Test::testShellSort().

int Mtx::Comp02 ( const Mtx lhs,
int  lhsJ,
const Mtx rhs,
int  rhsJ 
)
static

Comparison function for indexM = 0 AND indexM = 2;.

References Comp0(), and Comp2().

Referenced by Mtx_Test::testShellSort().

int Mtx::Comp1 ( const Mtx lhs,
int  lhsJ,
const Mtx rhs,
int  rhsJ 
)
static

Comparison function for indexM = 1;.

References AuvMath::Sign().

Referenced by Comp01(), and Mtx_Test::testShellSort().

int Mtx::Comp2 ( const Mtx lhs,
int  lhsJ,
const Mtx rhs,
int  rhsJ 
)
static

Comparison function for indexM = 2;.

References AuvMath::Sign().

Referenced by Comp02(), and NavChartDb::doIndexing().

bool Mtx::CopyValues ( const Mtx src,
int  srcStartM,
int  srcStartN,
const Mtx dst,
int  dstStartM,
int  dstStartN,
int  numM,
int  numN 
)
static

References m_, n_, and value_.

Referenced by shellSort().

float Mtx::get ( int  indexM,
int  indexN 
) const
inline
int Mtx::getInt ( int  indexM,
int  indexN 
) const
inline
virtual float* Mtx::getPtr1d ( void  )
inlinevirtual

Implements I2D< float >.

References value_.

virtual float** Mtx::getPtr2d ( void  )
inlinevirtual

Implements I2D< float >.

References value_.

bool Mtx::isUnlimitedN ( ) const
inline

References unlimitedN_.

Referenced by MtxOutStream::write(), and MtxIOStream::write().

float Mtx::operator() ( int  indexM,
int  indexN 
) const
inline

References m_, n_, and value_.

Mtx Mtx::operator* ( const Mtx rhs) const
Mtx & Mtx::operator*= ( const float  rhs)
Mtx & Mtx::operator+= ( const Mtx rhs)
Mtx & Mtx::operator+= ( const float  rhs)
Mtx & Mtx::operator-= ( const Mtx rhs)
Mtx & Mtx::operator= ( const Mtx rhs)

References clear(), m_, n_, and value_.

float* Mtx::operator[] ( int  index)
inline
void Mtx::prepareValueForModification ( )
protected

References m_, n_, setSize(), and value_.

Referenced by operator*=(), operator+=(), operator-=(), and operator[]().

void Mtx::setFromPtr ( const int  m,
const int  n,
const void *  ptr 
)
inline

References setSize(), and value_.

Referenced by Rowe_600::readMATv4float32().

void Mtx::setInt ( int  indexM,
int  indexN,
int  value 
)
inline
void Mtx::setSize ( int  m,
int  n 
)
void Mtx::setUnlimitedN ( bool  unlimitedN)
inline

References unlimitedN_.

bool Mtx::shellSort ( int(&)(const Mtx &, int, const Mtx &, int)  comp)

Simple sort routine, invented by Donald Shell 1959.

Returns true if the data is modified.

Returns true if the data is modified. Improved with gap sequence by Ciura. It is better than O(n^[4/3]). See Ciura, Marcin (2001). "Best Increments for the Average Case of Shellsort". In Freiwalds, Rusins. Proceedings of the 13th International Symposium on Fundamentals of Computation Theory. London: Springer-Verlag. pp. 106–117. ISBN 3-540-42487-3.

References CopyValues(), logger_, m_, n_, and severity_.

Referenced by Mtx_Test::testShellSort().

Mtx Mtx::subset ( int  minM = 0,
int  maxM = -1,
int  minN = 0,
int  maxN = -1 
) const
bool Mtx::valid ( ) const
inline

References m_, and n_.

bool Mtx::write ( const char *  filename,
Logger logger,
int  minM = 0,
int  maxM = -1,
int  minN = 0,
int  maxN = -1,
Syslog::Severity  severity = Syslog::FAULT 
)

Member Data Documentation

Logger& Mtx::logger_
protected
Syslog::Severity Mtx::severity_
protected
bool Mtx::unlimitedN_
protected

Referenced by isUnlimitedN(), and setUnlimitedN().


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