Class that defines FIXME. More...
#include <lut_vec.hh>
Public Types | |
typedef bkd_viter_< lut_vec< S, T > > | bkd_viter |
Backward Value_Iterator associated type. | |
typedef Value_Set< void > | category |
typedef lut_vec< S, T > | exact_t |
typedef fwd_viter_< lut_vec< S, T > > | fwd_viter |
Forward Value_Iterator associated type. | |
typedef T | value |
Value associated type. | |
Public Member Functions | |
bool | has (const value &v) const |
Test if v belongs to this set. | |
unsigned | index_of (const value &v) const |
Give the index of value v in this set. | |
unsigned | nvalues () const |
Give the number of values. | |
T | operator() (const typename S::value &val) const |
T | operator[] (unsigned i) const |
Give the i-th value. | |
template<typename F > | |
lut_vec (const S &vset, const Function_v2v< F > &f) | |
ConstructorsConstructor from a Site_set and any Function_v2v. | |
template<typename V > | |
lut_vec (const S &vset, const Function_v2v< fun::i2v::array< V > > &f) | |
Constructor from a Site_set and any fun::i2v::array. | |
template<typename V > | |
lut_vec (const S &vset, const Function_v2v< util::array< V > > &f) | |
Constructor from a Site_set and any util::array. | |
Protected Attributes | |
unsigned | n_ |
std::vector< T > | vec_ |
const S & | vset_ |
Class that defines FIXME.
typedef bkd_viter_< lut_vec<S,T> > mln::value::lut_vec< S, T >::bkd_viter |
Backward Value_Iterator associated type.
typedef Value_Set<void> mln::Value_Set< lut_vec< S, T > >::category [inherited] |
Reimplemented from mln::Object< lut_vec< S, T > >.
typedef lut_vec< S, T > mln::Object< lut_vec< S, T > >::exact_t [inherited] |
typedef fwd_viter_< lut_vec<S,T> > mln::value::lut_vec< S, T >::fwd_viter |
Forward Value_Iterator associated type.
typedef T mln::value::lut_vec< S, T >::value |
Value associated type.
mln::value::lut_vec< S, T >::lut_vec | ( | const S & | vset, | |
const Function_v2v< F > & | f | |||
) | [inline] |
ConstructorsConstructor from a Site_set and any Function_v2v.
References mln::exact(), mln::value::lut_vec< S, T >::n_, and mln::value::lut_vec< S, T >::vec_.
mln::value::lut_vec< S, T >::lut_vec | ( | const S & | vset, | |
const Function_v2v< fun::i2v::array< V > > & | f | |||
) | [inline] |
Constructor from a Site_set and any fun::i2v::array.
References mln::exact(), mln::value::lut_vec< S, T >::n_, mln::fun::i2v::array< T >::size(), mln::fun::i2v::array< T >::std_vector(), and mln::value::lut_vec< S, T >::vec_.
mln::value::lut_vec< S, T >::lut_vec | ( | const S & | vset, | |
const Function_v2v< util::array< V > > & | f | |||
) | [inline] |
Constructor from a Site_set and any util::array.
References mln::exact(), mln::value::lut_vec< S, T >::n_, mln::util::array< T >::size(), mln::util::array< T >::std_vector(), and mln::value::lut_vec< S, T >::vec_.
bool mln::value::lut_vec< S, T >::has | ( | const value & | v | ) | const |
Test if v
belongs to this set.
unsigned mln::value::lut_vec< S, T >::index_of | ( | const value & | v | ) | const |
Give the index of value v
in this set.
unsigned mln::value::lut_vec< S, T >::nvalues | ( | ) | const [inline] |
Give the number of values.
References mln::value::lut_vec< S, T >::vec_.
Referenced by mln::value::lut_vec< S, T >::operator[]().
T mln::value::lut_vec< S, T >::operator() | ( | const typename S::value & | val | ) | const [inline] |
T mln::value::lut_vec< S, T >::operator[] | ( | unsigned | i | ) | const [inline] |
Give the i-th
value.
References mln::value::lut_vec< S, T >::nvalues(), and mln::value::lut_vec< S, T >::vec_.
unsigned mln::value::lut_vec< S, T >::n_ [protected] |
Referenced by mln::value::lut_vec< S, T >::lut_vec(), and mln::value::lut_vec< S, T >::operator()().
std::vector<T> mln::value::lut_vec< S, T >::vec_ [protected] |
const S& mln::value::lut_vec< S, T >::vset_ [protected] |
Referenced by mln::value::lut_vec< S, T >::operator()().