wuzp
Wrong Unit? Zero Points! Compile-time checks for units, coordinate systems and points vs. vectors.
Loading...
Searching...
No Matches
wuzp::Indices< VariancesT_ > Struct Template Reference

The indices of a tensor, in their order, e.g. Indices<Up, Down> for a linear map T^i_j, Indices<Down, Down> for a bilinear form such as a mass matrix M_ij, Indices<Up> for a vector and Indices<> for a scalar. More...

#include <wuzp/core/Indices.hpp>

Static Public Attributes

static constexpr int RankV = static_cast<int>(sizeof...(VariancesT_))
 The number of indices.

Detailed Description

template<UpOrDown... VariancesT_>
struct wuzp::Indices< VariancesT_ >

The indices of a tensor, in their order, e.g. Indices<Up, Down> for a linear map T^i_j, Indices<Down, Down> for a bilinear form such as a mass matrix M_ij, Indices<Up> for a vector and Indices<> for a scalar.

The matrix of the components stores the first index as the row and the second index as the column, like the matrix M^i_j in Carroll, eq. 1.54 (https://arxiv.org/abs/gr-qc/9712019), with vectors as columns and covectors as rows (eq. 1.39). A tensor of rank 0 is stored as a 1x1 matrix, a vector (an upper index) as a column, a covector (a lower index) as a row, and a tensor of rank 2 as a square matrix. A tensor with an upper index may also store a batch of vectors or points, one per column, e.g. a point cloud, which transformations, sums, differences, comparisons, and products and quotients with scalars accept, but not the operations that are only defined for a single vector, e.g. the inner product.

Definition at line 37 of file Indices.hpp.

Member Data Documentation

◆ RankV

template<UpOrDown... VariancesT_>
int wuzp::Indices< VariancesT_ >::RankV = static_cast<int>(sizeof...(VariancesT_))
staticconstexpr

The number of indices.

Definition at line 39 of file Indices.hpp.


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