numerics
0.1.0
Loading...
Searching...
No Matches
concepts.hpp
Go to the documentation of this file.
1
/// @file operator/concepts.hpp
2
/// @brief Concepts for operator-oriented numerical algorithms.
3
#pragma once
4
5
#include "
core/concepts.hpp
"
6
#include "
core/vector.hpp
"
7
#include <concepts>
8
9
namespace
num::operators
{
10
11
template
<
class
V>
12
concept
VectorLike
=
num::VectorLike<V>
;
13
14
template
<
class
V>
15
concept
MutableVectorLike
=
num::MutableVectorLike<V>
;
16
17
/// @brief Compile-time contract for y = A*x.
18
template
<
class
Op,
class
X = Vector,
class
Y = Vector>
19
concept
LinearOperator
=
20
VectorLike<X>
&&
MutableVectorLike<Y>
&&
requires
(
const
Op& A,
const
X& x, Y& y) {
21
{ A.rows() } -> std::convertible_to<idx>;
22
{ A.cols() } -> std::convertible_to<idx>;
23
{ A.apply(x, y) };
24
};
25
26
}
// namespace num::operators
num::MutableVectorLike
Mutable indexed real-valued vector interface.
Definition
concepts.hpp:20
num::VectorLike
Indexed real-valued vector interface.
Definition
concepts.hpp:12
num::operators::LinearOperator
Compile-time contract for y = A*x.
Definition
concepts.hpp:19
num::operators::MutableVectorLike
Definition
concepts.hpp:15
num::operators::VectorLike
Definition
concepts.hpp:12
concepts.hpp
Storage concepts for numerical routines.
num::operators
Definition
callable.hpp:8
vector.hpp
Dense vector storage and operations.
include
operator
concepts.hpp
Generated by
1.9.8