Represents a given chunk of memory as a dense vector of elements of type T. More...
#include <shark/LinAlg/BLAS/vector_proxy.hpp>
Inheritance diagram for shark::blas::dense_vector_adaptor< T >:Public Types | |
| typedef value_type const & | const_reference |
| typedef T & | reference |
| typedef T * | pointer |
| typedef value_type const * | const_pointer |
| typedef index_type const * | const_index_pointer |
| typedef index_type * | index_pointer |
| typedef dense_tag | storage_category |
| typedef elementwise_tag | evaluation_category |
| typedef dense_storage_iterator< T > | iterator |
| typedef dense_storage_iterator< value_type const > | const_iterator |
Public Member Functions | |
| template<class E > | |
| dense_vector_adaptor (vector_expression< E > const &expression) | |
| Constructor of a self_type proxy from a Dense VectorExpression. More... | |
| template<class E > | |
| dense_vector_adaptor (vector_expression< E > &expression) | |
| Constructor of a self_type proxy from a Dense VectorExpression. More... | |
| dense_vector_adaptor (pointer values, size_type size, difference_type stride=1) | |
| Constructor of a self_type proxy from a block of memory. More... | |
| template<class U > | |
| dense_vector_adaptor (dense_vector_adaptor< U > const &v) | |
| Copy-constructor of a self_type. More... | |
| size_type | size () const |
| Return the size of the vector. More... | |
| pointer | storage () const |
| Returns the pointer to the beginning of the vector storage. More... | |
| difference_type | stride () const |
| Returns th stride between the elements in storage() More... | |
| const_reference | operator() (index_type i) const |
| Return a const reference to the element \(i\). More... | |
| reference | operator() (index_type i) |
| Return a reference to the element \(i\). More... | |
| const_reference | operator[] (index_type i) const |
| Return a const reference to the element \(i\). More... | |
| reference | operator[] (index_type i) |
| Return a reference to the element \(i\). More... | |
| reference | insert_element (index_type i, const_reference t) |
Set element \(i\) to the value t. More... | |
| void | erase_element (index_type i) |
| Set element \(i\) to the zero value. More... | |
| dense_vector_adaptor & | operator= (dense_vector_adaptor const &e) |
| template<class E > | |
| dense_vector_adaptor & | operator= (const vector_expression< E > &e) |
| const_iterator | begin () const |
| return an iterator on the first element of the vector More... | |
| const_iterator | end () const |
| return an iterator after the last element of the vector More... | |
| iterator | begin () |
| Return an iterator on the first element of the vector. More... | |
| iterator | end () |
| Return an iterator at the end of the vector. More... | |
| iterator | set_element (iterator pos, index_type index, value_type value) |
| iterator | clear_element (iterator pos) |
| iterator | clear_range (iterator start, iterator end) |
Public Member Functions inherited from shark::blas::vector_expression< dense_vector_adaptor< T > > | |
| const expression_type & | operator() () const |
| expression_type & | operator() () |
Represents a given chunk of memory as a dense vector of elements of type T.
This adaptor is read/write if T is non-const and read-only if T is const.
Definition at line 380 of file vector_proxy.hpp.
| typedef index_type const* shark::blas::dense_vector_adaptor< T >::const_index_pointer |
Definition at line 395 of file vector_proxy.hpp.
| typedef dense_storage_iterator<value_type const> shark::blas::dense_vector_adaptor< T >::const_iterator |
Definition at line 526 of file vector_proxy.hpp.
| typedef value_type const* shark::blas::dense_vector_adaptor< T >::const_pointer |
Definition at line 392 of file vector_proxy.hpp.
| typedef value_type const& shark::blas::dense_vector_adaptor< T >::const_reference |
Definition at line 389 of file vector_proxy.hpp.
| typedef elementwise_tag shark::blas::dense_vector_adaptor< T >::evaluation_category |
Definition at line 401 of file vector_proxy.hpp.
| typedef index_type* shark::blas::dense_vector_adaptor< T >::index_pointer |
Definition at line 396 of file vector_proxy.hpp.
| typedef dense_storage_iterator<T> shark::blas::dense_vector_adaptor< T >::iterator |
Definition at line 525 of file vector_proxy.hpp.
| typedef T* shark::blas::dense_vector_adaptor< T >::pointer |
Definition at line 391 of file vector_proxy.hpp.
| typedef T& shark::blas::dense_vector_adaptor< T >::reference |
Definition at line 390 of file vector_proxy.hpp.
| typedef dense_tag shark::blas::dense_vector_adaptor< T >::storage_category |
Definition at line 400 of file vector_proxy.hpp.
|
inline |
Constructor of a self_type proxy from a Dense VectorExpression.
Be aware that the expression must live longer than the proxy!
| expression | The Expression from which to construct the Proxy |
Definition at line 410 of file vector_proxy.hpp.
|
inline |
Constructor of a self_type proxy from a Dense VectorExpression.
Be aware that the expression must live longer than the proxy!
| expression | The Expression from which to construct the Proxy |
Definition at line 420 of file vector_proxy.hpp.
|
inline |
Constructor of a self_type proxy from a block of memory.
| values | the block of memory used |
| size | size of the self_type |
| stride | distance between elements of the self_type in memory |
Definition at line 429 of file vector_proxy.hpp.
|
inline |
Copy-constructor of a self_type.
| v | is the proxy to be copied |
Definition at line 435 of file vector_proxy.hpp.
|
inline |
return an iterator on the first element of the vector
Definition at line 529 of file vector_proxy.hpp.
|
inline |
Return an iterator on the first element of the vector.
Definition at line 539 of file vector_proxy.hpp.
|
inline |
Definition at line 555 of file vector_proxy.hpp.
References shark::blas::vector_reference< V >::end(), and SIZE_CHECK.
|
inline |
Definition at line 563 of file vector_proxy.hpp.
References shark::blas::vector_reference< V >::end(), and RANGE_CHECK.
|
inline |
return an iterator after the last element of the vector
Definition at line 534 of file vector_proxy.hpp.
References shark::blas::vector_reference< V >::size(), and shark::blas::vector_reference< V >::stride().
|
inline |
Return an iterator at the end of the vector.
Definition at line 544 of file vector_proxy.hpp.
References shark::blas::vector_reference< V >::size(), and shark::blas::vector_reference< V >::stride().
|
inline |
Set element \(i\) to the zero value.
| i | index of the element |
Definition at line 507 of file vector_proxy.hpp.
|
inline |
Set element \(i\) to the value t.
| i | index of the element |
| t | reference to the value to be set |
Definition at line 501 of file vector_proxy.hpp.
|
inline |
Return a const reference to the element \(i\).
| i | index of the element |
Definition at line 472 of file vector_proxy.hpp.
|
inline |
Return a reference to the element \(i\).
| i | index of the element |
Definition at line 478 of file vector_proxy.hpp.
|
inline |
Definition at line 512 of file vector_proxy.hpp.
References shark::blas::assign().
|
inline |
Definition at line 516 of file vector_proxy.hpp.
References shark::blas::assign().
|
inline |
Return a const reference to the element \(i\).
| i | index of the element |
Definition at line 484 of file vector_proxy.hpp.
|
inline |
Return a reference to the element \(i\).
| i | index of the element |
Definition at line 490 of file vector_proxy.hpp.
|
inline |
Definition at line 549 of file vector_proxy.hpp.
References SIZE_CHECK.
|
inline |
Return the size of the vector.
Definition at line 444 of file vector_proxy.hpp.
|
inline |
Returns the pointer to the beginning of the vector storage.
Low-level access to the vectors internals. Elements storage()[i*stride()] for i=1,...,size()-1 are valid
Definition at line 451 of file vector_proxy.hpp.
|
inline |
Returns th stride between the elements in storage()
In general elements of dense storage entities are spaced like storage()[i*stride()] for i=1,...,size()-1
Definition at line 458 of file vector_proxy.hpp.