Milena (Olena)  User documentation 2.0a Id
 All Classes Namespaces Functions Variables Typedefs Enumerator Groups Pages
mln::win::line< M, i, C > Struct Template Reference

Generic line window defined on a given grid in the given dimension. More...

#include <line.hh>

Inherits mln::internal::classical_window_base< dpoint< M, C >, line< M, i, C > >.

Public Types

enum  
 Direction. More...
 

Public Member Functions

unsigned length () const
 Give the line length.
 
 line (unsigned length)
 Constructor.
 
unsigned size () const
 Give the line size, that is, its length.
 

Detailed Description

template<typename M, unsigned i, typename C>
struct mln::win::line< M, i, C >

Generic line window defined on a given grid in the given dimension.

An line is centered and symmetric; so its length is odd.

M is the given grid on which the line is defined, i is the given dimension of the line end C is the type of the coordinates.

See Also
mln::win::hline2d for an exemple of his use.

Definition at line 73 of file win/line.hh.

Member Enumeration Documentation

template<typename M , unsigned i, typename C >
anonymous enum

Direction.

Definition at line 76 of file win/line.hh.

Constructor & Destructor Documentation

template<typename M , unsigned i, typename C >
line< M, i, C >::line ( unsigned  length)
inline

Constructor.

Parameters
[in]lengthLength of the line.
Precondition
length is odd.

Definition at line 106 of file win/line.hh.

References mln::dpoint< G, C >::set_all().

Member Function Documentation

template<typename M , unsigned i, typename C >
unsigned line< M, i, C >::length ( ) const
inline

Give the line length.

Definition at line 125 of file win/line.hh.

template<typename M , unsigned i, typename C >
unsigned line< M, i, C >::size ( ) const
inline

Give the line size, that is, its length.

Definition at line 132 of file win/line.hh.