DGtal  1.1.0
DGtal::ClosedIntegerHalfPlane< TSpace > Struct Template Reference

Aim: A half-space specified by a vector N and a constant c. The half-space is the set $$\{ P \in Z^2, N.P \le c \}$$. More...

#include <DGtal/arithmetic/ClosedIntegerHalfPlane.h>

Collaboration diagram for DGtal::ClosedIntegerHalfPlane< TSpace >:
[legend]

## Public Types

typedef ClosedIntegerHalfPlane< TSpace > Self

typedef TSpace Space

typedef Space::Integer Integer

typedef Space::Point Point

typedef Space::Vector Vector

## Public Member Functions

BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))

~ClosedIntegerHalfPlane ()

ClosedIntegerHalfPlane (const Vector &aN, const Integer &aC)

ClosedIntegerHalfPlane (const Point &A, const Point &B, const Point &inP, IntegerComputer< Integer > &ic)

bool operator() (const Point &p) const

bool isOnBoundary (const Point &p) const

Vector tangent () const

void negate ()

void selfDisplay (std::ostream &out) const

bool isValid () const

## Data Fields

Vector N
The normal to the half-space. More...

Integer c
The uppermost value N.(x,y) that is in the half-space. More...

## Detailed Description

### template<typename TSpace> struct DGtal::ClosedIntegerHalfPlane< TSpace >

Aim: A half-space specified by a vector N and a constant c. The half-space is the set $$\{ P \in Z^2, N.P \le c \}$$.

Description of template class 'ClosedIntegerHalfPlane'

Examples
arithmetic/lower-integer-convex-hull.cpp.

Definition at line 63 of file ClosedIntegerHalfPlane.h.

## ◆ Integer

template<typename TSpace >
 typedef Space::Integer DGtal::ClosedIntegerHalfPlane< TSpace >::Integer

Definition at line 69 of file ClosedIntegerHalfPlane.h.

## ◆ Point

template<typename TSpace >
 typedef Space::Point DGtal::ClosedIntegerHalfPlane< TSpace >::Point

Definition at line 70 of file ClosedIntegerHalfPlane.h.

## ◆ Self

template<typename TSpace >
 typedef ClosedIntegerHalfPlane DGtal::ClosedIntegerHalfPlane< TSpace >::Self

Definition at line 65 of file ClosedIntegerHalfPlane.h.

## ◆ Space

template<typename TSpace >
 typedef TSpace DGtal::ClosedIntegerHalfPlane< TSpace >::Space

Definition at line 68 of file ClosedIntegerHalfPlane.h.

## ◆ Vector

template<typename TSpace >
 typedef Space::Vector DGtal::ClosedIntegerHalfPlane< TSpace >::Vector

Definition at line 71 of file ClosedIntegerHalfPlane.h.

## ◆ ~ClosedIntegerHalfPlane()

template<typename TSpace >
 DGtal::ClosedIntegerHalfPlane< TSpace >::~ClosedIntegerHalfPlane ( )

Destructor.

## ◆ ClosedIntegerHalfPlane() [1/2]

template<typename TSpace >
 DGtal::ClosedIntegerHalfPlane< TSpace >::ClosedIntegerHalfPlane ( const Vector & aN, const Integer & aC )

Constructor from normal and constant.

Parameters
 aN a vector that defines the normal direction to the half-plane. aC the constant that defines the bound.

## ◆ ClosedIntegerHalfPlane() [2/2]

template<typename TSpace >
 DGtal::ClosedIntegerHalfPlane< TSpace >::ClosedIntegerHalfPlane ( const Point & A, const Point & B, const Point & inP, IntegerComputer< Integer > & ic )

Constructor. Computes the half-space of the form N.P<=c whose supporting line passes through A and B such that the point inP satisfies the constraint.

Parameters
 A any point. B any point different from A. inP any point not on the straight line (AB). ic any compatible integer computer.

## ◆ BOOST_CONCEPT_ASSERT()

template<typename TSpace >
 DGtal::ClosedIntegerHalfPlane< TSpace >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >) )

## ◆ isOnBoundary()

template<typename TSpace >
 bool DGtal::ClosedIntegerHalfPlane< TSpace >::isOnBoundary ( const Point & p ) const
Parameters
 p any point in the plane.
Returns
'true' if p is on the boundary of the half-space (i.e. N.p == c ).

## ◆ isValid()

template<typename TSpace >
 bool DGtal::ClosedIntegerHalfPlane< TSpace >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

## ◆ negate()

template<typename TSpace >
 void DGtal::ClosedIntegerHalfPlane< TSpace >::negate ( )

Negates the half-space. Only the boundary is common.

## ◆ operator()()

template<typename TSpace >
 bool DGtal::ClosedIntegerHalfPlane< TSpace >::operator() ( const Point & p ) const
Parameters
 p any point in the plane.
Returns
'true' if p is inside the half-space (i.e. N.p <= c ).

## ◆ selfDisplay()

template<typename TSpace >
 void DGtal::ClosedIntegerHalfPlane< TSpace >::selfDisplay ( std::ostream & out ) const

Writes/Displays the object on an output stream.

Parameters
 out the output stream where the object is written.

## ◆ tangent()

template<typename TSpace >
 Vector DGtal::ClosedIntegerHalfPlane< TSpace >::tangent ( ) const
Returns
the tangent vector to the half-plane boundary (ie. ( -N.y, N.x ) ).

## ◆ c

template<typename TSpace >
 Integer DGtal::ClosedIntegerHalfPlane< TSpace >::c

The uppermost value N.(x,y) that is in the half-space.

Definition at line 77 of file ClosedIntegerHalfPlane.h.

## ◆ N

template<typename TSpace >
 Vector DGtal::ClosedIntegerHalfPlane< TSpace >::N

The normal to the half-space.

Definition at line 76 of file ClosedIntegerHalfPlane.h.

The documentation for this struct was generated from the following file: