dot-xx
A personal collection of small C++ modules
Loading...
Searching...
No Matches
basic_ops.xx File Reference

Basic vector aritmetic. No documentation for functions since they are generated with macros (I know, I know, it was just too much to just write out...). More...

Namespaces

namespace  dxx::math
 The main namespace of the dxx::math module.
namespace  dxx::math::vector_operators
 Operations on vectors. Read the description.

Macros

#define DEF_BINARY(op_name, op_sym, op_doc)

Functions

template<mut_vector Out, vector_like< Out > U, vector_like< Out > V>
constexpr void dxx::math::add (U &&u, V &&v, Out &out)
 Element-wise vector addition. Result via output parameter.
template<container_traits::returnable Out, vector_like< Out > U, vector_like< Out > V>
constexpr Out dxx::math::add (U &&u, V &&v)
 Element-wise vector addition. Result in return value of a user-provided type.
template<vector U, vector_like< U > V>
constexpr std::remove_cvref_t< U > dxx::math::add (U &&u, V &&v)
 Element-wise vector addition. Result in return value of automatically selected type.
template<vector U, vector_like< U > V>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator+ (U &&u, V &&v)
 Operator for a corrsponding add overload.
template<mut_vector U, vector_like< U > V>
constexpr U & dxx::math::vector_operators::operator+= (U &u, const V &v)
 Inplace element-wise vector addition.
template<mut_vector Out, vector_like< Out > U, std::convertible_to< RealOf< Out > > Scalar>
constexpr void dxx::math::add (U &&u, const Scalar &scalar, Out &out)
 Element-wise addition of vector elements with a scalar. Result via output parameter.
template<container_traits::returnable Out, vector_like< Out > U, std::convertible_to< RealOf< Out > > Scalar>
constexpr Out dxx::math::add (U &&u, const Scalar &scalar)
 Element-wise addition of vector elements with a scalar. Result in return value of a user-provided type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::add (U &&u, const Scalar &scalar)
 Element-wise addition of vector elements with a scalar. Result in return value of automatically selected type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator+ (U &&u, const Scalar &scalar)
 Operator for a corrsponding add overload.
template<mut_vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr U & dxx::math::vector_operators::operator+= (U &u, const Scalar &scalar)
 Inplace element-wise addition of vector with scalar.
template<mut_vector Out, std::convertible_to< RealOf< Out > > Scalar, vector_like< Out > U>
constexpr void dxx::math::add (const Scalar &scalar, U &&u, Out &out)
 Element-wise addition of scalar with vector elements. Result via output parameter.
template<container_traits::returnable Out, std::convertible_to< RealOf< Out > > Scalar, vector_like< Out > U>
constexpr Out dxx::math::add (const Scalar &scalar, U &&u)
 Element-wise addition of scalar with vector elements. Result in return value of a user-provided type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::add (const Scalar &scalar, U &&u)
 Element-wise addition of vector elements with a scalar. Result in return value of automatically selected type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator+ (const Scalar &scalar, U &&u)
 Operator for a corrsponding add overload.
template<mut_vector Out, vector_like< Out > U, vector_like< Out > V>
constexpr void dxx::math::sub (U &&u, V &&v, Out &out)
 Element-wise vector subtraction. Result via output parameter.
template<container_traits::returnable Out, vector_like< Out > U, vector_like< Out > V>
constexpr Out dxx::math::sub (U &&u, V &&v)
 Element-wise vector subtraction. Result in return value of a user-provided type.
template<vector U, vector_like< U > V>
constexpr std::remove_cvref_t< U > dxx::math::sub (U &&u, V &&v)
 Element-wise vector subtraction. Result in return value of automatically selected type.
template<vector U, vector_like< U > V>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator- (U &&u, V &&v)
 Operator for a corrsponding sub overload.
template<mut_vector U, vector_like< U > V>
constexpr U & dxx::math::vector_operators::operator-= (U &u, const V &v)
 Inplace element-wise vector subtraction.
template<mut_vector Out, vector_like< Out > U, std::convertible_to< RealOf< Out > > Scalar>
constexpr void dxx::math::sub (U &&u, const Scalar &scalar, Out &out)
 Element-wise subtraction of vector elements with a scalar. Result via output parameter.
template<container_traits::returnable Out, vector_like< Out > U, std::convertible_to< RealOf< Out > > Scalar>
constexpr Out dxx::math::sub (U &&u, const Scalar &scalar)
 Element-wise subtraction of vector elements with a scalar. Result in return value of a user-provided type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::sub (U &&u, const Scalar &scalar)
 Element-wise subtraction of vector elements with a scalar. Result in return value of automatically selected type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator- (U &&u, const Scalar &scalar)
 Operator for a corrsponding sub overload.
template<mut_vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr U & dxx::math::vector_operators::operator-= (U &u, const Scalar &scalar)
 Inplace element-wise subtraction of vector with scalar.
template<mut_vector Out, std::convertible_to< RealOf< Out > > Scalar, vector_like< Out > U>
constexpr void dxx::math::sub (const Scalar &scalar, U &&u, Out &out)
 Element-wise subtraction of scalar with vector elements. Result via output parameter.
template<container_traits::returnable Out, std::convertible_to< RealOf< Out > > Scalar, vector_like< Out > U>
constexpr Out dxx::math::sub (const Scalar &scalar, U &&u)
 Element-wise subtraction of scalar with vector elements. Result in return value of a user-provided type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::sub (const Scalar &scalar, U &&u)
 Element-wise subtraction of vector elements with a scalar. Result in return value of automatically selected type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator- (const Scalar &scalar, U &&u)
 Operator for a corrsponding sub overload.
template<mut_vector Out, vector_like< Out > U, vector_like< Out > V>
constexpr void dxx::math::mul (U &&u, V &&v, Out &out)
 Element-wise vector multiplication. Result via output parameter.
template<container_traits::returnable Out, vector_like< Out > U, vector_like< Out > V>
constexpr Out dxx::math::mul (U &&u, V &&v)
 Element-wise vector multiplication. Result in return value of a user-provided type.
template<vector U, vector_like< U > V>
constexpr std::remove_cvref_t< U > dxx::math::mul (U &&u, V &&v)
 Element-wise vector multiplication. Result in return value of automatically selected type.
template<vector U, vector_like< U > V>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator* (U &&u, V &&v)
 Operator for a corrsponding mul overload.
template<mut_vector U, vector_like< U > V>
constexpr U & dxx::math::vector_operators::operator*= (U &u, const V &v)
 Inplace element-wise vector multiplication.
template<mut_vector Out, vector_like< Out > U, std::convertible_to< RealOf< Out > > Scalar>
constexpr void dxx::math::mul (U &&u, const Scalar &scalar, Out &out)
 Element-wise multiplication of vector elements with a scalar. Result via output parameter.
template<container_traits::returnable Out, vector_like< Out > U, std::convertible_to< RealOf< Out > > Scalar>
constexpr Out dxx::math::mul (U &&u, const Scalar &scalar)
 Element-wise multiplication of vector elements with a scalar. Result in return value of a user-provided type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::mul (U &&u, const Scalar &scalar)
 Element-wise multiplication of vector elements with a scalar. Result in return value of automatically selected type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator* (U &&u, const Scalar &scalar)
 Operator for a corrsponding mul overload.
template<mut_vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr U & dxx::math::vector_operators::operator*= (U &u, const Scalar &scalar)
 Inplace element-wise multiplication of vector with scalar.
template<mut_vector Out, std::convertible_to< RealOf< Out > > Scalar, vector_like< Out > U>
constexpr void dxx::math::mul (const Scalar &scalar, U &&u, Out &out)
 Element-wise multiplication of scalar with vector elements. Result via output parameter.
template<container_traits::returnable Out, std::convertible_to< RealOf< Out > > Scalar, vector_like< Out > U>
constexpr Out dxx::math::mul (const Scalar &scalar, U &&u)
 Element-wise multiplication of scalar with vector elements. Result in return value of a user-provided type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::mul (const Scalar &scalar, U &&u)
 Element-wise multiplication of vector elements with a scalar. Result in return value of automatically selected type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator* (const Scalar &scalar, U &&u)
 Operator for a corrsponding mul overload.
template<mut_vector Out, vector_like< Out > U, vector_like< Out > V>
constexpr void dxx::math::div (U &&u, V &&v, Out &out)
 Element-wise vector division. Result via output parameter.
template<container_traits::returnable Out, vector_like< Out > U, vector_like< Out > V>
constexpr Out dxx::math::div (U &&u, V &&v)
 Element-wise vector division. Result in return value of a user-provided type.
template<vector U, vector_like< U > V>
constexpr std::remove_cvref_t< U > dxx::math::div (U &&u, V &&v)
 Element-wise vector division. Result in return value of automatically selected type.
template<vector U, vector_like< U > V>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator/ (U &&u, V &&v)
 Operator for a corrsponding div overload.
template<mut_vector U, vector_like< U > V>
constexpr U & dxx::math::vector_operators::operator/= (U &u, const V &v)
 Inplace element-wise vector division.
template<mut_vector Out, vector_like< Out > U, std::convertible_to< RealOf< Out > > Scalar>
constexpr void dxx::math::div (U &&u, const Scalar &scalar, Out &out)
 Element-wise division of vector elements with a scalar. Result via output parameter.
template<container_traits::returnable Out, vector_like< Out > U, std::convertible_to< RealOf< Out > > Scalar>
constexpr Out dxx::math::div (U &&u, const Scalar &scalar)
 Element-wise division of vector elements with a scalar. Result in return value of a user-provided type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::div (U &&u, const Scalar &scalar)
 Element-wise division of vector elements with a scalar. Result in return value of automatically selected type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator/ (U &&u, const Scalar &scalar)
 Operator for a corrsponding div overload.
template<mut_vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr U & dxx::math::vector_operators::operator/= (U &u, const Scalar &scalar)
 Inplace element-wise division of vector with scalar.
template<mut_vector Out, std::convertible_to< RealOf< Out > > Scalar, vector_like< Out > U>
constexpr void dxx::math::div (const Scalar &scalar, U &&u, Out &out)
 Element-wise division of scalar with vector elements. Result via output parameter.
template<container_traits::returnable Out, std::convertible_to< RealOf< Out > > Scalar, vector_like< Out > U>
constexpr Out dxx::math::div (const Scalar &scalar, U &&u)
 Element-wise division of scalar with vector elements. Result in return value of a user-provided type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::div (const Scalar &scalar, U &&u)
 Element-wise division of vector elements with a scalar. Result in return value of automatically selected type.
template<vector U, std::convertible_to< RealOf< U > > Scalar>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator/ (const Scalar &scalar, U &&u)
 Operator for a corrsponding div overload.
template<vector U>
constexpr std::remove_cvref_t< U > dxx::math::vector_operators::operator- (U &&u)
 Unary negation for vectors.

Detailed Description

Basic vector aritmetic. No documentation for functions since they are generated with macros (I know, I know, it was just too much to just write out...).