KSquare Utilities
KKB::Row Class Reference

#include <Matrix.h>

Public Member Functions

 Row ()
 
 Row (kkint32 _numOfCols, double *_cells)
 
 Row (const Row &_row)
 
 ~Row ()
 
double * Cols ()
 
void Define (kkint32 _numOfCols, double *_cells)
 
double & operator[] (kkint32 idx)
 

Detailed Description

Definition at line 183 of file Matrix.h.

Constructor & Destructor Documentation

Row::Row ( )

Definition at line 26 of file Matrix.cpp.

26  :
27  cells (NULL),
28  numOfCols (-1)
29 {
30 }
Row::Row ( kkint32  _numOfCols,
double *  _cells 
)

Definition at line 34 of file Matrix.cpp.

References KKB::KKStr::Concat(), and KKB::KKException::KKException().

36  :
37  cells (_cells),
38  numOfCols (_numOfCols)
39 {
40  if (_numOfCols < 0)
41  {
42  KKStr msg;
43  msg << "Row::Row **** ERROR **** Invalid Dimension[" << _numOfCols << "].";
44  cerr << std::endl << msg << std::endl << std::endl;
45  throw KKException (msg);
46  }
47 }
HTMLReport &__cdecl endl(HTMLReport &htmlReport)
Definition: HTMLReport.cpp:240
Row::Row ( const Row _row)

Definition at line 51 of file Matrix.cpp.

51  :
52  cells (_row.cells),
53  numOfCols (_row.numOfCols)
54 {
55 }
Row::~Row ( )

Definition at line 59 of file Matrix.cpp.

60 {
61  cells = NULL;
62 }

Member Function Documentation

double* KKB::Row::Cols ( )
inline

Definition at line 197 of file Matrix.h.

197 {return cells;}
void Row::Define ( kkint32  _numOfCols,
double *  _cells 
)

Definition at line 66 of file Matrix.cpp.

69 {
70  numOfCols = _numOfCols;
71  cells = _cells;
72 }
double & Row::operator[] ( kkint32  idx)

Definition at line 76 of file Matrix.cpp.

References KKB::osWaitForEnter().

Referenced by KKB::Raster::BuildGaussian2dKernel(), KKB::Matrix::CalcCoFactorMatrix(), KKB::Matrix::Covariance(), KKB::Raster::CreateGrayScaleKLT(), KKB::Raster::CreateGrayScaleKLTOnMaskedArea(), KKMLL::ClassificationBiasMatrix::PerformAdjustmnts(), and KKMLL::ClassificationBiasMatrix::PrintBiasMatrix().

77 {
78  if ((idx < 0) || (idx >= numOfCols))
79  {
80  cerr << std::endl
81  << "Row::operator[] **** ERROR ****, Index["
82  << idx << "] out of range of [0-" << numOfCols << "]."
83  << std::endl;
84  osWaitForEnter ();
85  exit (1);
86  }
87 
88  return cells[idx];
89 } /* Row::operator[] */
HTMLReport &__cdecl endl(HTMLReport &htmlReport)
Definition: HTMLReport.cpp:240
void osWaitForEnter()

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