36 #ifndef ___C_MATRIX_2D_H__
37 #define ___C_MATRIX_2D_H__
53 template <
class tValue>
82 cMatrix2D(
unsigned long ulInSizeX,
unsigned long ulInSizeY,
83 const tValue & initValue = 0 );
101 tValue &
get(
unsigned long ulX,
unsigned long ulY );
112 const tValue &
get(
unsigned long ulX,
unsigned long ulY )
const;
123 bool set(
unsigned long ulX,
unsigned long ulY,
const tValue & value );
129 pair< unsigned long, unsigned long > size()
const;
136 void resize(
unsigned long ulInSizeX,
unsigned long ulInSizeY,
137 const tValue & initValue = 0 );
251 unsigned long count(
bool condition(
const tValue & ) )
const;
256 unsigned long countNull()
const;
263 cMatrix2D<bool> evalueCondition(
bool condition(
const tValue & ) )
const;
270 void print( ostream & outStream )
const;
286 const double SAVE_BOUNDERY = 0.0000000001;
287 const double SAVE_BOUNDERY_NEG = SAVE_BOUNDERY * -1.0;
288 return ( (SAVE_BOUNDERY_NEG < value) && (value < SAVE_BOUNDERY) );
297 const long double SAVE_BOUNDERY = 0.0000000001;
298 const long double SAVE_BOUNDERY_NEG = SAVE_BOUNDERY * -1.0;
299 return ( (SAVE_BOUNDERY_NEG < value) && (value < SAVE_BOUNDERY) );
307 static bool isNull(
const tValue & value ){
309 return ( value == 0 );
320 #define ___C_MATRIX_2D_H_INCLUDE__
322 #include "../src/cMatrix2D.cpp"
323 #undef ___C_MATRIX_2D_H_INCLUDE__
325 #endif //___C_MATRIX_2D_H__