Back to index

salome-med  6.5.0
Public Member Functions | Public Attributes
INTERP_TEST::InterpolationPlanarTestSuite Class Reference

Base class for planar mesh intersection test suites. More...

#include <InterpolationPlanarTestSuite.hxx>

Inheritance diagram for INTERP_TEST::InterpolationPlanarTestSuite:
Inheritance graph
[legend]
Collaboration diagram for INTERP_TEST::InterpolationPlanarTestSuite:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void setUp ()
 Sets up the test suite.
void tearDown ()
bool checkDequesEqual (std::deque< double > deque1, std::deque< double > deque2, double epsilon)
bool checkVectorsEqual (std::vector< double > vect1, std::vector< double > vect2, double epsilon)
void dequePrintOut (std::deque< double > deque1)
void vectPrintOut (std::vector< double > vect)
void tabPrintOut (const double *tab, int size)

Public Attributes

double _Epsilon
double _Precision

Detailed Description

Base class for planar mesh intersection test suites.

Definition at line 35 of file InterpolationPlanarTestSuite.hxx.


Member Function Documentation

bool INTERP_TEST::InterpolationPlanarTestSuite::checkDequesEqual ( std::deque< double >  deque1,
std::deque< double >  deque2,
double  epsilon 
) [inline]

Definition at line 59 of file InterpolationPlanarTestSuite.hxx.

    {
      int size1 = deque1.size();
      int size2 = deque2.size();
      bool are_equal = size1 == size2;
    
      if(are_equal)
        for(int i = 0; i < size1 && are_equal; i++)
          are_equal = fabs(deque1[i] - deque2[i]) < epsilon;
      
      return are_equal; 
    }
bool INTERP_TEST::InterpolationPlanarTestSuite::checkVectorsEqual ( std::vector< double >  vect1,
std::vector< double >  vect2,
double  epsilon 
) [inline]

Definition at line 72 of file InterpolationPlanarTestSuite.hxx.

    {
      int size1 = vect1.size();
      int size2 = vect2.size();
      bool are_equal = size1 == size2;
      
      if(are_equal)
        for(int i = 0; i < size1 && are_equal; i++)
          are_equal = fabs(vect1[i] - vect2[i]) < epsilon;
      
      return are_equal; 
    }
void INTERP_TEST::InterpolationPlanarTestSuite::dequePrintOut ( std::deque< double >  deque1) [inline]

Definition at line 85 of file InterpolationPlanarTestSuite.hxx.

    {
      for(int i = 0; i< (int)deque1.size(); i++)
        {
          std::cerr << deque1[i] << " ";
        }
      std::cerr<< std::endl;
    }
void INTERP_TEST::InterpolationPlanarTestSuite::tabPrintOut ( const double *  tab,
int  size 
) [inline]

Definition at line 101 of file InterpolationPlanarTestSuite.hxx.

    {
      for(int i = 0; i< size; i++)
        {
          std::cerr << tab[i] << " ";
        }
      std::cerr<< std::endl;
    }  
void INTERP_TEST::InterpolationPlanarTestSuite::vectPrintOut ( std::vector< double >  vect) [inline]

Definition at line 93 of file InterpolationPlanarTestSuite.hxx.

    {
      for(int i = 0; i< (int)vect.size(); i++)
        {
          std::cerr << vect[i] << " ";
        }
      std::cerr<< std::endl;
    }  

Member Data Documentation

Definition at line 39 of file InterpolationPlanarTestSuite.hxx.

Definition at line 40 of file InterpolationPlanarTestSuite.hxx.


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