PhysicsBasedAnimationToolkit
0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
Concepts.h
Go to the documentation of this file.
1
10
11
#ifndef PBAT_MATH_POLYNOMIAL_CONCEPTS_H
12
#define PBAT_MATH_POLYNOMIAL_CONCEPTS_H
13
14
#include "
pbat/Aliases.h
"
15
16
#include <concepts>
17
18
namespace
pbat::math::polynomial
{
19
25
template
<
class
T>
26
concept
CBasis
=
requires
(T t)
27
{
28
requires
std::is_integral_v<
decltype
(T::kDims)>;
29
requires
std::is_integral_v<
decltype
(T::kOrder)>;
30
requires
std::is_integral_v<
decltype
(T::kSize)>;
31
{
32
t.eval(
Vector<T::kDims>
{})
33
} -> std::convertible_to<Vector<T::kSize>>;
34
{
35
t.derivatives(
Vector<T::kDims>
{})
36
} -> std::convertible_to<Matrix<T::kDims, T::kSize>>;
37
{
38
t.antiderivatives(
Vector<T::kDims>
{})
39
} -> std::convertible_to<Matrix<T::kSize, T::kDims>>;
40
};
41
47
template
<
class
T>
48
concept
CVectorBasis
=
requires
(T t)
49
{
50
requires
std::is_integral_v<
decltype
(T::kDims)>;
51
requires
std::is_integral_v<
decltype
(T::kOrder)>;
52
requires
std::is_integral_v<
decltype
(T::kSize)>;
53
{
54
t.eval(
Vector<T::kDims>
{})
55
} -> std::convertible_to<Matrix<T::kSize, T::kDims>>;
56
};
57
58
}
// namespace pbat::math::polynomial
59
60
#endif
// PBAT_MATH_POLYNOMIAL_CONCEPTS_H
Aliases.h
pbat::math::polynomial::CBasis
Definition
Concepts.h:26
pbat::math::polynomial::CVectorBasis
Definition
Concepts.h:48
pbat::math::polynomial
The namespace for the Polynomial module.
Definition
Basis.h:25
pbat::Vector
Eigen::Vector< Scalar, N > Vector
Fixed-size vector type.
Definition
Aliases.h:24
source
pbat
math
polynomial
Concepts.h
Generated by
1.13.2