mtl::vector::dense_vector< Value, Parameters > Class Template Reference
Dense vector. More...
#include <dense_vector.hpp>
Inherits mtl::vector::vec_expr< Vector >, mtl::detail::contiguous_memory_block< Value, OnStack, Size >, and mtl::vector::crtp_base_vector< Vector, ValueType, SizeType >.
Public Member Functions | |
| void | check_index (size_type i) const |
| Check whether index is non-negative and less than size. | |
| void | check_dim (size_type s) const |
| Check for a given vector if the sizes are equal or this has size 0 (and can take the size of source) | |
| void | static_check (size_type s) const |
| Check at compile time for a given vector if the sizes are equal. | |
| template<class E > | |
| void | check_consistent_shape (vec_expr< E > const &e) const |
| Check if a given vector expression whether it has the same shape as the object. | |
| dense_vector () | |
| Default constructor. | |
| dense_vector (size_type n) | |
Constructor for size n. | |
| dense_vector (size_type n, value_type value) | |
Constructor for size n and value value that is set in all entries. | |
| dense_vector (size_type n, value_type *address) | |
Constructor for size n and address. | |
| dense_vector (const self &src) | |
| Copy constructor. | |
| template<typename VectorSrc > | |
| dense_vector (const VectorSrc &src, typename boost::disable_if< boost::is_integral< VectorSrc >, int >::type=0) | |
| Constructor from vector expressions. | |
| size_type | stride () const |
| Stride is always 1. | |
| reference | operator() (size_type i) |
| i-th entry | |
| const_reference | operator() (size_type i) const |
| i-th entry (constant) | |
| reference | operator[] (size_type i) |
| i-th entry | |
| const_reference | operator[] (size_type i) const |
| i-th entry (constant) | |
| self | operator[] (irange r) |
| sub-vector | |
| const self | operator[] (irange r) const |
| sub-vector | |
| value_type * | address_data () |
| Address of first data entry; to be used with care. | |
| self & | operator= (self src) |
| Move assignment. | |
Friends | |
| size_type | size (const self &v) |
| Size of v (like a free function) | |
| void | swap (self &vector1, self &vector2) |
| swap two vectors | |
Dense vector.
| mtl::vector::dense_vector< Value, Parameters >::dense_vector | ( | size_type | n, |
| value_type * | address | ||
| ) | [inline, explicit] |
Constructor for size n and address.
Can be used to handle vectors from other libraries, even in other languages like Fortran
| void mtl::vector::dense_vector< Value, Parameters >::check_consistent_shape | ( | vec_expr< E > const & | e | ) | const [inline] |
Check if a given vector expression whether it has the same shape as the object.
Both must be row vectors or column vectors. The elements must have the same algebraic shape, e.g. a row vector of scalars is not compatible with a row vector of matrices.
mtl::vector::dense_vector< Value, Parameters > Class Template Reference -- MTL 4 -- Peter Gottschling and Andrew Lumsdaine
-- Gen. with
rev. 7542
on Sat Aug 11 2012 by doxygen 1.7.6.1 -- © 2010 by SimuNova UG.