Loading [MathJax]/extensions/tex2jax.js
Tatooine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices > Struct Template Reference

#include <indexed_static_tensor.h>

Collaboration diagram for tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >:
[legend]

Public Types

using tensor_type = std::decay_t< Tensor >
 
using value_type = typename tensor_type::value_type
 
using indices = type_list< Indices... >
 
template<std::size_t I>
using index_at = typename indices::template at< I >
 

Public Member Functions

 indexed_static_tensor (Tensor t)
 
auto tensor () const -> auto const &
 
auto tensor () -> auto &
 
template<typename... ContractedTensors, std::size_t... Seq>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto assign (added_contracted_static_tensor< ContractedTensors... > other, std::index_sequence< Seq... >)
 
template<typename... IndexedTensors, std::size_t... FreeIndexSequence, std::size_t... ContractedIndexSequence, std::size_t... ContractedTensorsSequence>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto add (contracted_static_tensor< IndexedTensors... > other, std::index_sequence< FreeIndexSequence... >, std::index_sequence< ContractedIndexSequence... >, std::index_sequence< ContractedTensorsSequence... >)
 
template<typename... IndexedTensors>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto operator+= (contracted_static_tensor< IndexedTensors... > other) -> indexed_static_tensor &
 
template<typename... IndexedTensors>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto assign (contracted_static_tensor< IndexedTensors... > other)
 
template<typename... IndexedTensors>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto operator= (contracted_static_tensor< IndexedTensors... > other) -> indexed_static_tensor &
 
template<typename... ContractedTensors>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto operator= (added_contracted_static_tensor< ContractedTensors... > other) -> indexed_static_tensor &
 
template<typename Tensors , typename... Is>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto operator= (indexed_static_tensor< Tensors, Is... > other) -> indexed_static_tensor &
 
template<typename LHS , typename RHS , typename I , typename J , typename K >
auto operator= (contracted_static_tensor< indexed_static_tensor< LHS, I, J >, indexed_static_tensor< RHS, J, K > > other) -> indexed_static_tensor &
 A(i,k) = B(i,j) * C(j, k) More...
 

Static Public Member Functions

static auto index_map ()
 
template<std::size_t... Seq>
static auto constexpr index_map (std::index_sequence< Seq... >)
 
static auto constexpr rank ()
 
template<std::size_t I>
static auto constexpr size ()
 
template<typename E >
static auto constexpr size ()
 
template<typename E >
static auto constexpr contains () -> bool
 

Static Private Member Functions

template<std::size_t I, typename E , typename HeadIndex , typename... TailIndices>
static auto constexpr size_ ()
 

Private Attributes

Tensor m_tensor
 

Member Typedef Documentation

◆ index_at

template<static_tensor Tensor, index... Indices>
template<std::size_t I>
using tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::index_at = typename indices::template at<I>

◆ indices

template<static_tensor Tensor, index... Indices>
using tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::indices = type_list<Indices...>

◆ tensor_type

template<static_tensor Tensor, index... Indices>
using tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::tensor_type = std::decay_t<Tensor>

◆ value_type

template<static_tensor Tensor, index... Indices>
using tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::value_type = typename tensor_type::value_type

Constructor & Destructor Documentation

◆ indexed_static_tensor()

template<static_tensor Tensor, index... Indices>
tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::indexed_static_tensor ( Tensor  t)
inlineexplicit

Member Function Documentation

◆ add()

template<static_tensor Tensor, index... Indices>
template<typename... IndexedTensors, std::size_t... FreeIndexSequence, std::size_t... ContractedIndexSequence, std::size_t... ContractedTensorsSequence>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::add ( contracted_static_tensor< IndexedTensors... >  other,
std::index_sequence< FreeIndexSequence... >  ,
std::index_sequence< ContractedIndexSequence... >  ,
std::index_sequence< ContractedTensorsSequence... >   
)
inline

◆ assign() [1/2]

template<static_tensor Tensor, index... Indices>
template<typename... ContractedTensors, std::size_t... Seq>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::assign ( added_contracted_static_tensor< ContractedTensors... >  other,
std::index_sequence< Seq... >   
)
inline

◆ assign() [2/2]

template<static_tensor Tensor, index... Indices>
template<typename... IndexedTensors>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::assign ( contracted_static_tensor< IndexedTensors... >  other)
inline

◆ contains()

template<static_tensor Tensor, index... Indices>
template<typename E >
static auto constexpr tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::contains ( ) -> bool
inlinestaticconstexpr

◆ index_map() [1/2]

template<static_tensor Tensor, index... Indices>
static auto tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::index_map ( )
inlinestatic

◆ index_map() [2/2]

template<static_tensor Tensor, index... Indices>
template<std::size_t... Seq>
static auto constexpr tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::index_map ( std::index_sequence< Seq... >  )
inlinestaticconstexpr

◆ operator+=()

template<static_tensor Tensor, index... Indices>
template<typename... IndexedTensors>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::operator+= ( contracted_static_tensor< IndexedTensors... >  other) -> indexed_static_tensor&
inline

◆ operator=() [1/4]

template<static_tensor Tensor, index... Indices>
template<typename... ContractedTensors>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::operator= ( added_contracted_static_tensor< ContractedTensors... >  other) -> indexed_static_tensor&
inline

◆ operator=() [2/4]

template<static_tensor Tensor, index... Indices>
template<typename LHS , typename RHS , typename I , typename J , typename K >
auto tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::operator= ( contracted_static_tensor< indexed_static_tensor< LHS, I, J >, indexed_static_tensor< RHS, J, K > >  other) -> indexed_static_tensor&
inline

A(i,k) = B(i,j) * C(j, k)

◆ operator=() [3/4]

template<static_tensor Tensor, index... Indices>
template<typename... IndexedTensors>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::operator= ( contracted_static_tensor< IndexedTensors... >  other) -> indexed_static_tensor&
inline

◆ operator=() [4/4]

template<static_tensor Tensor, index... Indices>
template<typename Tensors , typename... Is>
requires (!is_const<std::remove_reference_t<Tensor>>)
auto tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::operator= ( indexed_static_tensor< Tensors, Is... >  other) -> indexed_static_tensor&
inline

◆ rank()

template<static_tensor Tensor, index... Indices>
static auto constexpr tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::rank ( )
inlinestaticconstexpr

◆ size() [1/2]

template<static_tensor Tensor, index... Indices>
template<std::size_t I>
static auto constexpr tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::size ( )
inlinestaticconstexpr

◆ size() [2/2]

template<static_tensor Tensor, index... Indices>
template<typename E >
static auto constexpr tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::size ( )
inlinestaticconstexpr

◆ size_()

template<static_tensor Tensor, index... Indices>
template<std::size_t I, typename E , typename HeadIndex , typename... TailIndices>
static auto constexpr tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::size_ ( )
inlinestaticconstexprprivate

◆ tensor() [1/2]

template<static_tensor Tensor, index... Indices>
auto tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::tensor ( ) -> auto&
inline

◆ tensor() [2/2]

template<static_tensor Tensor, index... Indices>
auto tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::tensor ( ) const -> auto const&
inline

Member Data Documentation

◆ m_tensor

template<static_tensor Tensor, index... Indices>
Tensor tatooine::einstein_notation::indexed_static_tensor< Tensor, Indices >::m_tensor
private

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