Tatooine
distance.h
Go to the documentation of this file.
1#ifndef TATOOINE_TENSOR_OPERATIONS_DISTANCE_H
2#define TATOOINE_TENSOR_OPERATIONS_DISTANCE_H
3//==============================================================================
5#include <cstdint>
6//==============================================================================
7namespace tatooine {
8//==============================================================================
9template <typename Tensor0, typename T0, typename Tensor1, typename T1,
10 std::size_t N>
13 base_tensor<Tensor1, T1, N> const& rhs) {
14 return squared_euclidean_length(rhs - lhs);
15}
16//------------------------------------------------------------------------------
17template <typename Tensor0, typename T0, typename Tensor1, typename T1,
18 std::size_t N>
20 base_tensor<Tensor1, T1, N> const& rhs) {
21 return euclidean_length(rhs - lhs);
22}
23//==============================================================================
24} // namespace tatooine
25//==============================================================================
26#endif
Definition: algorithm.h:6
constexpr auto squared_euclidean_length(base_tensor< Tensor, T, N > const &t_in)
Definition: length.h:7
constexpr auto euclidean_length(base_tensor< Tensor, T, N > const &t_in) -> T
Definition: length.h:12
constexpr auto squared_euclidean_distance(base_tensor< Tensor0, T0, N > const &lhs, base_tensor< Tensor1, T1, N > const &rhs)
Definition: distance.h:11
constexpr auto euclidean_distance(base_tensor< Tensor0, T0, N > const &lhs, base_tensor< Tensor1, T1, N > const &rhs)
Definition: distance.h:19
Definition: base_tensor.h:23