32#include "DGtal/base/Common.h" 
   34#include "DGtal/kernel/NumberTraits.h" 
   35#include "DGtal/geometry/tools/determinant/C2x2DetComputer.h" 
   36#include "DGtal/geometry/tools/determinant/Simple2x2DetComputer.h" 
   37#include "DGtal/geometry/tools/determinant/SimpleIncremental2x2DetComputer.h" 
   38#include "DGtal/geometry/tools/determinant/AvnaimEtAl2x2DetSignComputer.h" 
   39#include "DGtal/geometry/tools/determinant/Filtered2x2DetComputer.h" 
   55template<
typename DetComputer>
 
   59  typedef typename DetComputer::Integer 
Integer; 
 
   60  typedef typename DetComputer::Value 
Value; 
 
   62  unsigned int nbok = 0;
 
   77  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
   82  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
   87  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
   94  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
   99  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
  104  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
  107  aComputer.init(-a,-b); 
 
  111  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
  116  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
  121  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
  124  aComputer.init(a,-b); 
 
  128  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
  133  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
  138  trace.
info() << 
"(" << nbok << 
"/" << nb << 
") " << endl;
 
 
  158template <
typename I1, 
typename I2>
 
  192    return ((rand() % 2) ? x : -x);
 
 
  204template<
typename DetComputer>
 
  210  TrueComputer trueComputer; 
 
  213  trace.
info() << trueComputer << 
" vs " << aComputer << endl; 
 
  220  for (
int i = 0; ( (i < n)&&(isOk) ); ++i)
 
  226      trueComputer.init(a, b); 
 
  227      aComputer.init(a, b);
 
  228      TrueComputer::Value trueRes = trueComputer(x,y);  
 
  229      typename DetComputer::Value res = aComputer(x,y);
 
 
  245int main( 
int argc, 
char** argv )
 
  249  for ( 
int i = 0; i < argc; ++i )
 
  259#ifdef WITH_BIGINTEGER 
  264#ifdef WITH_BIGINTEGER 
  273#ifdef WITH_BIGINTEGER 
  281  trace.
emphase() << ( res ? 
"Passed." : 
"Error." ) << endl;
 
 
Aim: Class that provides a way of computing the sign of the determinant of a 2x2 matrix from its four...
 
Aim: Small class useful to compute the determinant of a 2x2 matrix from its four coefficients,...
 
Aim: Small class useful to compute, in an incremental way, the determinant of a 2x2 matrix from its f...
 
void beginBlock(const std::string &keyword="")
 
Point::Coordinate Integer
 
DGtal is the top-level namespace which contains all DGtal functions and types.
 
boost::int32_t int32_t
signed 32-bit integer.
 
Aim: This concept gathers all models that are able to compute the (sign of the) determinant of a 2x2 ...
 
Aim: The traits class for all models of Cinteger.
 
DGtal::int32_t adHocRandom()
 
bool hasTheSameSign(I1 x1, I2 x2)
 
bool randomTest2x2DetComputer(DetComputer aComputer)
 
bool simpleTest2x2DetComputer(DetComputer aComputer)
 
DGtal::int32_t randomBelow2exp15()