TensorExpressions::NumberAsExpression Struct Reference

Defines an expression representing a double More...

#include <NumberAsExpression.hpp>

## Public Types

using type = double

using symmetry = tmpl::list<>

using index_list = tmpl::list<>

using args_list = tmpl::list<>

## Public Member Functions

NumberAsExpression (const double number)

template<typename... TensorIndices, Requires< sizeof...(TensorIndices)==0 > = nullptr>
double get (const std::array< size_t, 0 > &) const noexcept
Returns the number represented by the expression. More...

## Static Public Attributes

static constexpr auto num_tensor_indices = 0

## Detailed Description

Defines an expression representing a double

## ◆ get()

template<typename... TensorIndices, Requires< sizeof...(TensorIndices)==0 > = nullptr>
 double TensorExpressions::NumberAsExpression::get ( const std::array< size_t, 0 > & ) const
inlinenoexcept

Returns the number represented by the expression.

### Details

While a NumberAsExpression does not store a rank 0 Tensor, it does represent one. This is why this template is only defined for the case where TensorIndices is empty.

Template Parameters
 TensorIndices the TensorIndexs of the LHS tensor and RHS tensor expression

Returns: the number represented by this expression

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