PP's Ndarray
Loading...
Searching...
No Matches
pp::Inner< Dtype, dim > Struct Template Reference

Class for multi-dimensional array. More...

#include <ndarray-11.hpp>

Inheritance diagram for pp::Inner< Dtype, dim >:
pp::BaseVector< Inner< Dtype, dim - 1 > > pp::Ndarray< Dtype[dim]>

Public Member Functions

template<typename... Args>
 Inner (std::size_t n=0, Args... args)
 
 Inner (std::initializer_list< Inner< Dtype, dim - 1 > > initList)
 Constructor to handle initializer list for nested lists.
 
template<typename T , std::size_t M, typename = typename std::enable_if<(M < dim)>::type>
 Inner (const Inner< T, M > &lowerDimInner)
 Copy from lower dimension.
 
Indexing

Indexing for Ndarray Unlike Slicing, Indexing returns a reference to the element.

template<typename... Indices, typename std::enable_if<(sizeof...(Indices) > 0), int >::type = 0, typename std::enable_if< conjunction< std::is_integral< Indices >... >::value, int >::type = 0>
auto operator() (int idx, Indices... indices) -> decltype(this->at(idx)(indices...))
 
template<typename... Indices, typename std::enable_if<(sizeof...(Indices) > 0), int >::type = 0, typename std::enable_if< conjunction< std::is_integral< Indices >... >::value, int >::type = 0>
const Inner< Dtype, dim-1 > & operator() (int idx, Indices... indices) const
 
Inner< Dtype, dim-1 > & operator() (int idx)
 
const Inner< Dtype, dim-1 > & operator() (int idx) const
 
Slicing

Slicing index for Ndarray Unlike Indexing, Slicing returns a new Ndarray.

Inner< Dtype, dim > operator[] (const std::string &input) const
 
template<std::size_t length>
Inner< Dtype, dim > slice (const std::array< Range, length > slices, int start, const int &end) const
 
- Public Member Functions inherited from pp::BaseVector< Inner< Dtype, dim - 1 > >
auto toString (int indentLevel=0) const -> typename std::enable_if< std::integral_constant< bool, std::is_arithmetic< U >::value||std::is_same< U, std::string >::value >::value, std::string >::type
 
auto toString (int indentLevel=0) const -> decltype(std::declval< U >().toString())
 
Dtype & at (int idx)
 
const Dtype & at (int idx) const
 

Detailed Description

template<typename Dtype, std::size_t dim>
struct pp::Inner< Dtype, dim >

Class for multi-dimensional array.


The documentation for this struct was generated from the following file: