Tatooine
Classes | Concepts | Typedefs | Functions | Variables
tatooine::einstein_notation Namespace Reference

Classes

struct  added_contracted_dynamic_tensor
 
struct  added_contracted_static_tensor
 
struct  contracted_dynamic_tensor
 
struct  contracted_indices_aux
 
struct  contracted_indices_aux< type_list< Indices... > >
 
struct  contracted_indices_impl
 
struct  contracted_indices_impl< type_list< type_number_pair< CurIndex, N >, Counts... >, FreeIndices... >
 
struct  contracted_indices_impl< type_list<>, FreeIndices... >
 
struct  contracted_static_tensor
 
struct  free_indices_aux
 
struct  free_indices_aux< type_list< Indices... > >
 
struct  free_indices_impl
 
struct  free_indices_impl< type_list< type_number_pair< CurIndex, N >, Counts... >, FreeIndices... >
 
struct  free_indices_impl< type_list<>, FreeIndices... >
 
struct  index_t
 
struct  indexed_dynamic_tensor
 
struct  indexed_static_tensor
 
struct  indexed_tensors_to_index_list_impl
 
struct  indexed_tensors_to_index_list_impl< type_list< AccumulatedIndices... > >
 
struct  indexed_tensors_to_index_list_impl< type_list< AccumulatedIndices... >, index_t< I >, Ts... >
 
struct  indexed_tensors_to_index_list_impl< type_list< AccumulatedIndices... >, indexed_dynamic_tensor< Tensor, Indices... >, Ts... >
 
struct  indexed_tensors_to_index_list_impl< type_list< AccumulatedIndices... >, indexed_static_tensor< Tensor, Indices... >, Ts... >
 
struct  is_index_impl
 
struct  is_index_impl< index_t< N > >
 

Concepts

concept  index
 

Typedefs

template<typename... Ts>
using indexed_tensors_to_index_list = typename indexed_tensors_to_index_list_impl< type_list<>, Ts... >::type
 
template<typename... Indices>
using free_indices = typename free_indices_aux< indexed_tensors_to_index_list< Indices... > >::type
 
template<typename... Indices>
using contracted_indices = typename contracted_indices_aux< indexed_tensors_to_index_list< Indices... > >::type
 

Functions

template<typename TensorLHS , index... IndicesLHS, typename TensorRHS , index... IndicesRHS>
auto constexpr contract (indexed_dynamic_tensor< TensorLHS, IndicesLHS... > lhs, indexed_dynamic_tensor< TensorRHS, IndicesRHS... > rhs)
 
template<typename TensorLHS , index... IndicesLHS, typename TensorRHS , index... IndicesRHS>
auto operator* (indexed_dynamic_tensor< TensorLHS, IndicesLHS... > lhs, indexed_dynamic_tensor< TensorRHS, IndicesRHS... > rhs)
 
template<typename TensorLHS , index... IndicesLHS, typename TensorRHS , index... IndicesRHS>
auto constexpr contract (indexed_static_tensor< TensorLHS, IndicesLHS... > lhs, indexed_static_tensor< TensorRHS, IndicesRHS... > rhs)
 
template<typename TensorLHS , index... IndicesLHS, typename TensorRHS , index... IndicesRHS>
auto operator* (indexed_static_tensor< TensorLHS, IndicesLHS... > lhs, indexed_static_tensor< TensorRHS, IndicesRHS... > rhs)
 
template<typename... IndexedTensorLHS, typename TensorRHS , index... IndicesRHS, std::size_t... LHSSeq>
auto contract (contracted_static_tensor< IndexedTensorLHS... > lhs, indexed_static_tensor< TensorRHS, IndicesRHS... > rhs, std::index_sequence< LHSSeq... >)
 
template<typename... IndexedTensorLHS, typename TensorRHS , index... IndicesRHS>
auto contract (contracted_static_tensor< IndexedTensorLHS... > lhs, indexed_static_tensor< TensorRHS, IndicesRHS... > rhs)
 
template<typename... IndexedTensorLHS, typename TensorRHS , index... IndicesRHS>
auto operator* (contracted_static_tensor< IndexedTensorLHS... > lhs, indexed_static_tensor< TensorRHS, IndicesRHS... > rhs)
 
template<index... IndicesLHS, typename TensorLHS , typename... IndexedTensorRHS, std::size_t... RHSSeq>
auto contract (indexed_static_tensor< TensorLHS, IndicesLHS... > lhs, contracted_static_tensor< IndexedTensorRHS... > rhs, std::index_sequence< RHSSeq... >)
 
template<index... IndicesLHS, typename TensorLHS , typename... IndexedTensorRHS>
auto contract (indexed_static_tensor< TensorLHS, IndicesLHS... > lhs, contracted_static_tensor< IndexedTensorRHS... > rhs)
 
template<typename TensorLHS , index... IndicesLHS, typename... IndexedTensorRHS>
auto operator* (indexed_static_tensor< TensorLHS, IndicesLHS... > lhs, contracted_static_tensor< IndexedTensorRHS... > rhs)
 
template<typename TensorLHS , index... IndicesLHS, typename TensorRHS , index... IndicesRHS>
auto operator+ (indexed_static_tensor< TensorLHS, IndicesLHS... > lhs, indexed_static_tensor< TensorRHS, IndicesRHS... > rhs)
 
template<typename... IndexedTensorLHS, typename TensorRHS , index... IndicesRHS>
auto operator+ (contracted_static_tensor< IndexedTensorLHS... > lhs, indexed_static_tensor< TensorRHS, IndicesRHS... > rhs)
 
template<typename TensorLHS , index... IndicesLHS, typename... TensorsRHS>
auto operator+ (indexed_static_tensor< TensorLHS, IndicesLHS... > lhs, contracted_static_tensor< TensorsRHS... > rhs)
 
template<typename... TensorsLHS, typename... TensorsRHS>
auto operator+ (contracted_static_tensor< TensorsLHS... > lhs, contracted_static_tensor< TensorsRHS... > rhs)
 
template<typename... ContractedTensorsLHS, typename... TensorsRHS, std::size_t... Seq>
auto add (added_contracted_static_tensor< ContractedTensorsLHS... > lhs, contracted_static_tensor< TensorsRHS... > rhs, std::index_sequence< Seq... >)
 
template<typename... TensorsLHS, typename... ContractedTensorsRHS, std::size_t... Seq>
auto add (contracted_static_tensor< TensorsLHS... > lhs, added_contracted_static_tensor< ContractedTensorsRHS... > rhs, std::index_sequence< Seq... >)
 
template<typename... ContractedTensorsLHS, typename... ContractedTensorsRHS, std::size_t... Seq0, std::size_t... Seq1>
auto add (added_contracted_static_tensor< ContractedTensorsLHS... > lhs, added_contracted_static_tensor< ContractedTensorsRHS... > rhs, std::index_sequence< Seq0... >, std::index_sequence< Seq1... >)
 
template<typename... ContractedTensorsLHS, typename... TensorsRHS>
auto add (added_contracted_static_tensor< ContractedTensorsLHS... > lhs, contracted_static_tensor< TensorsRHS... > rhs)
 
template<typename... TensorsLHS, typename... ContractedTensorsRHS>
auto add (contracted_static_tensor< TensorsLHS... > lhs, added_contracted_static_tensor< ContractedTensorsRHS... > rhs)
 
template<typename... ContractedTensorsLHS, typename... ContractedTensorsRHS>
auto add (added_contracted_static_tensor< ContractedTensorsLHS... > lhs, added_contracted_static_tensor< ContractedTensorsRHS... > rhs)
 
template<typename... ContractedTensorsLHS, typename... TensorsRHS>
auto operator+ (added_contracted_static_tensor< ContractedTensorsLHS... > lhs, contracted_static_tensor< TensorsRHS... > rhs)
 
template<typename... TensorsLHS, typename... ContractedTensorsRHS>
auto operator+ (contracted_static_tensor< TensorsLHS... > lhs, added_contracted_static_tensor< ContractedTensorsRHS... > rhs)
 
template<typename... ContractedTensorsLHS, typename... ContractedTensorsRHS>
auto operator+ (added_contracted_static_tensor< ContractedTensorsLHS... > lhs, added_contracted_static_tensor< ContractedTensorsRHS... > rhs)
 

Variables

static auto constexpr i = index_t<0>{}
 
static auto constexpr j = index_t<1>{}
 
static auto constexpr k = index_t<2>{}
 
static auto constexpr l = index_t<3>{}
 
static auto constexpr m = index_t<4>{}
 
static auto constexpr n = index_t<5>{}
 
static auto constexpr o = index_t<6>{}
 
static auto constexpr p = index_t<7>{}
 
static auto constexpr q = index_t<8>{}
 
static auto constexpr r = index_t<9>{}
 
static auto constexpr s = index_t<10>{}
 
static auto constexpr t = index_t<11>{}
 
static auto constexpr u = index_t<12>{}
 
static auto constexpr v = index_t<13>{}
 
static auto constexpr w = index_t<14>{}
 
template<typename... Ts>
static auto constexpr is_index = (is_index_impl<Ts>::value && ...)
 

Typedef Documentation

◆ contracted_indices

template<typename... Indices>
using tatooine::einstein_notation::contracted_indices = typedef typename contracted_indices_aux< indexed_tensors_to_index_list<Indices...> >::type

◆ free_indices

template<typename... Indices>
using tatooine::einstein_notation::free_indices = typedef typename free_indices_aux<indexed_tensors_to_index_list<Indices...> >::type

◆ indexed_tensors_to_index_list

template<typename... Ts>
using tatooine::einstein_notation::indexed_tensors_to_index_list = typedef typename indexed_tensors_to_index_list_impl<type_list<>, Ts...>::type

Function Documentation

◆ add() [1/6]

template<typename... ContractedTensorsLHS, typename... ContractedTensorsRHS>
auto tatooine::einstein_notation::add ( added_contracted_static_tensor< ContractedTensorsLHS... >  lhs,
added_contracted_static_tensor< ContractedTensorsRHS... >  rhs 
)

◆ add() [2/6]

template<typename... ContractedTensorsLHS, typename... ContractedTensorsRHS, std::size_t... Seq0, std::size_t... Seq1>
auto tatooine::einstein_notation::add ( added_contracted_static_tensor< ContractedTensorsLHS... >  lhs,
added_contracted_static_tensor< ContractedTensorsRHS... >  rhs,
std::index_sequence< Seq0... >  ,
std::index_sequence< Seq1... >   
)

◆ add() [3/6]

template<typename... ContractedTensorsLHS, typename... TensorsRHS>
auto tatooine::einstein_notation::add ( added_contracted_static_tensor< ContractedTensorsLHS... >  lhs,
contracted_static_tensor< TensorsRHS... >  rhs 
)

◆ add() [4/6]

template<typename... ContractedTensorsLHS, typename... TensorsRHS, std::size_t... Seq>
auto tatooine::einstein_notation::add ( added_contracted_static_tensor< ContractedTensorsLHS... >  lhs,
contracted_static_tensor< TensorsRHS... >  rhs,
std::index_sequence< Seq... >   
)

◆ add() [5/6]

template<typename... TensorsLHS, typename... ContractedTensorsRHS>
auto tatooine::einstein_notation::add ( contracted_static_tensor< TensorsLHS... >  lhs,
added_contracted_static_tensor< ContractedTensorsRHS... >  rhs 
)

◆ add() [6/6]

template<typename... TensorsLHS, typename... ContractedTensorsRHS, std::size_t... Seq>
auto tatooine::einstein_notation::add ( contracted_static_tensor< TensorsLHS... >  lhs,
added_contracted_static_tensor< ContractedTensorsRHS... >  rhs,
std::index_sequence< Seq... >   
)

◆ contract() [1/6]

template<typename... IndexedTensorLHS, typename TensorRHS , index... IndicesRHS>
auto tatooine::einstein_notation::contract ( contracted_static_tensor< IndexedTensorLHS... >  lhs,
indexed_static_tensor< TensorRHS, IndicesRHS... >  rhs 
)

◆ contract() [2/6]

template<typename... IndexedTensorLHS, typename TensorRHS , index... IndicesRHS, std::size_t... LHSSeq>
auto tatooine::einstein_notation::contract ( contracted_static_tensor< IndexedTensorLHS... >  lhs,
indexed_static_tensor< TensorRHS, IndicesRHS... >  rhs,
std::index_sequence< LHSSeq... >   
)

◆ contract() [3/6]

template<typename TensorLHS , index... IndicesLHS, typename TensorRHS , index... IndicesRHS>
auto constexpr tatooine::einstein_notation::contract ( indexed_dynamic_tensor< TensorLHS, IndicesLHS... >  lhs,
indexed_dynamic_tensor< TensorRHS, IndicesRHS... >  rhs 
)
constexpr

◆ contract() [4/6]

template<index... IndicesLHS, typename TensorLHS , typename... IndexedTensorRHS>
auto tatooine::einstein_notation::contract ( indexed_static_tensor< TensorLHS, IndicesLHS... >  lhs,
contracted_static_tensor< IndexedTensorRHS... >  rhs 
)

◆ contract() [5/6]

template<index... IndicesLHS, typename TensorLHS , typename... IndexedTensorRHS, std::size_t... RHSSeq>
auto tatooine::einstein_notation::contract ( indexed_static_tensor< TensorLHS, IndicesLHS... >  lhs,
contracted_static_tensor< IndexedTensorRHS... >  rhs,
std::index_sequence< RHSSeq... >   
)

◆ contract() [6/6]

template<typename TensorLHS , index... IndicesLHS, typename TensorRHS , index... IndicesRHS>
auto constexpr tatooine::einstein_notation::contract ( indexed_static_tensor< TensorLHS, IndicesLHS... >  lhs,
indexed_static_tensor< TensorRHS, IndicesRHS... >  rhs 
)
constexpr

◆ operator*() [1/4]

template<typename... IndexedTensorLHS, typename TensorRHS , index... IndicesRHS>
auto tatooine::einstein_notation::operator* ( contracted_static_tensor< IndexedTensorLHS... >  lhs,
indexed_static_tensor< TensorRHS, IndicesRHS... >  rhs 
)

◆ operator*() [2/4]

template<typename TensorLHS , index... IndicesLHS, typename TensorRHS , index... IndicesRHS>
auto tatooine::einstein_notation::operator* ( indexed_dynamic_tensor< TensorLHS, IndicesLHS... >  lhs,
indexed_dynamic_tensor< TensorRHS, IndicesRHS... >  rhs 
)

◆ operator*() [3/4]

template<typename TensorLHS , index... IndicesLHS, typename... IndexedTensorRHS>
auto tatooine::einstein_notation::operator* ( indexed_static_tensor< TensorLHS, IndicesLHS... >  lhs,
contracted_static_tensor< IndexedTensorRHS... >  rhs 
)

◆ operator*() [4/4]

template<typename TensorLHS , index... IndicesLHS, typename TensorRHS , index... IndicesRHS>
auto tatooine::einstein_notation::operator* ( indexed_static_tensor< TensorLHS, IndicesLHS... >  lhs,
indexed_static_tensor< TensorRHS, IndicesRHS... >  rhs 
)

◆ operator+() [1/7]

template<typename... ContractedTensorsLHS, typename... ContractedTensorsRHS>
auto tatooine::einstein_notation::operator+ ( added_contracted_static_tensor< ContractedTensorsLHS... >  lhs,
added_contracted_static_tensor< ContractedTensorsRHS... >  rhs 
)

◆ operator+() [2/7]

template<typename... ContractedTensorsLHS, typename... TensorsRHS>
auto tatooine::einstein_notation::operator+ ( added_contracted_static_tensor< ContractedTensorsLHS... >  lhs,
contracted_static_tensor< TensorsRHS... >  rhs 
)

◆ operator+() [3/7]

template<typename... IndexedTensorLHS, typename TensorRHS , index... IndicesRHS>
auto tatooine::einstein_notation::operator+ ( contracted_static_tensor< IndexedTensorLHS... >  lhs,
indexed_static_tensor< TensorRHS, IndicesRHS... >  rhs 
)

◆ operator+() [4/7]

template<typename... TensorsLHS, typename... ContractedTensorsRHS>
auto tatooine::einstein_notation::operator+ ( contracted_static_tensor< TensorsLHS... >  lhs,
added_contracted_static_tensor< ContractedTensorsRHS... >  rhs 
)

◆ operator+() [5/7]

template<typename... TensorsLHS, typename... TensorsRHS>
auto tatooine::einstein_notation::operator+ ( contracted_static_tensor< TensorsLHS... >  lhs,
contracted_static_tensor< TensorsRHS... >  rhs 
)

◆ operator+() [6/7]

template<typename TensorLHS , index... IndicesLHS, typename... TensorsRHS>
auto tatooine::einstein_notation::operator+ ( indexed_static_tensor< TensorLHS, IndicesLHS... >  lhs,
contracted_static_tensor< TensorsRHS... >  rhs 
)

◆ operator+() [7/7]

template<typename TensorLHS , index... IndicesLHS, typename TensorRHS , index... IndicesRHS>
auto tatooine::einstein_notation::operator+ ( indexed_static_tensor< TensorLHS, IndicesLHS... >  lhs,
indexed_static_tensor< TensorRHS, IndicesRHS... >  rhs 
)

Variable Documentation

◆ i

auto constexpr tatooine::einstein_notation::i = index_t<0>{}
inlinestaticconstexpr

◆ is_index

template<typename... Ts>
auto constexpr tatooine::einstein_notation::is_index = (is_index_impl<Ts>::value && ...)
staticconstexpr

◆ j

auto constexpr tatooine::einstein_notation::j = index_t<1>{}
inlinestaticconstexpr

◆ k

auto constexpr tatooine::einstein_notation::k = index_t<2>{}
inlinestaticconstexpr

◆ l

auto constexpr tatooine::einstein_notation::l = index_t<3>{}
inlinestaticconstexpr

◆ m

auto constexpr tatooine::einstein_notation::m = index_t<4>{}
inlinestaticconstexpr

◆ n

auto constexpr tatooine::einstein_notation::n = index_t<5>{}
inlinestaticconstexpr

◆ o

auto constexpr tatooine::einstein_notation::o = index_t<6>{}
inlinestaticconstexpr

◆ p

auto constexpr tatooine::einstein_notation::p = index_t<7>{}
inlinestaticconstexpr

◆ q

auto constexpr tatooine::einstein_notation::q = index_t<8>{}
inlinestaticconstexpr

◆ r

auto constexpr tatooine::einstein_notation::r = index_t<9>{}
inlinestaticconstexpr

◆ s

auto constexpr tatooine::einstein_notation::s = index_t<10>{}
inlinestaticconstexpr

◆ t

auto constexpr tatooine::einstein_notation::t = index_t<11>{}
inlinestaticconstexpr

◆ u

auto constexpr tatooine::einstein_notation::u = index_t<12>{}
inlinestaticconstexpr

◆ v

auto constexpr tatooine::einstein_notation::v = index_t<13>{}
inlinestaticconstexpr

◆ w

auto constexpr tatooine::einstein_notation::w = index_t<14>{}
inlinestaticconstexpr