#include <array.hh>

Public Types | |
| typedef Function_v2v< void > | category |
| typedef i2v::array< T > | exact_t |
| typedef T | result |
| Returned value types. | |
| typedef std::vector< T >::reference | mutable_result |
Public Member Functions | |
| void | append (const T &val) |
| Append a new value in the function. | |
| void | init_ (unsigned n) |
| Initialize an empty function. | |
| result | operator() (unsigned i) const |
| Const access to the ith value. | |
| mutable_result | operator() (unsigned i) |
| Read-Write access to the ith value. | |
| void | reserve (unsigned n) |
| Pre-allocate space. | |
| void | resize (unsigned n) |
Set the function size to n. | |
| void | resize (unsigned n, const T &val) |
Set the function size to n and initialize the value with val. | |
| unsigned | size () const |
| Return the number of values. | |
| const std::vector< T > & | std_vector () const |
| Return the underlying std::vector. | |
| array () | |
| Constructors. | |
| array (unsigned n) | |
Constructs a function with nvalues. | |
| array (unsigned n, const T &val) | |
Constructs a function with nvalues and val as default value. | |
| array (const util::array< T > &from) | |
| Used in from_to(). | |
| array (const std::vector< T > &from) | |
| Used in from_to(). | |
Protected Attributes | |
| std::vector< T > | v_ |
typedef Function_v2v<void> mln::Function_v2v< i2v::array< T > >::category [inherited] |
Reimplemented from mln::Function< i2v::array< T > >.
Reimplemented in mln::Function_v2b< i2v::array< T > >.
typedef i2v::array< T > mln::Object< i2v::array< T > >::exact_t [inherited] |
| typedef std::vector<T>::reference mln::fun::i2v::array< T >::mutable_result |
Reimplemented from mln::Function_v2v< i2v::array< T > >.
| typedef T mln::fun::i2v::array< T >::result |
Returned value types.
| mln::fun::i2v::array< T >::array | ( | ) | [inline] |
Constructors.
Default.
| mln::fun::i2v::array< T >::array | ( | unsigned | n | ) | [inline] |
Constructs a function with nvalues.
| mln::fun::i2v::array< T >::array | ( | unsigned | n, | |
| const T & | val | |||
| ) | [inline] |
Constructs a function with nvalues and val as default value.
| mln::fun::i2v::array< T >::array | ( | const util::array< T > & | from | ) | [inline] |
Used in from_to().
Constructs that function from an util::array. Always prefer using from_to instead of this constructor.
| mln::fun::i2v::array< T >::array | ( | const std::vector< T > & | from | ) | [inline] |
Used in from_to().
Constructs that function from an std::vector. Always prefer using from_to instead of this constructor.
| void mln::fun::i2v::array< T >::append | ( | const T & | val | ) | [inline] |
Append a new value in the function.
References mln::fun::i2v::array< T >::v_.
Referenced by mln::convert::over_load::from_to_().
| void mln::fun::i2v::array< T >::init_ | ( | unsigned | n | ) | [inline] |
| array< T >::result mln::fun::i2v::array< T >::operator() | ( | unsigned | i | ) | const [inline] |
Const access to the ith value.
References mln::fun::i2v::array< T >::v_.
| array< T >::mutable_result mln::fun::i2v::array< T >::operator() | ( | unsigned | i | ) | [inline] |
Read-Write access to the ith value.
References mln::fun::i2v::array< T >::v_.
| void mln::fun::i2v::array< T >::reserve | ( | unsigned | n | ) | [inline] |
Pre-allocate space.
References mln::fun::i2v::array< T >::v_.
Referenced by mln::convert::over_load::from_to_().
| void mln::fun::i2v::array< T >::resize | ( | unsigned | n | ) | [inline] |
Set the function size to n.
References mln::fun::i2v::array< T >::v_.
Referenced by mln::labeling::colorize(), mln::accu::label_used< L >::init(), and mln::accu::label_used< L >::take().
| void mln::fun::i2v::array< T >::resize | ( | unsigned | n, | |
| const T & | val | |||
| ) | [inline] |
Set the function size to n and initialize the value with val.
References mln::fun::i2v::array< T >::v_.
| unsigned mln::fun::i2v::array< T >::size | ( | ) | const [inline] |
Return the number of values.
References mln::fun::i2v::array< T >::v_.
Referenced by mln::labeling::colorize(), mln::init_(), mln::value::lut_vec< S, T >::lut_vec(), mln::labeling::pack(), mln::labeling::pack_inplace(), and mln::accu::label_used< L >::take().
| const std::vector< T > & mln::fun::i2v::array< T >::std_vector | ( | ) | const [inline] |
Return the underlying std::vector.
References mln::fun::i2v::array< T >::v_.
Referenced by mln::value::lut_vec< S, T >::lut_vec().
std::vector<T> mln::fun::i2v::array< T >::v_ [protected] |
1.7.1