DGtal  1.3.beta
testImplicitFunctionModels.cpp
Go to the documentation of this file.
1 
30 #include <iostream>
32 #include "DGtal/base/Common.h"
33 #include "DGtal/shapes/implicit/ImplicitBall.h"
34 #include "DGtal/shapes/implicit/ImplicitNorm1Ball.h"
35 #include "DGtal/shapes/implicit/ImplicitHyperCube.h"
36 #include "DGtal/shapes/implicit/ImplicitRoundedHyperCube.h"
37 #include "DGtal/shapes/implicit/ImplicitPolynomial3Shape.h"
38 #include "DGtal/shapes/implicit/CImplicitFunction.h"
39 #include "DGtal/shapes/implicit/CImplicitFunctionDiff1.h"
40 #include "DGtal/helpers/StdDefs.h"
41 
43 
44 using namespace std;
45 using namespace DGtal;
46 
48 // Functions for testing class ImplicitFunctionModels.
50 
51 
52 
57 {
58  typedef ImplicitBall<Z2i::Space> _ImplicitBall2D;
59  typedef ImplicitBall<Z3i::Space> _ImplicitBall3D;
60  typedef ImplicitNorm1Ball<Z2i::Space> _ImplicitNorm1Ball2D;
61  typedef ImplicitNorm1Ball<Z3i::Space> _ImplicitNorm1Ball3D;
62  typedef ImplicitHyperCube<Z2i::Space> _ImplicitHyperCube2D;
63  typedef ImplicitHyperCube<Z3i::Space> _ImplicitHyperCube3D;
64  typedef ImplicitRoundedHyperCube<Z2i::Space> _ImplicitRoundedHyperCube2D;
65  typedef ImplicitRoundedHyperCube<Z3i::Space> _ImplicitRoundedHyperCube3D;
66  typedef ImplicitPolynomial3Shape<Z3i::Space> _ImplicitPolynomial3Shape;
67  BOOST_CONCEPT_ASSERT(( concepts::CImplicitFunction< _ImplicitBall2D > ));
68  BOOST_CONCEPT_ASSERT(( concepts::CImplicitFunction< _ImplicitBall3D > ));
76  //BOOST_CONCEPT_ASSERT(( CImplicitFunctionDiff1< _ImplicitBall2D > ));
78  return true;
79 }
80 
82 // Standard services - public :
83 
84 int main( int /*argc*/, char** /*argv*/ )
85 {
86  trace.beginBlock ( "Testing class ImplicitFunctionModels" );
87  bool res = testImplicitFunctionModels(); // && ... other tests
88  trace.emphase() << ( res ? "Passed." : "Error." ) << endl;
89  trace.endBlock();
90  return res ? 0 : 1;
91 }
92 // //
DGtal::ImplicitHyperCube
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create an hypercube in n...
Definition: ImplicitHyperCube.h:59
DGtal::Trace::endBlock
double endBlock()
DGtal::concepts::CImplicitFunctionDiff1
Aim: Describes a 1-differentiable function of the form f(x), where x is some real point in the given ...
Definition: CImplicitFunctionDiff1.h:92
DGtal::ImplicitRoundedHyperCube
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a rounded hypercu...
Definition: ImplicitRoundedHyperCube.h:62
DGtal::Trace::emphase
std::ostream & emphase()
DGtal::trace
Trace trace
Definition: Common.h:154
DGtal::Trace::beginBlock
void beginBlock(const std::string &keyword="")
DGtal::ImplicitNorm1Ball
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball for the L_...
Definition: ImplicitNorm1Ball.h:59
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::ImplicitBall
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball in nD....
Definition: ImplicitBall.h:64
DGtal::concepts::CImplicitFunction
Aim: Describes any function of the form f(x), where x is some real point in the given space,...
Definition: CImplicitFunction.h:89
DGtal::ImplicitPolynomial3Shape
Aim: model of CEuclideanOrientedShape concepts to create a shape from a polynomial.
Definition: ImplicitPolynomial3Shape.h:67
main
int main(int, char **)
Definition: testImplicitFunctionModels.cpp:84
testImplicitFunctionModels
bool testImplicitFunctionModels()
Definition: testImplicitFunctionModels.cpp:56