akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
Loading...
Searching...
No Matches
space_concepts.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 <concepts>
9
14#include "space_traits.hpp"
15
16namespace linalg {
17
30template <class Space>
31concept VectorSpace =
32 requires(const space_point_t<Space>& x, const space_point_t<Space>& y,
34 { x + y } -> std::convertible_to<space_point_t<Space>>;
35 { x - y } -> std::convertible_to<space_point_t<Space>>;
36 { alpha * x } -> std::convertible_to<space_point_t<Space>>;
37 { alpha * (x + y) } -> std::convertible_to<space_point_t<Space>>;
38 { alpha * x + alpha * y } -> std::convertible_to<space_point_t<Space>>;
39 {
41 } -> std::convertible_to<space_point_t<Space>>;
42 };
43
50template <class Space>
53
54} // namespace linalg
Finite-dimensional space with explicit element-coordinate conversion.
Field classified by scalar_traits as real.
Real, coordinatized space satisfying the vector-space expressions.
Legacy vector-space expression contract for a registered space.
constexpr std::size_t mat_rows_v
Registered compile-time row count after cv/ref normalization.