akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
Loading...
Searching...
No Matches
space_traits.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
9
10namespace linalg {
11
21template <class Space>
23
25template <typename T>
26struct space_traits<Matrix<T, 1, 1>> {
28 using value_type = T;
32 using scalar_type = T;
38 static constexpr std::size_t DIM = 1;
39};
40
42template <typename T, std::size_t Dim>
44 using value_type = T;
46 using scalar_type = T;
49 static constexpr std::size_t DIM = Dim;
50};
51
53template <typename T, std::size_t Dim>
55 using value_type = T;
57 using scalar_type = T;
60 static constexpr std::size_t DIM = Dim;
61};
62
70template <typename T, std::size_t Rows, std::size_t Cols>
71 requires(Rows > 1 && Cols > 1)
73 using value_type = T;
75 using scalar_type = T;
78 static constexpr std::size_t DIM = Rows * Cols;
79};
80
82template <class Space>
84
86template <class Space>
88
90template <class Space>
91inline constexpr std::size_t space_dim_v =
93
95template <class Space>
97 typename space_traits<remove_cvref_t<Space>>::scalar_type;
98
100template <class Space>
102 typename space_traits<remove_cvref_t<Space>>::element_type;
103
105template <class Space>
107 typename space_traits<remove_cvref_t<Space>>::coordinate_type;
108
109} // namespace linalg
typename space_traits< remove_cvref_t< Space > >::value_type space_type_t
Legacy scalar-field alias after cv/ref normalization.
typename space_traits< remove_cvref_t< Space > >::element_type space_element_t
Canonical element representation registered for a space.
constexpr std::size_t space_dim_v
Finite coordinate dimension after cv/ref normalization.
typename space_traits< remove_cvref_t< Space > >::Point space_point_t
Legacy point/domain alias after cv/ref normalization.
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.
typename space_traits< remove_cvref_t< Space > >::scalar_type space_scalar_t
Scalar field registered for a space.
Owning, fixed-size, row-major matrix container over a scalar field.
Definition matrix.hpp:44
Owning, fixed-size vector container.
Definition vector.hpp:36
T value_type
Legacy scalar-field alias.
Customization point for finite-dimensional space metadata.