Sequoia
Loading...
Searching...
No Matches
Variables
Self-identification of Spaces

Compile time constants to capture whether types self-identify as various spaces. More...

Variables

template<class T >
constexpr bool sequoia::maths::identifies_as_convex_space_v
 Compile time constant reflecting whether a space self-identifies as convex.
 
template<class T >
constexpr bool sequoia::maths::identifies_as_affine_space_v
 Compile time constant reflecting whether a space self-identifies as affine.
 
template<class T >
constexpr bool sequoia::maths::identifies_as_free_module_v
 Compile time constant reflecting whether a space self-identifies as a free module.
 
template<class T >
constexpr bool sequoia::maths::identifies_as_vector_space_v
 Compile time constant reflecting whether a space self-identifies as vector space.
 

Detailed Description

Compile time constants to capture whether types self-identify as various spaces.

It is straightforward to say that a type, T, exposes nested types, say set_type and field_type. This is suggestive of a vector space but to do able to unequivocally identify T as a vector space requires additional information, since we have no way of knowing, a priori, whether the vector space axioms are satisfied. Indeed, it may not be straightforward to provide the operations for addition and multiplication as they apply to the elements of the underlying set: practically speaking, we are usually dealing with operations on coordinates with respect to some basis.

Therefore, the approach taken is to demand that various spaces self identify as such. For a free module this would mean exposing a type, is_free_module, convertible to std::true_type. Note, though, that this is not sufficient for T to be a free module, as there are additional requirements that must be met (see the free_module concept).

Variable Documentation

◆ identifies_as_affine_space_v

template<class T >
constexpr bool sequoia::maths::identifies_as_affine_space_v
inlineconstexpr
Initial value:
{
requires {
typename T::is_affine_space;
requires std::convertible_to<typename T::is_affine_space, std::true_type>;
}
}

Compile time constant reflecting whether a space self-identifies as affine.

◆ identifies_as_convex_space_v

template<class T >
constexpr bool sequoia::maths::identifies_as_convex_space_v
inlineconstexpr
Initial value:
{
requires {
typename T::is_convex_space;
requires std::convertible_to<typename T::is_convex_space, std::true_type>;
}
}

Compile time constant reflecting whether a space self-identifies as convex.

◆ identifies_as_free_module_v

template<class T >
constexpr bool sequoia::maths::identifies_as_free_module_v
inlineconstexpr
Initial value:
{
requires {
typename T::is_free_module;
requires std::convertible_to<typename T::is_free_module, std::true_type>;
}
}

Compile time constant reflecting whether a space self-identifies as a free module.

◆ identifies_as_vector_space_v

template<class T >
constexpr bool sequoia::maths::identifies_as_vector_space_v
inlineconstexpr
Initial value:
{
requires {
typename T::is_vector_space;
requires std::convertible_to<typename T::is_vector_space, std::true_type>;
}
}

Compile time constant reflecting whether a space self-identifies as vector space.