![]() |
LibraryLink Utilities
3.0.1
Modern C++ wrapper over LibraryLink and WSTP
|
Simple, light-weight, non-owning wrappper over MNumericArray.
Intended for use where a temporary "upgrade" of a raw MNumericArray to a complete, strongly-typed NumericArray interface would be useful.
| T | - type of the NumericArray data |
Inheritance diagram for LLU::NumericArrayTypedView< T >:
Collaboration diagram for LLU::NumericArrayTypedView< T >:#include <NumericArray.hpp>
Public Types | |
| using | value_type = T |
| Type of elements stored. More... | |
| using | iterator = value_type * |
| Iterator type. More... | |
| using | const_iterator = const value_type * |
| Constant iterator type. More... | |
| using | reverse_iterator = std::reverse_iterator< iterator > |
| Reverse iterator type. More... | |
| using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
| Constant reverse iterator type. More... | |
| using | reference = value_type & |
| Reference type. More... | |
| using | const_reference = const value_type & |
| Constant reference type. More... | |
Public Member Functions | |
| NumericArrayTypedView (const GenericNumericArray &gNA) | |
| Create a NumericArrayTypedView from a GenericNumericArray. More... | |
| NumericArrayTypedView (NumericArrayView nav) | |
| Create a NumericArrayTypedView from a NumericArrayView. More... | |
| NumericArrayTypedView (MNumericArray mna) | |
| Create a NumericArrayTypedView from a raw MNumericArray. More... | |
| mint | getRank () const override |
| Get rank. More... | |
| mint const * | getDimensions () const override |
| Get dimensions. More... | |
| mint | getFlattenedLength () const override |
| Get length. More... | |
| numericarray_data_t | type () const final |
| Get the data type of this array. More... | |
| void * | rawData () const noexcept override |
| Get access to the raw data. More... | |
| value_type * | data () noexcept |
| Get raw pointer to underlying data. More... | |
| const value_type * | data () const noexcept |
| Get raw pointer to const underlying data. More... | |
| mint | size () const noexcept |
| Get total number of elements in the container. More... | |
| iterator | begin () noexcept |
| Get iterator at the beginning of underlying data. More... | |
| const_iterator | begin () const noexcept |
| Get constant iterator at the beginning of underlying data. More... | |
| const_iterator | cbegin () const noexcept |
| Get constant iterator at the beginning of underlying data. More... | |
| iterator | end () noexcept |
| Get iterator after the end of underlying data. More... | |
| const_iterator | end () const noexcept |
| Get constant iterator after the end of underlying data. More... | |
| const_iterator | cend () const noexcept |
| Get constant iterator after the end of underlying data. More... | |
| reverse_iterator | rbegin () noexcept |
| Get iterator at the beginning of underlying data. More... | |
| const_reverse_iterator | rbegin () const noexcept |
| Get constant iterator at the beginning of underlying data. More... | |
| const_reverse_iterator | crbegin () const noexcept |
| Get constant iterator at the beginning of underlying data. More... | |
| reverse_iterator | rend () noexcept |
| Get iterator after the end of underlying data. More... | |
| const_reverse_iterator | rend () const noexcept |
| Get constant iterator after the end of underlying data. More... | |
| const_reverse_iterator | crend () const noexcept |
| Get constant iterator after the end of underlying data. More... | |
| reference | operator[] (mint index) |
| Get a reference to the data element at given position. More... | |
| const_reference | operator[] (mint index) const |
| Get a constant reference to the data element at given position. More... | |
| reference | front () |
| Get reference to the first element. More... | |
| const_reference | front () const |
| Get constant reference to the first element. More... | |
| reference | back () |
| Get reference to the last element. More... | |
| const_reference | back () const |
| Get constant reference to the last element. More... | |
| std::vector< value_type > | asVector () const |
| Copy contents of the data to a std::vector of matching type. More... | |
|
inherited |
Constant iterator type.
|
inherited |
Constant reference type.
|
inherited |
Constant reverse iterator type.
|
inherited |
Iterator type.
|
inherited |
Reference type.
|
inherited |
Reverse iterator type.
|
inherited |
Type of elements stored.
|
inline |
Create a NumericArrayTypedView from a GenericNumericArray.
| gNA | - a GenericNumericArray |
| ErrorName::NumericArrayTypeError | - if the actual datatype of gNA is not T |
|
inline |
Create a NumericArrayTypedView from a NumericArrayView.
| nav | - a NumericArrayView |
| ErrorName::NumericArrayTypeError | - if the actual datatype of nav is not T |
|
inline |
Create a NumericArrayTypedView from a raw MNumericArray.
| mna | - a raw MNumericArray |
| ErrorName::NumericArrayTypeError | - if the actual datatype of mna is not T |
|
inlineinherited |
Copy contents of the data to a std::vector of matching type.
|
inlineinherited |
Get reference to the last element.
|
inlineinherited |
Get constant reference to the last element.
|
inlinenoexceptinherited |
Get constant iterator at the beginning of underlying data.
|
inlinenoexceptinherited |
Get iterator at the beginning of underlying data.
|
inlinenoexceptinherited |
Get constant iterator at the beginning of underlying data.
|
inlinenoexceptinherited |
Get constant iterator after the end of underlying data.
|
inlinenoexceptinherited |
Get constant iterator at the beginning of underlying data.
|
inlinenoexceptinherited |
Get constant iterator after the end of underlying data.
|
inlinenoexceptinherited |
Get raw pointer to const underlying data.
|
inlinenoexceptinherited |
Get raw pointer to underlying data.
|
inlinenoexceptinherited |
Get constant iterator after the end of underlying data.
|
inlinenoexceptinherited |
Get iterator after the end of underlying data.
|
inlineinherited |
Get reference to the first element.
|
inlineinherited |
Get constant reference to the first element.
|
inlineoverridevirtualinherited |
Get dimensions.
Implements LLU::NumericArrayInterface.
|
inlineoverridevirtualinherited |
Get length.
Implements LLU::NumericArrayInterface.
|
inlineoverridevirtualinherited |
|
inlineinherited |
Get a reference to the data element at given position.
| [in] | index | - position of desired data element |
|
inlineinherited |
Get a constant reference to the data element at given position.
| [in] | index | - position of desired data element |
|
inlineoverridevirtualnoexceptinherited |
Get access to the raw data.
Use with caution.
Implements LLU::NumericArrayInterface.
|
inlinenoexceptinherited |
Get constant iterator at the beginning of underlying data.
|
inlinenoexceptinherited |
Get iterator at the beginning of underlying data.
|
inlinenoexceptinherited |
Get constant iterator after the end of underlying data.
|
inlinenoexceptinherited |
Get iterator after the end of underlying data.
|
inlinenoexceptinherited |
Get total number of elements in the container.
|
inlinefinalvirtualinherited |
Get the data type of this array.
numericarray_data_t) Implements LLU::NumericArrayInterface.