DGtal 1.3.0
Loading...
Searching...
No Matches
testImplicitFunctionModels.cpp
Go to the documentation of this file.
1
31#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
44using namespace std;
45using 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
84int 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;
90 return res ? 0 : 1;
91}
92// //
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball in nD....
Definition: ImplicitBall.h:65
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create an hypercube in n...
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball for the L_...
Aim: model of CEuclideanOrientedShape concepts to create a shape from a polynomial.
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a rounded hypercu...
void beginBlock(const std::string &keyword="")
std::ostream & emphase()
double endBlock()
DGtal is the top-level namespace which contains all DGtal functions and types.
Trace trace
Definition: Common.h:154
STL namespace.
Aim: Describes a 1-differentiable function of the form f(x), where x is some real point in the given ...
Aim: Describes any function of the form f(x), where x is some real point in the given space,...
int main()
Definition: testBits.cpp:56
bool testImplicitFunctionModels()