DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
Measure.h
1
16
17
#pragma once
18
33
34
#if defined(Measure_RECURSES)
35
#error Recursive header files inclusion detected in Measure.h
36
#else
// defined(Measure_RECURSES)
38
#define Measure_RECURSES
39
40
#if !defined Measure_h
42
#define Measure_h
43
45
// Inclusions
46
#include <iostream>
47
#include "DGtal/base/Common.h"
48
#include "DGtal/kernel/sets/CDigitalSet.h"
49
#include "DGtal/base/CowPtr.h"
50
52
53
namespace
DGtal
54
{
55
57
// template class Measure
70
template
<
typename
TSet >
71
class
Measure
72
{
73
// ----------------------- Standard services ------------------------------
74
public
:
75
76
typedef
TSet
Set
;
77
typedef
typename
TSet::Domain
Domain
;
78
79
// Does not work
80
//BOOST_CONCEPT_ASSERT(( CDigitalSet<TSet> ));
81
82
typedef
double
Quantity
;
83
87
Measure
();
88
92
~Measure
();
93
100
void
init
(
const
double
h,
const
Set
&aSetPointer);
101
102
112
Quantity
eval
()
const
;
113
114
115
// ----------------------- Interface --------------------------------------
116
public
:
117
122
void
selfDisplay
( std::ostream & out )
const
;
123
128
bool
isValid
()
const
;
129
130
131
132
// ------------------------- Hidden services ------------------------------
133
protected
:
134
135
private
:
136
142
Measure
(
const
Measure
& other );
143
150
Measure
&
operator=
(
const
Measure
& other );
151
152
// ------------------------- Internals ------------------------------------
153
private
:
154
156
double
myH
;
157
159
typename
Set::Size
mySetSize
;
160
162
double
myIsInitBefore
;
163
164
165
};
// end of class Measure
166
167
174
template
<
typename
T>
175
std::ostream&
176
operator<<
( std::ostream & out,
const
Measure<T>
&
object
);
177
178
}
// namespace DGtal
179
180
182
// Includes inline functions.
183
#include "DGtal/geometry/volumes/estimation/Measure.ih"
184
185
// //
187
188
#endif
// !defined Measure_h
189
190
#undef Measure_RECURSES
191
#endif
// else defined(Measure_RECURSES)
DGtal::Measure
Aim: Implements a simple measure computation (in the Lesbegue sens) of a set. In dimension 2,...
Definition
Measure.h:72
DGtal::Measure::operator=
Measure & operator=(const Measure &other)
DGtal::Measure::myH
double myH
grid resolution parameter.
Definition
Measure.h:156
DGtal::Measure::eval
Quantity eval() const
DGtal::Measure::mySetSize
Set::Size mySetSize
Copy of the set size.
Definition
Measure.h:159
DGtal::Measure::myIsInitBefore
double myIsInitBefore
Boolean to assert that the init() was called before the eval().
Definition
Measure.h:162
DGtal::Measure::Set
TSet Set
Definition
Measure.h:76
DGtal::Measure::isValid
bool isValid() const
DGtal::Measure::Quantity
double Quantity
Definition
Measure.h:82
DGtal::Measure::~Measure
~Measure()
DGtal::Measure::Domain
TSet::Domain Domain
Definition
Measure.h:77
DGtal::Measure::Measure
Measure()
DGtal::Measure::init
void init(const double h, const Set &aSetPointer)
DGtal::Measure::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::Measure::Measure
Measure(const Measure &other)
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
src
DGtal
geometry
volumes
estimation
Measure.h
Generated on
for DGtal by
1.18.0