unit_vector represents a canonical unit vector unit_vector represents a canonical unit vector. More...
#include <vector.hpp>


Classes | |
| class | const_iterator |
Public Types | |
| typedef ALLOC::size_type | size_type |
| typedef ALLOC::difference_type | difference_type |
| typedef T | value_type |
| typedef const T & | const_reference |
| typedef T & | reference |
| typedef const vector_reference < const self_type > | const_closure_type |
| typedef vector_reference < self_type > | closure_type |
| typedef sparse_tag | storage_category |
| typedef const_iterator | iterator |
| typedef reverse_iterator_base < const_iterator > | const_reverse_iterator |
| typedef unit_vector< T, ALLOC > | container_type |
| typedef vector_tag | type_category |
| typedef E | expression_type |
Public Member Functions | |
| BOOST_UBLAS_INLINE | unit_vector () |
| Simple constructor with dimension and index 0. More... | |
| BOOST_UBLAS_INLINE | unit_vector (size_type size, size_type index=0) |
| Constructor of unit_vector. More... | |
| BOOST_UBLAS_INLINE | unit_vector (const unit_vector &v) |
| Copy-constructor. More... | |
| BOOST_UBLAS_INLINE size_type | size () const |
| Return the size (dimension) of the vector. More... | |
| BOOST_UBLAS_INLINE size_type | index () const |
| Return the order of the unit vector. More... | |
| BOOST_UBLAS_INLINE void | resize (size_type size, bool=true) |
| Resize the vector. More... | |
| BOOST_UBLAS_INLINE const_pointer | find_element (size_type i) const |
| Return a const pointer to the element of index i. More... | |
| BOOST_UBLAS_INLINE const_reference | operator() (size_type i) const |
| BOOST_UBLAS_INLINE const_reference | operator[] (size_type i) const |
| BOOST_UBLAS_INLINE unit_vector & | operator= (const unit_vector &v) |
| BOOST_UBLAS_INLINE unit_vector & | assign_temporary (unit_vector &v) |
| BOOST_UBLAS_INLINE void | swap (unit_vector &v) |
| BOOST_UBLAS_INLINE const_iterator | find (size_type i) const |
| BOOST_UBLAS_INLINE const_iterator | begin () const |
| BOOST_UBLAS_INLINE const_iterator | cbegin () const |
| BOOST_UBLAS_INLINE const_iterator | end () const |
| BOOST_UBLAS_INLINE const_iterator | cend () const |
| BOOST_UBLAS_INLINE const_reverse_iterator | rbegin () const |
| BOOST_UBLAS_INLINE const_reverse_iterator | crbegin () const |
| BOOST_UBLAS_INLINE const_reverse_iterator | rend () const |
| BOOST_UBLAS_INLINE const_reverse_iterator | crend () const |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int) |
| BOOST_UBLAS_INLINE const container_type & | operator() () const |
| BOOST_UBLAS_INLINE container_type & | operator() () |
Static Public Attributes | |
| static const unsigned | complexity |
Friends | |
| BOOST_UBLAS_INLINE friend void | swap (unit_vector &v1, unit_vector &v2) |
unit_vector represents a canonical unit vector unit_vector represents a canonical unit vector.
The k-th unit vector of dimension
holds 0 for every value
s.t.
and 1 when
. At construction, the value k is given after the dimension of the vector.
| T | is the type of elements in the vector. They must be 0 and 1 assignable in order for the vector to have its unit-vector semantic. |
| ALLOC | a specific allocator can be specified if needed. Most of the time this parameter is omited. |
| typedef vector_reference<self_type> boost::numeric::ublas::unit_vector< T, ALLOC >::closure_type |
| typedef const vector_reference<const self_type> boost::numeric::ublas::unit_vector< T, ALLOC >::const_closure_type |
| typedef const T& boost::numeric::ublas::unit_vector< T, ALLOC >::const_reference |
| typedef reverse_iterator_base<const_iterator> boost::numeric::ublas::unit_vector< T, ALLOC >::const_reverse_iterator |
|
inherited |
| typedef ALLOC::difference_type boost::numeric::ublas::unit_vector< T, ALLOC >::difference_type |
|
inherited |
| typedef const_iterator boost::numeric::ublas::unit_vector< T, ALLOC >::iterator |
| typedef T& boost::numeric::ublas::unit_vector< T, ALLOC >::reference |
| typedef ALLOC::size_type boost::numeric::ublas::unit_vector< T, ALLOC >::size_type |
| typedef sparse_tag boost::numeric::ublas::unit_vector< T, ALLOC >::storage_category |
|
inherited |
| typedef T boost::numeric::ublas::unit_vector< T, ALLOC >::value_type |
|
inline |
Simple constructor with dimension and index 0.
|
inlineexplicit |
Constructor of unit_vector.
| size | is the dimension of the vector |
| index | is the order of the vector |
|
inline |
Copy-constructor.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return a const pointer to the element of index i.
|
inline |
Return the order of the unit vector.
|
inlineinherited |
|
inlineinherited |
|
inline |
|
inline |
|
inline |
References boost::multiprecision::backends::i.
|
inline |
References boost::numeric::ublas::unit_vector< T, ALLOC >::end().
Referenced by boost::numeric::ublas::unit_vector< T, ALLOC >::crbegin().
|
inline |
References boost::numeric::ublas::unit_vector< T, ALLOC >::begin().
Referenced by boost::numeric::ublas::unit_vector< T, ALLOC >::crend().
|
inline |
Resize the vector.
The values are preserved by default (i.e. the index does not change)
| size | is the new size of the vector |
References boost::numeric::ublas::unit_vector< T, ALLOC >::size().
|
inline |
References boost::serialization::make_nvp(), boost::asio::s, and boost::program_options::value().
|
inline |
Return the size (dimension) of the vector.
Referenced by boost::numeric::ublas::unit_vector< T, ALLOC >::resize().
|
inline |
References boost::swap.
Referenced by boost::numeric::ublas::unit_vector< T, ALLOC >::assign_temporary().
|
friend |
|
staticinherited |