Auxiliary Arithmetic Algorithms
|
Functions | |
template<typename InputIterator1 , typename InputIterator2 , typename T = value_type_i<InputIterator1>> | |
T | aaa::euclidean::dot (InputIterator1 first_left, InputIterator1 last_left, InputIterator2 first_right, T init=T{}) |
template<typename Container1 , typename Container2 , typename T = value_type<Container1>> | |
T | aaa::euclidean::dot (const Container1 &a, Container2 &b, T init=T{}) |
template<typename InputIterator , typename T = value_type_i<InputIterator>> | |
T | aaa::euclidean::squared_norm (InputIterator first, InputIterator last, T init=T{}) |
template<typename Container , typename T = value_type<Container>> | |
T | aaa::euclidean::squared_norm (const Container &a, T init=T{}) |
template<typename InputIterator , typename T = value_type_i<InputIterator>> | |
sqrt_type_t< T > | aaa::euclidean::norm (InputIterator first, InputIterator last, T init=T{}) |
template<typename Container , typename T = value_type<Container>> | |
sqrt_type_t< T > | aaa::euclidean::norm (const Container &a, T init=T{}) |
template<typename InputIterator1 , typename InputIterator2 , typename T = value_type_i<InputIterator1>> | |
T | aaa::euclidean::squared_distance (InputIterator1 first_left, InputIterator1 last_left, InputIterator2 first_right, T init=T{}) |
template<typename Container1 , typename Container2 , typename T = value_type<Container1>> | |
T | aaa::euclidean::squared_distance (const Container1 &left, const Container2 &right, T init=T{}) |
template<typename InputIterator1 , typename InputIterator2 , typename T = value_type_i<InputIterator1>> | |
sqrt_type_t< T > | aaa::euclidean::distance (InputIterator1 first_left, InputIterator1 last_left, InputIterator2 first_right, T init=T{}) |
template<typename Container1 , typename Container2 , typename T = value_type<Container1>> | |
sqrt_type_t< T > | aaa::euclidean::distance (const Container1 &left, const Container2 &right, T init=T{}) |
Euclidean space is also known as L-2 space. It defines the the following functions:
We represent mathematical vectors as either containers, or ranges of iterators. The functions in this module take one or two vectors as input and output a single scalar. This is sometimes refered to as a reduction or fold operation.
sqrt_type_t<T> aaa::euclidean::distance | ( | InputIterator1 | first_left, |
InputIterator1 | last_left, | ||
InputIterator2 | first_right, | ||
T | init = T{} |
||
) |
The Euclidean distance of two vectors. Each vector is represented by a range of iterators. Returns a value of a floating point type following the same convention as std::sqrt
.
sqrt_type_t<T> aaa::euclidean::distance | ( | const Container1 & | left, |
const Container2 & | right, | ||
T | init = T{} |
||
) |
The Euclidean distance of two vectors. Each vector is represented by a container. The two containers should have the same size. Returns a value of a floating point type following the same convention as std::sqrt
.
T aaa::euclidean::dot | ( | InputIterator1 | first_left, |
InputIterator1 | last_left, | ||
InputIterator2 | first_right, | ||
T | init = T{} |
||
) |
The dot product of two vectors. Each vector is represented by a range of iterators.
T aaa::euclidean::dot | ( | const Container1 & | a, |
Container2 & | b, | ||
T | init = T{} |
||
) |
The dot product of two vectors. Each vector is represented by a container. The two containers should have the same size.
sqrt_type_t<T> aaa::euclidean::norm | ( | InputIterator | first, |
InputIterator | last, | ||
T | init = T{} |
||
) |
The Euclidean norm of a vector. The vector is represented by a range of iterators. Returns a value of floating point type following the same convention as std::sqrt
.
sqrt_type_t<T> aaa::euclidean::norm | ( | const Container & | a, |
T | init = T{} |
||
) |
The Euclidean norm of a vector. The vector is represented by a container. Returns a value of floating point type following the same convention as std::sqrt
.
T aaa::euclidean::squared_distance | ( | InputIterator1 | first_left, |
InputIterator1 | last_left, | ||
InputIterator2 | first_right, | ||
T | init = T{} |
||
) |
The squared Euclidean distance of two vectors. Each vector is represented by a range of iterators.
T aaa::euclidean::squared_distance | ( | const Container1 & | left, |
const Container2 & | right, | ||
T | init = T{} |
||
) |
The squared Euclidean distance of two vectors. Each vector is represented by a container. The two containers should have the same size.
T aaa::euclidean::squared_norm | ( | InputIterator | first, |
InputIterator | last, | ||
T | init = T{} |
||
) |
The squared Euclidean norm of a vector. The vector is represented by a range of iterators.
T aaa::euclidean::squared_norm | ( | const Container & | a, |
T | init = T{} |
||
) |
The squared Euclidean norm of a vector. The vector is represented by a container.