akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
Loading...
Searching...
No Matches
symmetric_matrix_space.hpp
Go to the documentation of this file.
1/*
2 * Copyright © 2025-2026 Akreon LLC
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#pragma once
7
8#include "coordinate_map.hpp"
10
11namespace linalg {
12
19template <Real T, std::size_t Dim>
21
23template <Real T, std::size_t Dim>
26 using scalar_type = T;
30 using coordinate_type = Vector<T, Dim*(Dim + 1) / 2>;
32 static constexpr std::size_t dim = Dim * (Dim + 1) / 2;
34 static constexpr std::size_t DIM = dim;
35};
36
45template <Real T, std::size_t Dim>
48
49 static constexpr auto to_coordinates(const space_element_t<Space>& element) {
50 return element.svec;
51 }
52
57};
58
59} // namespace linalg
Trait-registered finite-dimensional mathematical space.
typename space_traits< remove_cvref_t< Space > >::element_type space_element_t
Canonical element representation registered for a space.
constexpr std::size_t mat_rows_v
Registered compile-time row count after cv/ref normalization.
typename space_traits< remove_cvref_t< Space > >::coordinate_type space_coordinate_t
Finite coordinate representation registered for a space.
Space of real symmetric Dim x Dim matrices.
forward declaration for a matrix
Owning, fixed-size vector container.
Definition vector.hpp:36
static constexpr auto from_coordinates(const space_coordinate_t< Space > &coordinate)
static constexpr auto to_coordinates(const space_element_t< Space > &element)
Customization point mapping space elements to finite coordinates.
Customization point for finite-dimensional space metadata.