xtensor
|
Base class for implementation of common expression access methods. More...
#include <xaccessible.hpp>
Public Types | |
using | base_type = xconst_accessible<D> |
using | derived_type = typename base_type::derived_type |
using | reference = typename base_type::reference |
using | size_type = typename base_type::size_type |
Public Types inherited from xt::xconst_accessible< D > | |
using | derived_type = D |
using | inner_types = xcontainer_inner_types<D> |
using | reference = typename inner_types::reference |
using | const_reference = typename inner_types::const_reference |
using | size_type = typename inner_types::size_type |
Public Member Functions | |
template<class... Args> | |
reference | at (Args... args) |
template<class S > | |
disable_integral_t< S, reference > | operator[] (const S &index) |
template<class I > | |
reference | operator[] (std::initializer_list< I > index) |
reference | operator[] (size_type i) |
template<class... Args> | |
reference | periodic (Args... args) |
reference | front () |
Returns a reference to the first element of the expression. | |
reference | back () |
Returns a reference to the last element of the expression. | |
template<class... Args> | |
auto | at (Args... args) -> reference |
Returns a reference to the element at the specified position in the expression, after dimension and bounds checking. | |
template<class S > | |
auto | operator[] (const S &index) -> disable_integral_t< S, reference > |
Returns a reference to the element at the specified position in the expression. | |
template<class I > | |
auto | operator[] (std::initializer_list< I > index) -> reference |
template<class... Args> | |
auto | periodic (Args... args) -> reference |
Returns a reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed). | |
template<class... Args> | |
const_reference | at (Args... args) const |
template<class... Args> | |
auto | at (Args... args) const -> const_reference |
Returns a constant reference to the element at the specified position in the expression, after dimension and bounds checking. | |
const_reference | back () const |
Returns a constant reference to last the element of the expression. | |
const_reference | front () const |
Returns a constant reference to first the element of the expression. | |
template<class... Args> | |
const_reference | periodic (Args... args) const |
template<class... Args> | |
auto | periodic (Args... args) const -> const_reference |
Returns a constant reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed). | |
Public Member Functions inherited from xt::xconst_accessible< D > | |
size_type | size () const noexcept |
Returns the size of the expression. | |
size_type | dimension () const noexcept |
Returns the number of dimensions of the expression. | |
size_type | shape (size_type index) const |
Returns the i-th dimension of the expression. | |
template<class... Args> | |
const_reference | at (Args... args) const |
template<class S > | |
disable_integral_t< S, const_reference > | operator[] (const S &index) const |
template<class I > | |
const_reference | operator[] (std::initializer_list< I > index) const |
const_reference | operator[] (size_type i) const |
template<class... Args> | |
const_reference | periodic (Args... args) const |
template<class... Args> | |
bool | in_bounds (Args... args) const |
Returns true only if the the specified position is a valid entry in the expression. | |
const_reference | front () const |
Returns a constant reference to first the element of the expression. | |
const_reference | back () const |
Returns a constant reference to last the element of the expression. | |
template<class... Args> | |
auto | at (Args... args) const -> const_reference |
Returns a constant reference to the element at the specified position in the expression, after dimension and bounds checking. | |
template<class S > | |
auto | operator[] (const S &index) const -> disable_integral_t< S, const_reference > |
Returns a constant reference to the element at the specified position in the expression. | |
template<class I > | |
auto | operator[] (std::initializer_list< I > index) const -> const_reference |
template<class... Args> | |
auto | periodic (Args... args) const -> const_reference |
Returns a constant reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed). | |
Protected Member Functions | |
xaccessible (const xaccessible &)=default | |
xaccessible & | operator= (const xaccessible &)=default |
xaccessible (xaccessible &&)=default | |
xaccessible & | operator= (xaccessible &&)=default |
Protected Member Functions inherited from xt::xconst_accessible< D > | |
xconst_accessible (const xconst_accessible &)=default | |
xconst_accessible & | operator= (const xconst_accessible &)=default |
xconst_accessible (xconst_accessible &&)=default | |
xconst_accessible & | operator= (xconst_accessible &&)=default |
Base class for implementation of common expression access methods.
The xaccessible class implements access methods common to all expressions.
D | The derived type, i.e. the inheriting class for which xaccessible provides the interface. |
Definition at line 87 of file xaccessible.hpp.
using xt::xaccessible< D >::base_type = xconst_accessible<D> |
Definition at line 91 of file xaccessible.hpp.
Definition at line 92 of file xaccessible.hpp.
Definition at line 93 of file xaccessible.hpp.
Definition at line 94 of file xaccessible.hpp.
|
inline |
Returns a reference to the element at the specified position in the expression, after dimension and bounds checking.
args | a list of indices specifying the position in the expression. Indices must be unsigned integers, the number of indices should be equal to the number of dimensions of the expression. |
std::out_of_range | if the number of argument is greater than the number of dimensions or if indices are out of bounds. |
Definition at line 274 of file xaccessible.hpp.
|
inline |
Returns a constant reference to the element at the specified position in the expression, after dimension and bounds checking.
args | a list of indices specifying the position in the expression. Indices must be unsigned integers, the number of indices should be equal to the number of dimensions of the expression. |
std::out_of_range | if the number of argument is greater than the number of dimensions or if indices are out of bounds. |
Definition at line 175 of file xaccessible.hpp.
|
inline |
Returns a reference to the last element of the expression.
Definition at line 334 of file xaccessible.hpp.
|
inline |
Returns a constant reference to last the element of the expression.
Definition at line 59 of file xaccessible.hpp.
|
inline |
Returns a reference to the first element of the expression.
Definition at line 325 of file xaccessible.hpp.
|
inline |
Returns a constant reference to first the element of the expression.
Definition at line 58 of file xaccessible.hpp.
Returns a reference to the element at the specified position in the expression.
index | a sequence of indices specifying the position in the expression. Indices must be unsigned integers, the number of indices in the list should be equal or greater than the number of dimensions of the expression. |
Definition at line 288 of file xaccessible.hpp.
|
inline |
Definition at line 301 of file xaccessible.hpp.
|
inline |
Definition at line 295 of file xaccessible.hpp.
|
inline |
Returns a reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed).
args | a list of indices specifying the position in the expression. Indices must be integers, the number of indices should be equal to the number of dimensions of the expression. |
Definition at line 315 of file xaccessible.hpp.
|
inline |
Returns a constant reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed).
args | a list of indices specifying the position in the expression. Indices must be integers, the number of indices should be equal to the number of dimensions of the expression. |
Definition at line 217 of file xaccessible.hpp.