DGtal 1.3.0
Loading...
Searching...
No Matches
ClosedIntegerHalfPlane.h
1
17#pragma once
18
31#if defined(ClosedIntegerHalfPlane_RECURSES)
32#error Recursive header files inclusion detected in ClosedIntegerHalfPlane.h
33#else // defined(ClosedIntegerHalfPlane_RECURSES)
35#define ClosedIntegerHalfPlane_RECURSES
36
37#if !defined ClosedIntegerHalfPlane_h
39#define ClosedIntegerHalfPlane_h
40
42// Inclusions
43#include <iostream>
44#include "DGtal/base/Common.h"
45#include "DGtal/kernel/CSpace.h"
47
48namespace DGtal
49{
50
52 // template class ClosedIntegerHalfPlane
62 template <typename TSpace>
64 {
67
68 typedef TSpace Space;
69 typedef typename Space::Integer Integer;
70 typedef typename Space::Point Point;
71 typedef typename Space::Vector Vector;
72
73 // ----------------------- public data ------------------------------
74 public:
75
78
79 protected:
80 // ----------------------- Standard services ------------------------------
81 public:
90
97 ClosedIntegerHalfPlane( const Vector & aN, const Integer & aC );
98
109 ClosedIntegerHalfPlane( const Point & A, const Point & B,
110 const Point & inP, IntegerComputer<Integer> & ic );
111
116 bool operator()( const Point & p ) const;
117
122 bool isOnBoundary( const Point & p ) const;
123
128
132 void negate();
133
134 // ----------------------- Interface --------------------------------------
135 public:
136
141 void selfDisplay ( std::ostream & out ) const;
142
147 bool isValid() const;
148
149 // ------------------------- Protected Datas ------------------------------
150 private:
151 // ------------------------- Private Datas --------------------------------
152 private:
153
154
155 }; // end of class ClosedIntegerHalfPlane
156
157
164 template <typename TSpace>
165 std::ostream&
166 operator<< ( std::ostream & out, const ClosedIntegerHalfPlane<TSpace> & object );
167
168} // namespace DGtal
169
170
172// Includes inline functions.
173#include "DGtal/arithmetic/ClosedIntegerHalfPlane.ih"
174
175// //
177
178#endif // !defined ClosedIntegerHalfPlane_h
179
180#undef ClosedIntegerHalfPlane_RECURSES
181#endif // else defined(ClosedIntegerHalfPlane_RECURSES)
Aim: This class gathers several types and methods to make computation with integers.
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: A half-space specified by a vector N and a constant c. The half-space is the set .
ClosedIntegerHalfPlane< TSpace > Self
bool isOnBoundary(const Point &p) const
Vector N
The normal to the half-space.
bool operator()(const Point &p) const
ClosedIntegerHalfPlane(const Vector &aN, const Integer &aC)
ClosedIntegerHalfPlane(const Point &A, const Point &B, const Point &inP, IntegerComputer< Integer > &ic)
Integer c
The uppermost value N.(x,y) that is in the half-space.
void selfDisplay(std::ostream &out) const
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition: CSpace.h:106