|
MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
|
Antisymmetric (skew-symmetric) rank-2 tensor. More...
#include <symmetric.hpp>
Public Types | |
| using | value_type = Value |
| using | size_type = std::size_t |
Public Member Functions | |
| antisymmetric_tensor ()=default | |
| void | set (size_type i, size_type j, const Value &val) |
| Set the (i,j) component where i < j. | |
| Value | operator() (size_type i, size_type j) const |
| Access: returns -component for (j,i), zero for diagonal. | |
| tensor< Value, 2, Dim > | to_full () const |
| Convert to a full tensor. | |
| bool | operator== (const antisymmetric_tensor &other) const |
Static Public Member Functions | |
| static constexpr size_type | stored_size () |
Static Public Attributes | |
| static constexpr size_type | rank = 2 |
| static constexpr size_type | dimension = Dim |
| static constexpr size_type | num_stored = detail_sym::asym2_count(Dim) |
Antisymmetric (skew-symmetric) rank-2 tensor.
T(i,j) == -T(j,i), T(i,i) == 0. Stores only D*(D-1)/2 independent components (strictly upper triangle).
| using mtl::tensor::antisymmetric_tensor< Value, Dim >::size_type = std::size_t |
| using mtl::tensor::antisymmetric_tensor< Value, Dim >::value_type = Value |
|
default |
|
inline |
Access: returns -component for (j,i), zero for diagonal.
|
inline |
|
inline |
Set the (i,j) component where i < j.
Setting (j,i) sets -(i,j). Setting a diagonal element (i == j) is a no-op: the diagonal of an antisymmetric tensor is structurally zero and has no storage slot.
|
inlinestaticconstexpr |
|
inline |
Convert to a full tensor.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |