SpECTRE  v2024.05.11
tenex::NumberAsExpression< DataType > Struct Template Reference

Defines an expression representing a number. More...

#include <NumberAsExpression.hpp>

Public Types

using type = DataType
 The type of the data being stored in the result of the expression.
 
using symmetry = tmpl::list<>
 The list of TensorIndexTypes of the result of the expression.
 
using index_list = tmpl::list<>
 The list of TensorIndexTypes of the result of the expression.
 
using args_list = tmpl::list<>
 The list of generic TensorIndexs of the result of the expression.
 

Public Member Functions

 NumberAsExpression (const type &number)
 
template<typename LhsTensor >
void assert_lhs_tensor_not_in_rhs_expression (const gsl::not_null< LhsTensor * >) const =delete
 
template<typename LhsTensorIndices , typename LhsTensor >
void assert_lhs_tensorindices_same_in_rhs (const gsl::not_null< LhsTensor * > lhs_tensor) const =delete
 
size_t get_rhs_tensor_component_size () const =delete
 
type get (const std::array< size_t, num_tensor_indices > &) const
 Returns the number represented by the expression. More...
 
template<typename ResultType >
type get_primary (const ResultType &, const std::array< size_t, num_tensor_indices > &) const
 Returns the number represented by the expression. More...
 
template<typename ResultType >
void evaluate_primary_subtree (ResultType &, const std::array< size_t, num_tensor_indices > &) const =delete
 

Static Public Attributes

static constexpr auto num_tensor_indices = 0
 The number of tensor indices in the result of the expression.
 
static constexpr size_t num_ops_left_child = 0
 The number of arithmetic tensor operations done in the subtree for the left operand, which is 0 because this is a leaf expression.
 
static constexpr size_t num_ops_right_child = 0
 The number of arithmetic tensor operations done in the subtree for the right operand, which is 0 because this is a leaf expression.
 
static constexpr size_t num_ops_subtree = 0
 The total number of arithmetic tensor operations done in this expression's whole subtree, which is 0 because this is a leaf expression.
 
static constexpr size_t height_relative_to_closest_tensor_leaf_in_subtree
 The height of this expression's node in the expression tree relative to the closest TensorAsExpression leaf in its subtree. Because this expression type is leaf, the height for this type is set to the maximum size_t value to encode a sense of maximal height. More...
 
static constexpr bool is_primary_end = true
 If on the primary path, whether or not the expression is an ending point of a leg.
 
static constexpr size_t num_ops_to_evaluate_primary_left_child = 0
 If on the primary path, this is the remaining number of arithmetic tensor operations that need to be done in the subtree of the child along the primary path, given that we will have already computed the whole subtree at the next lowest leg's starting point. This is just 0 because this expression is a leaf.
 
static constexpr size_t num_ops_to_evaluate_primary_right_child = 0
 If on the primary path, this is the remaining number of arithmetic tensor operations that need to be done in the right operand's subtree. This is just 0 because this expression is a leaf.
 
static constexpr size_t num_ops_to_evaluate_primary_subtree = 0
 If on the primary path, this is the remaining number of arithmetic tensor operations that need to be done for this expression's subtree, given that we will have already computed the subtree at the next lowest leg's starting point. This is just 0 because this expression is a leaf.
 
static constexpr bool is_primary_start = false
 If on the primary path, whether or not the expression is a starting point of a leg.
 
static constexpr bool primary_child_subtree_contains_primary_start = false
 If on the primary path, whether or not the expression's child along the primary path is a subtree that contains a starting point of a leg along the primary path. This is always falls because this expression is a leaf.
 
static constexpr bool primary_subtree_contains_primary_start
 If on the primary path, whether or not this subtree contains a starting point of a leg along the primary path. More...
 

Detailed Description

template<typename DataType>
struct tenex::NumberAsExpression< DataType >

Defines an expression representing a number.

Details

For details on aliases and members defined in this class, as well as general TensorExpression terminology used in its members' documentation, see documentation for TensorExpression.

Member Function Documentation

◆ get()

template<typename DataType >
type tenex::NumberAsExpression< DataType >::get ( const std::array< size_t, num_tensor_indices > &  ) const
inline

Returns the number represented by the expression.

Returns: the number represented by this expression

◆ get_primary()

template<typename DataType >
template<typename ResultType >
type tenex::NumberAsExpression< DataType >::get_primary ( const ResultType &  ,
const std::array< size_t, num_tensor_indices > &   
) const
inline

Returns the number represented by the expression.

Returns: the number represented by this expression

Member Data Documentation

◆ height_relative_to_closest_tensor_leaf_in_subtree

template<typename DataType >
constexpr size_t tenex::NumberAsExpression< DataType >::height_relative_to_closest_tensor_leaf_in_subtree
staticconstexpr
Initial value:

The height of this expression's node in the expression tree relative to the closest TensorAsExpression leaf in its subtree. Because this expression type is leaf, the height for this type is set to the maximum size_t value to encode a sense of maximal height.

◆ primary_subtree_contains_primary_start

template<typename DataType >
constexpr bool tenex::NumberAsExpression< DataType >::primary_subtree_contains_primary_start
staticconstexpr
Initial value:
=
static constexpr bool is_primary_start
If on the primary path, whether or not the expression is a starting point of a leg.
Definition: NumberAsExpression.hpp:96

If on the primary path, whether or not this subtree contains a starting point of a leg along the primary path.


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