cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
pRC::Tensor< T, Ns > Class Template Reference

#include <tensor.hpp>

Public Types

using Type = T
 
template<class C >
using ChangeType = Tensor<C, Ns...>
 
using Subscripts = pRC::Subscripts<Ns...>
 
using Sizes = pRC::Sizes<Ns...>
 
template<Size... Ss>
using ChangeSizes = Tensor<T, Ss...>
 
using Dimension = typename Sizes::Dimension
 
using Value = typename T::Value
 
template<class V , If< IsValue< V > > = 0>
using ChangeValue = Tensor<typename T::template ChangeValue<V>, Ns...>
 
using Signed = typename T::Signed
 
template<Bool R>
using ChangeSigned
 
using Width = typename T::Width
 
template<Size Q>
using ChangeWidth = Tensor<typename T::template ChangeWidth<Q>, Ns...>
 
using IsComplexified = typename T::IsComplexified
 
using Complexify = Tensor<typename T::Complexify, Ns...>
 
using NonComplex = Tensor<typename T::NonComplex, Ns...>
 

Public Member Functions

 ~Tensor ()=default
 
constexpr Tensor (Tensor const &)=default
 
constexpr Tensor (Tensor &&)=default
 
constexpr Tensoroperator= (Tensor const &) &=default
 
constexpr Tensoroperator= (Tensor &&) &=default
 
constexpr Tensor ()=default
 
template<class X , If< IsAssignable< TensorViews::Reference< T, Sizes >, X > > = 0>
constexpr Tensor (X &&other)
 
template<class X , If< IsAssignable< TensorViews::Reference< T, Sizes >, X > > = 0>
constexpr autooperator= (X &&rhs) &
 
template<class... Is, If< All< IsConvertible< Is, Index >... > > = 0, If< IsSatisfied<(sizeof...(Is)==Dimension())> > = 0>
constexpr decltype(autooperator() (Is const ... indices) &&
 
template<class... Is, If< All< IsConvertible< Is, Index >... > > = 0, If< IsSatisfied<(sizeof...(Is)==Dimension())> > = 0>
constexpr decltype(autooperator() (Is const ... indices) const &&
 
template<class... Is, If< All< IsConvertible< Is, Index >... > > = 0, If< IsSatisfied<(sizeof...(Is)==Dimension())> > = 0>
constexpr decltype(autooperator() (Is const ... indices) &
 
template<class... Is, If< All< IsConvertible< Is, Index >... > > = 0, If< IsSatisfied<(sizeof...(Is)==Dimension())> > = 0>
constexpr decltype(autooperator() (Is const ... indices) const &
 
constexpr decltype(autooperator() (Subscripts const &subscripts) &&
 
constexpr decltype(autooperator() (Subscripts const &subscripts) const &&
 
constexpr decltype(autooperator() (Subscripts const &subscripts) &
 
constexpr decltype(autooperator() (Subscripts const &subscripts) const &
 
constexpr decltype(autooperator[] (Index const index) &&
 
constexpr decltype(autooperator[] (Index const index) const &&
 
constexpr decltype(autooperator[] (Index const index) &
 
constexpr decltype(autooperator[] (Index const index) const &
 
template<class X , If< IsInvocable< Add, Tensor &, X > > = 0>
constexpr autooperator+= (X &&rhs) &
 
template<class X , If< IsInvocable< Sub, Tensor &, X > > = 0>
constexpr autooperator-= (X &&rhs) &
 
template<class X , If< IsInvocable< Mul, X, Tensor & > > = 0>
constexpr autoapplyOnTheLeft (X &&lhs) &
 
template<class X , If< IsInvocable< Mul, Tensor &, X > > = 0>
constexpr autoapplyOnTheRight (X &&rhs) &
 
template<class X , If< IsInvocable< Mul, Tensor &, X > > = 0>
constexpr autooperator*= (X &&rhs) &
 
template<class X , If< IsInvocable< Div, Tensor &, X > > = 0>
constexpr autooperator/= (X &&rhs) &
 
template<class E = IsSatisfied<(Dimension() == 0)>, If< E > = 0>
constexpr operator T () const
 

Static Public Member Functions

template<class E = typename Sizes::IsLinearizable, If< E > = 0>
static constexpr auto size ()
 
static constexpr auto size (Index const dimension)
 
template<class X , class... Is, If< IsConstructible< T, X > > = 0, If< All< IsConvertible< Is, Index >... > > = 0, If< IsSatisfied<(sizeof...(Is)==Dimension())> > = 0>
static constexpr auto Single (X &&value, Is const ... indices)
 
template<class X , If< IsConstructible< T, X > > = 0>
static constexpr auto Single (X &&value, Subscripts const &subscripts)
 

Member Typedef Documentation

◆ ChangeSigned

template<class T , Size... Ns>
template<Bool R>
using pRC::Tensor< T, Ns >::ChangeSigned
Initial value:
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402

◆ ChangeSizes

template<class T , Size... Ns>
template<Size... Ss>
using pRC::Tensor< T, Ns >::ChangeSizes = Tensor<T, Ss...>

◆ ChangeType

template<class T , Size... Ns>
template<class C >
using pRC::Tensor< T, Ns >::ChangeType = Tensor<C, Ns...>

◆ ChangeValue

template<class T , Size... Ns>
template<class V , If< IsValue< V > > = 0>
using pRC::Tensor< T, Ns >::ChangeValue = Tensor<typename T::template ChangeValue<V>, Ns...>

◆ ChangeWidth

template<class T , Size... Ns>
template<Size Q>
using pRC::Tensor< T, Ns >::ChangeWidth = Tensor<typename T::template ChangeWidth<Q>, Ns...>

◆ Complexify

template<class T , Size... Ns>
using pRC::Tensor< T, Ns >::Complexify = Tensor<typename T::Complexify, Ns...>

◆ Dimension

template<class T , Size... Ns>
using pRC::Tensor< T, Ns >::Dimension = typename Sizes::Dimension

◆ IsComplexified

template<class T , Size... Ns>
using pRC::Tensor< T, Ns >::IsComplexified = typename T::IsComplexified

◆ NonComplex

template<class T , Size... Ns>
using pRC::Tensor< T, Ns >::NonComplex = Tensor<typename T::NonComplex, Ns...>

◆ Signed

template<class T , Size... Ns>
using pRC::Tensor< T, Ns >::Signed = typename T::Signed

◆ Sizes

template<class T , Size... Ns>
using pRC::Tensor< T, Ns >::Sizes = pRC::Sizes<Ns...>

◆ Subscripts

template<class T , Size... Ns>
using pRC::Tensor< T, Ns >::Subscripts = pRC::Subscripts<Ns...>

◆ Type

template<class T , Size... Ns>
using pRC::Tensor< T, Ns >::Type = T

◆ Value

template<class T , Size... Ns>
using pRC::Tensor< T, Ns >::Value = typename T::Value

◆ Width

template<class T , Size... Ns>
using pRC::Tensor< T, Ns >::Width = typename T::Width

Constructor & Destructor Documentation

◆ ~Tensor()

template<class T , Size... Ns>
pRC::Tensor< T, Ns >::~Tensor ( )
default

◆ Tensor() [1/4]

template<class T , Size... Ns>
constexpr pRC::Tensor< T, Ns >::Tensor ( Tensor< T, Ns > const & )
constexprdefault

◆ Tensor() [2/4]

template<class T , Size... Ns>
constexpr pRC::Tensor< T, Ns >::Tensor ( Tensor< T, Ns > && )
constexprdefault

◆ Tensor() [3/4]

template<class T , Size... Ns>
constexpr pRC::Tensor< T, Ns >::Tensor ( )
constexprdefault

◆ Tensor() [4/4]

template<class T , Size... Ns>
template<class X , If< IsAssignable< TensorViews::Reference< T, Sizes >, X > > = 0>
constexpr pRC::Tensor< T, Ns >::Tensor ( X && other)
inlineconstexpr

Member Function Documentation

◆ applyOnTheLeft()

template<class T , Size... Ns>
template<class X , If< IsInvocable< Mul, X, Tensor & > > = 0>
constexpr auto & pRC::Tensor< T, Ns >::applyOnTheLeft ( X && lhs) &
inlineconstexpr

◆ applyOnTheRight()

template<class T , Size... Ns>
template<class X , If< IsInvocable< Mul, Tensor &, X > > = 0>
constexpr auto & pRC::Tensor< T, Ns >::applyOnTheRight ( X && rhs) &
inlineconstexpr

◆ operator T()

template<class T , Size... Ns>
template<class E = IsSatisfied<(Dimension() == 0)>, If< E > = 0>
constexpr pRC::Tensor< T, Ns >::operator T ( ) const
inlineexplicitconstexpr

◆ operator()() [1/8]

template<class T , Size... Ns>
template<class... Is, If< All< IsConvertible< Is, Index >... > > = 0, If< IsSatisfied<(sizeof...(Is)==Dimension())> > = 0>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator() ( Is const ... indices) &
inlineconstexpr

◆ operator()() [2/8]

template<class T , Size... Ns>
template<class... Is, If< All< IsConvertible< Is, Index >... > > = 0, If< IsSatisfied<(sizeof...(Is)==Dimension())> > = 0>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator() ( Is const ... indices) &&
inlineconstexpr

◆ operator()() [3/8]

template<class T , Size... Ns>
template<class... Is, If< All< IsConvertible< Is, Index >... > > = 0, If< IsSatisfied<(sizeof...(Is)==Dimension())> > = 0>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator() ( Is const ... indices) const &
inlineconstexpr

◆ operator()() [4/8]

template<class T , Size... Ns>
template<class... Is, If< All< IsConvertible< Is, Index >... > > = 0, If< IsSatisfied<(sizeof...(Is)==Dimension())> > = 0>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator() ( Is const ... indices) const &&
inlineconstexpr

◆ operator()() [5/8]

template<class T , Size... Ns>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator() ( Subscripts const & subscripts) &
inlineconstexpr

◆ operator()() [6/8]

template<class T , Size... Ns>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator() ( Subscripts const & subscripts) &&
inlineconstexpr

◆ operator()() [7/8]

template<class T , Size... Ns>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator() ( Subscripts const & subscripts) const &
inlineconstexpr

◆ operator()() [8/8]

template<class T , Size... Ns>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator() ( Subscripts const & subscripts) const &&
inlineconstexpr

◆ operator*=()

template<class T , Size... Ns>
template<class X , If< IsInvocable< Mul, Tensor &, X > > = 0>
constexpr auto & pRC::Tensor< T, Ns >::operator*= ( X && rhs) &
inlineconstexpr

◆ operator+=()

template<class T , Size... Ns>
template<class X , If< IsInvocable< Add, Tensor &, X > > = 0>
constexpr auto & pRC::Tensor< T, Ns >::operator+= ( X && rhs) &
inlineconstexpr

◆ operator-=()

template<class T , Size... Ns>
template<class X , If< IsInvocable< Sub, Tensor &, X > > = 0>
constexpr auto & pRC::Tensor< T, Ns >::operator-= ( X && rhs) &
inlineconstexpr

◆ operator/=()

template<class T , Size... Ns>
template<class X , If< IsInvocable< Div, Tensor &, X > > = 0>
constexpr auto & pRC::Tensor< T, Ns >::operator/= ( X && rhs) &
inlineconstexpr

◆ operator=() [1/3]

template<class T , Size... Ns>
constexpr Tensor & pRC::Tensor< T, Ns >::operator= ( Tensor< T, Ns > && ) &
constexprdefault

◆ operator=() [2/3]

template<class T , Size... Ns>
constexpr Tensor & pRC::Tensor< T, Ns >::operator= ( Tensor< T, Ns > const & ) &
constexprdefault

◆ operator=() [3/3]

template<class T , Size... Ns>
template<class X , If< IsAssignable< TensorViews::Reference< T, Sizes >, X > > = 0>
constexpr auto & pRC::Tensor< T, Ns >::operator= ( X && rhs) &
inlineconstexpr

◆ operator[]() [1/4]

template<class T , Size... Ns>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator[] ( Index const index) &
inlineconstexpr

◆ operator[]() [2/4]

template<class T , Size... Ns>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator[] ( Index const index) &&
inlineconstexpr

◆ operator[]() [3/4]

template<class T , Size... Ns>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator[] ( Index const index) const &
inlineconstexpr

◆ operator[]() [4/4]

template<class T , Size... Ns>
constexpr decltype(auto) pRC::Tensor< T, Ns >::operator[] ( Index const index) const &&
inlineconstexpr

◆ Single() [1/2]

template<class T , Size... Ns>
template<class X , class... Is, If< IsConstructible< T, X > > = 0, If< All< IsConvertible< Is, Index >... > > = 0, If< IsSatisfied<(sizeof...(Is)==Dimension())> > = 0>
static constexpr auto pRC::Tensor< T, Ns >::Single ( X && value,
Is const ... indices )
inlinestaticconstexpr

◆ Single() [2/2]

template<class T , Size... Ns>
template<class X , If< IsConstructible< T, X > > = 0>
static constexpr auto pRC::Tensor< T, Ns >::Single ( X && value,
Subscripts const & subscripts )
inlinestaticconstexpr

◆ size() [1/2]

template<class T , Size... Ns>
template<class E = typename Sizes::IsLinearizable, If< E > = 0>
static constexpr auto pRC::Tensor< T, Ns >::size ( )
inlinestaticconstexpr

◆ size() [2/2]

template<class T , Size... Ns>
static constexpr auto pRC::Tensor< T, Ns >::size ( Index const dimension)
inlinestaticconstexpr

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