mln::value::float01 Class Reference

Class for floating values restricted to the interval [0. More...

#include <float01.hh>

Inherits mln::value::Floating<float01>.

List of all members.

Public Types

typedef std::pair< unsigned,
unsigned long > 
enc
 Encoding associated type.
typedef float equiv
 Equivalent associated type.

Public Member Functions

 float01 (unsigned nbits, float val)
 Ctor.
template<unsigned n>
 float01 (const float01_< n > &val)
 Ctor.
 float01 ()
 Ctor.
unsigned nbits () const
 Access to the encoding size.
 operator float () const
 Conversion to float.
float01set_nbits (unsigned nbits)
 Set the encoding size to nbits.
const float01 to_nbits (unsigned nbits) const
 Return an equivalent gray encoded on nbits bits.
float value () const
 Access to std type.
unsigned long value_ind () const
 Access to the position in the quantized interval.


Detailed Description

Class for floating values restricted to the interval [0.

.1] and discretized with n bits.


Member Typedef Documentation

typedef std::pair<unsigned, unsigned long> mln::value::float01::enc

Encoding associated type.

Equivalent associated type.


Constructor & Destructor Documentation

mln::value::float01::float01 (  )  [inline]

Ctor.

template<unsigned n>
mln::value::float01::float01 ( const float01_< n > &  val  )  [inline]

Ctor.

mln::value::float01::float01 ( unsigned  nbits,
float  val 
) [inline]

Ctor.


Member Function Documentation

unsigned mln::value::float01::nbits (  )  const [inline]

Access to the encoding size.

mln::value::float01::operator float (  )  const [inline]

Conversion to float.

float01 & mln::value::float01::set_nbits ( unsigned  nbits  )  [inline]

Set the encoding size to nbits.

Referenced by to_nbits().

const float01 mln::value::float01::to_nbits ( unsigned  nbits  )  const [inline]

Return an equivalent gray encoded on nbits bits.

References set_nbits().

float mln::value::float01::value (  )  const [inline]

Access to std type.

unsigned long mln::value::float01::value_ind (  )  const [inline]

Access to the position in the quantized interval.


Generated on Tue Jul 14 16:33:19 2009 for Milena (Olena) by  doxygen 1.5.9