DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
testImplicitFunctionModels.cpp
Go to the documentation of this file.
1
16
29
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
44
using namespace
std
;
45
using namespace
DGtal
;
46
48
// Functions for testing class ImplicitFunctionModels.
50
51
52
56
bool
testImplicitFunctionModels
()
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 >
));
69
BOOST_CONCEPT_ASSERT((
concepts::CImplicitFunction< _ImplicitNorm1Ball2D >
));
70
BOOST_CONCEPT_ASSERT((
concepts::CImplicitFunction< _ImplicitNorm1Ball3D >
));
71
BOOST_CONCEPT_ASSERT((
concepts::CImplicitFunction< _ImplicitHyperCube2D >
));
72
BOOST_CONCEPT_ASSERT((
concepts::CImplicitFunction< _ImplicitHyperCube3D >
));
73
BOOST_CONCEPT_ASSERT((
concepts::CImplicitFunction< _ImplicitRoundedHyperCube2D >
));
74
BOOST_CONCEPT_ASSERT((
concepts::CImplicitFunction< _ImplicitRoundedHyperCube3D >
));
75
BOOST_CONCEPT_ASSERT((
concepts::CImplicitFunction< _ImplicitPolynomial3Shape >
));
76
//BOOST_CONCEPT_ASSERT(( CImplicitFunctionDiff1< _ImplicitBall2D > ));
77
BOOST_CONCEPT_ASSERT((
concepts::CImplicitFunctionDiff1< _ImplicitPolynomial3Shape >
));
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::ImplicitBall
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball in nD....
Definition
ImplicitBall.h:65
DGtal::ImplicitHyperCube
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create an hypercube in n...
Definition
ImplicitHyperCube.h:60
DGtal::ImplicitNorm1Ball
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball for the L_...
Definition
ImplicitNorm1Ball.h:60
DGtal::ImplicitPolynomial3Shape
Aim: model of CEuclideanOrientedShape concepts to create a shape from a polynomial.
Definition
ImplicitPolynomial3Shape.h:68
DGtal::ImplicitRoundedHyperCube
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a rounded hypercu...
Definition
ImplicitRoundedHyperCube.h:63
DGtal::Trace::beginBlock
void beginBlock(const std::string &keyword="")
DGtal::Trace::emphase
std::ostream & emphase()
DGtal::Trace::endBlock
double endBlock()
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::trace
Trace trace
std
STL namespace.
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:93
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:90
testImplicitFunctionModels
bool testImplicitFunctionModels()
Definition
testImplicitFunctionModels.cpp:56
main
int main(int, char **)
Definition
testIntegerComputer.cpp:331
tests
shapes
testImplicitFunctionModels.cpp
Generated on
for DGtal by
1.18.0