$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::fun::i2v::array< T > Class Template Reference

#include <mln/fun/i2v/array.hh>

Public Member Functions

void append (const T &val)
void init_ (unsigned n)
result operator() (unsigned i) const
mutable_result operator() (unsigned i)
void reserve (unsigned n)
void resize (unsigned n)
void resize (unsigned n, const T &val)
unsigned size () const
const std::vector< T > & std_vector () const
Constructors
 array ()
 array (unsigned n)
 array (unsigned n, const T &val)
 array (const util::array< T > &from)
 array (const std::vector< T > &from)

Protected Attributes

std::vector< Tv_

Public Types

Returned value types
typedef T result
typedef std::vector< T >::reference mutable_result

Detailed Description

template<typename T>
class mln::fun::i2v::array< T >

Definition at line 65 of file fun/i2v/array.hh.

Constructor & Destructor Documentation

template<typename T>
mln::fun::i2v::array< T >::array ( )

Default.

template<typename T>
mln::fun::i2v::array< T >::array ( unsigned  n)

Constructs a function with nvalues.

template<typename T>
mln::fun::i2v::array< T >::array ( unsigned  n,
const T val 
)

Constructs a function with nvalues and val as default value.

template<typename T>
mln::fun::i2v::array< T >::array ( const util::array< T > &  from)

Used in from_to().

Constructs that function from an util::array. Always prefer using from_to instead of this constructor.

template<typename T>
mln::fun::i2v::array< T >::array ( const std::vector< T > &  from)

Used in from_to().

Constructs that function from an std::vector. Always prefer using from_to instead of this constructor.

Member Function Documentation

template<typename T>
void mln::fun::i2v::array< T >::append ( const T val)

Append a new value in the function.

template<typename T>
void mln::fun::i2v::array< T >::init_ ( unsigned  n)

Initialize an empty function.

template<typename T>
result mln::fun::i2v::array< T >::operator() ( unsigned  i) const

Const access to the ith value.

template<typename T>
mutable_result mln::fun::i2v::array< T >::operator() ( unsigned  i)

Read-Write access to the ith value.

template<typename T>
void mln::fun::i2v::array< T >::reserve ( unsigned  n)

Pre-allocate space.

template<typename T>
void mln::fun::i2v::array< T >::resize ( unsigned  n)

Set the function size to n.

template<typename T>
void mln::fun::i2v::array< T >::resize ( unsigned  n,
const T val 
)

Set the function size to n and initialize the value with val.

template<typename T>
unsigned mln::fun::i2v::array< T >::size ( ) const

Return the number of values.

template<typename T>
const std::vector<T>& mln::fun::i2v::array< T >::std_vector ( ) const

Return the underlying std::vector.

Member Data Documentation

template<typename T>
std::vector<T> mln::fun::i2v::array< T >::v_
protected

Definition at line 125 of file fun/i2v/array.hh.

Member Typedef Documentation

template<typename T>
typedef std::vector<T>::reference mln::fun::i2v::array< T >::mutable_result

Definition at line 74 of file fun/i2v/array.hh.

template<typename T>
typedef T mln::fun::i2v::array< T >::result

Definition at line 73 of file fun/i2v/array.hh.