Public Member Functions

mln::value::graylevel< n > Struct Template Reference

General gray-level class on n bits. More...

#include <graylevel.hh>

Inheritance diagram for mln::value::graylevel< n >:
Inheritance graph

List of all members.

Public Member Functions

 graylevel ()
 Constructor without argument.
 graylevel (const graylevel< n > &rhs)
 Copy constructor.
 graylevel (int val)
 Constructor from int.
template<unsigned m>
 graylevel (const graylevel< m > &rhs)
 Constructor from any graylevel.
graylevel< n > & operator= (const graylevel< n > &rhs)
 Assigment.
graylevel< n > & operator= (int val)
 Assigment with int.
template<unsigned m>
graylevel< n > & operator= (const graylevel< m > &rhs)
 Assigment with any graylevel.
float to_float () const
 Conversion to float between 0 and 1.
unsigned value () const
 Access to std type.

 graylevel (const mln::literal::black_t &)
 Ctors with literals.

graylevel< n > & operator= (const mln::literal::black_t &)
 Assigment with literals.

Detailed Description

template<unsigned n>
struct mln::value::graylevel< n >

General gray-level class on n bits.

Definition at line 257 of file graylevel.hh.


Constructor & Destructor Documentation

template<unsigned n>
mln::value::graylevel< n >::graylevel (  )  [inline]

Constructor without argument.

Definition at line 436 of file graylevel.hh.

template<unsigned n>
mln::value::graylevel< n >::graylevel ( const graylevel< n > &  rhs  )  [inline]

Copy constructor.

Definition at line 463 of file graylevel.hh.

template<unsigned n>
mln::value::graylevel< n >::graylevel ( int  val  )  [inline]

Constructor from int.

Definition at line 443 of file graylevel.hh.

template<unsigned n>
template<unsigned m>
mln::value::graylevel< n >::graylevel ( const graylevel< m > &  rhs  )  [inline]

Constructor from any graylevel.

Definition at line 481 of file graylevel.hh.

References mln::value::graylevel< n >::value().

template<unsigned n>
mln::value::graylevel< n >::graylevel ( const mln::literal::black_t  )  [inline]

Ctors with literals.

Definition at line 499 of file graylevel.hh.


Member Function Documentation

template<unsigned n>
graylevel< n > & mln::value::graylevel< n >::operator= ( const graylevel< n > &  rhs  )  [inline]

Assigment.

Definition at line 472 of file graylevel.hh.

template<unsigned n>
graylevel< n > & mln::value::graylevel< n >::operator= ( int  val  )  [inline]

Assigment with int.

Definition at line 453 of file graylevel.hh.

template<unsigned n>
graylevel< n > & mln::value::graylevel< n >::operator= ( const mln::literal::black_t  )  [inline]

Assigment with literals.

Definition at line 507 of file graylevel.hh.

template<unsigned n>
template<unsigned m>
graylevel< n > & mln::value::graylevel< n >::operator= ( const graylevel< m > &  rhs  )  [inline]

Assigment with any graylevel.

Definition at line 490 of file graylevel.hh.

References mln::value::graylevel< n >::value().

template<unsigned n>
float mln::value::graylevel< n >::to_float (  )  const [inline]

Conversion to float between 0 and 1.

Definition at line 557 of file graylevel.hh.

Referenced by mln::value::graylevel_f::graylevel_f(), and mln::value::graylevel_f::operator=().

template<unsigned n>
unsigned mln::value::graylevel< n >::value (  )  const [inline]

Access to std type.

Definition at line 549 of file graylevel.hh.

Referenced by mln::value::graylevel< n >::graylevel(), and mln::value::graylevel< n >::operator=().