|
template<typename T = NestedObject, std::enable_if_t< std::is_default_constructible_v< T > and(not has_dynamic_dimensions< NestedObject >), int > = 0> |
| HermitianAdapter () |
| Default constructor.
|
|
template<typename Arg > |
| HermitianAdapter (Arg &&arg) |
| Construct from a diagonal matrix if NestedObject is a diagonal_adapter.
|
|
template<typename Arg > |
| HermitianAdapter (Arg &&arg) |
| Construct from a diagonal matrix if NestedObject is not diagonal.
|
|
template<typename Arg > |
| HermitianAdapter (Arg &&arg) |
| Construct from a hermitian, non-diagonal wrapper of the same storage type.
|
|
template<typename Arg , std::enable_if_t< hermitian_adapter< Arg > and(not diagonal_matrix< Arg >) and(hermitian_adapter_type_of< Arg >::value !=storage_triangle) and square_shaped< nested_object_of_t< Arg >, Applicability::permitted > and std::is_constructible_v< NestedObject, decltype(transpose(nested_object(std::declval< Arg &&>())))>, int > = 0> |
| HermitianAdapter (Arg &&arg) |
| Construct from a hermitian, non-diagonal wrapper of the opposite storage type.
|
|
template<typename Arg , std::enable_if_t< hermitian_matrix< Arg > and(not diagonal_matrix< Arg >) and(not has_nested_object< Arg >) and(hermitian_adapter_type_of< Arg >::value==storage_triangle) and std::is_constructible_v< NestedObject, Arg &&>, int > = 0> |
| HermitianAdapter (Arg &&arg) |
| Construct from a hermitian matrix of the same storage type and is not a wrapper.
|
|
template<typename Arg , std::enable_if_t< hermitian_matrix< Arg > and(not diagonal_matrix< Arg >) and(not has_nested_object< Arg >) and(hermitian_adapter_type_of< Arg >::value !=storage_triangle) and std::is_constructible_v< NestedObject, decltype(transpose(std::declval< Arg &&>()))>, int > = 0> |
| HermitianAdapter (Arg &&arg) |
| Construct from a hermitian matrix, of the opposite storage type, that is not a wrapper.
|
|
template<typename Arg , std::enable_if_t< square_shaped< Arg, Applicability::permitted > and not hermitian_adapter< Arg > and not diagonal_matrix< NestedObject > and std::is_constructible_v< NestedObject, Arg &&>, int > = 0> |
| HermitianAdapter (Arg &&arg) |
| Construct from a non-hermitian matrix if NestedObject is not diagonal.
|
|
template<typename Arg , std::enable_if_t< square_shaped< Arg, Applicability::permitted > and(not hermitian_matrix< Arg >) and diagonal_matrix< NestedObject > and std::is_constructible_v< NestedObject, decltype(diagonal_of(std::declval< Arg &&>()))>, int > = 0> |
| HermitianAdapter (Arg &&arg) |
| Construct from a non-hermitian matrix if NestedObject is diagonal.
|
|
template<typename ... Args, std::enable_if_t< std::conjunction_v< std::is_convertible< Args, const Scalar >... > and(sizeof...(Args) > 0> |
| HermitianAdapter (Args ... args) |
| Construct from a list of scalar coefficients, in row-major order. More...
|
|
template<typename Arg > |
auto & | operator= (Arg &&arg) |
| Assign from another hermitian_matrix.
|
|
template<typename Arg , HermitianAdapterType t, std::enable_if_t< vector_space_descriptors_may_match_with< Arg, NestedObject > and(diagonal_matrix< Arg > or(not diagonal_matrix< NestedObject >)), int > = 0> |
auto & | operator+= (const HermitianAdapter< Arg, t > &arg) |
|
template<typename Arg , HermitianAdapterType t, std::enable_if_t< vector_space_descriptors_may_match_with< Arg, NestedObject > and(diagonal_matrix< Arg > or(not diagonal_matrix< NestedObject >)), int > = 0> |
auto & | operator-= (const HermitianAdapter< Arg, t > &arg) |
|
template<typename S , std::enable_if_t< std::is_convertible_v< S, Scalar >, int > = 0> |
auto & | operator*= (const S s) |
|
template<typename S , std::enable_if_t< std::is_convertible_v< S, Scalar >, int > = 0> |
auto & | operator/= (const S s) |
|
decltype(auto) | operator- () const & |
|
decltype(auto) | operator- () const && |
|
template<typename Arg , typename S , std::enable_if_t< std::is_same_v< std::decay_t< Arg >, HermitianAdapter > and std::is_convertible_v< S, const scalar_type_of_t< Arg >>> > |
decltype(auto) friend | operator* (Arg &&arg, S s) |
|
template<typename Arg , typename S , std::enable_if_t< std::is_same_v< std::decay_t< Arg >, HermitianAdapter > and std::is_convertible_v< S, const scalar_type_of_t< Arg >>> > |
decltype(auto) friend | operator* (S s, Arg &&arg) |
|
template<typename Arg , typename S , std::enable_if_t< std::is_same_v< std::decay_t< Arg >, HermitianAdapter > and std::is_convertible_v< S, const scalar_type_of_t< Arg >>> > |
decltype(auto) friend | operator/ (Arg &&arg, S s) |
|
constexpr | AdapterBase () |
| Default constructor.
|
|
constexpr | AdapterBase (Arg &&arg, typename std::enable_if< std::is_constructible< NestedObject, Arg && >::value >::type *=0) |
| Construct from a compatible indexible type.
|
|
constexpr NestedObject & | nested_object () & |
| Get the nested object.
|
|
constexpr const NestedObject & | nested_object () const & |
|
constexpr NestedObject && | nested_object () && |
|
constexpr const NestedObject && | nested_object () const && |
|
constexpr auto | operator[] (const Indices &indices) & |
| Access a component at a set of indices. More...
|
|
constexpr auto | operator[] (const Indices &indices) && |
|
constexpr auto | operator[] (const Indices &indices) const & |
|
constexpr auto | operator[] (const Indices &indices) const && |
|
template<typename NestedObject, HermitianAdapterType storage_triangle>
struct OpenKalman::HermitianAdapter< NestedObject, storage_triangle >
A hermitian matrix wrapper.
The matrix is guaranteed to be hermitian. Implicit conversions are available from any hermitian_matrix of compatible size.
- Template Parameters
-
NestedMatrix | A nested square_shaped expression, on which the self-adjoint matrix is based. |
storage_triangle | The HermitianAdapterType (lower or upper) in which the data is stored. Matrix elements outside this triangle/diagonal are ignored. If the matrix is lower or upper triangular, elements are mapped (as complex conjugates) from this selected triangle to the elements in the other triangle to ensure that the matrix is hermitian. Also, any imaginary part of the diagonal elements is discarded. If storage_triangle is TriangleType::diagonal, 0 is automatically mapped to each matrix element outside the diagonal. |