MiniTensor Version of the Day
Loading...
Searching...
No Matches
Norms and Invariants

Scalar measures of tensors: norms, determinant, trace, principal invariants, and argmax queries. More...

Functions

template<typename T , Index N>
KOKKOS_INLINE_FUNCTIONminitensor::norm (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTIONminitensor::norm_1 (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTIONminitensor::norm_infinity (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::subtensor (Tensor< T, N > const &A, Index const i, Index const j)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTIONminitensor::det (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTIONminitensor::trace (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTIONminitensor::I1 (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTIONminitensor::I2 (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTIONminitensor::I3 (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTIONminitensor::norm_off_diagonal (Tensor< T, N > const &A)
 
template<typename T , Index N>
std::pair< Index, Indexminitensor::arg_max_abs (Tensor< T, N > const &A)
 
template<typename T , Index N>
std::pair< Index, Indexminitensor::arg_max_off_diagonal (Tensor< T, N > const &A)
 

Detailed Description

Scalar measures of tensors: norms, determinant, trace, principal invariants, and argmax queries.

Function Documentation

◆ norm()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION T minitensor::norm ( Tensor< T, N > const &  A)

Tensor Frobenius norm

Returns
\( \sqrt{A:A} \)

Definition at line 138 of file MiniTensor_Norms.h.

◆ norm_1()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION T minitensor::norm_1 ( Tensor< T, N > const &  A)

Tensor 1-norm

Returns
\( \max_{j \in {0,1,2}}\Sigma_{i=0}^2 |A_{ij}| \)

Definition at line 181 of file MiniTensor_Norms.h.

◆ norm_infinity()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION T minitensor::norm_infinity ( Tensor< T, N > const &  A)

Tensor infinity-norm

Returns
\( \max_{i \in {0,1,2}}\Sigma_{j=0}^2 |A_{ij}| \)

Definition at line 239 of file MiniTensor_Norms.h.

◆ subtensor()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::subtensor ( Tensor< T, N > const &  A,
Index const  i,
Index const  j 
)

Subtensor

Parameters
Atensor
iindex
jindex
Returns
Subtensor with i-row and j-col deleted.

Definition at line 504 of file MiniTensor_Norms.h.

◆ det()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION T minitensor::det ( Tensor< T, N > const &  A)

Determinant

Returns
\( \det A \)

Definition at line 300 of file MiniTensor_Norms.h.

◆ trace()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION T minitensor::trace ( Tensor< T, N > const &  A)

Trace

Returns
\( A:I \)

Definition at line 355 of file MiniTensor_Norms.h.

◆ I1()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION T minitensor::I1 ( Tensor< T, N > const &  A)

First invariant, trace

Returns
\( I_A = A:I \)

Definition at line 395 of file MiniTensor_Norms.h.

◆ I2()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION T minitensor::I2 ( Tensor< T, N > const &  A)

Second invariant

Returns
\( II_A = \frac{1}{2}((I_A)^2-I_{A^2}) \)

Definition at line 408 of file MiniTensor_Norms.h.

◆ I3()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION T minitensor::I3 ( Tensor< T, N > const &  A)

Third invariant

Returns
\( III_A = \det A \)

Definition at line 457 of file MiniTensor_Norms.h.

◆ norm_off_diagonal()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION T minitensor::norm_off_diagonal ( Tensor< T, N > const &  A)

Off-diagonal norm. Useful for SVD and other algorithms that rely on Jacobi-type procedures.

Returns
\( \sqrt(\sum_i \sum_{j, j\neq i} a_{ij}^2) \)

Definition at line 539 of file MiniTensor_Norms.h.

◆ arg_max_abs()

template<typename T , Index N>
std::pair< Index, Index > minitensor::arg_max_abs ( Tensor< T, N > const &  A)

Arg max abs. Useful for inverse and other algorithms that rely on Jacobi-type procedures.

Returns
\( (p,q) = arg max_{i,j} |a_{ij}| \)

Definition at line 581 of file MiniTensor_Norms.h.

◆ arg_max_off_diagonal()

template<typename T , Index N>
std::pair< Index, Index > minitensor::arg_max_off_diagonal ( Tensor< T, N > const &  A)

Arg max off-diagonal. Useful for SVD and other algorithms that rely on Jacobi-type procedures.

Returns
\( (p,q) = arg max_{i \neq j} |a_{ij}| \)

Definition at line 612 of file MiniTensor_Norms.h.