cpp-toolbox  0.0.1
A toolbox library for C++
Loading...
Searching...
No Matches
toolbox::metrics::LpMetric< T, P > Class Template Reference

#include <vector_metrics.hpp>

Inheritance diagram for toolbox::metrics::LpMetric< T, P >:

Public Types

using element_type = T
 
- Public Types inherited from toolbox::metrics::base_metric_t< Derived, ElementType >
using element_type = ElementType
 
using result_type = ElementType
 

Public Member Functions

constexpr T distance_impl (const T *a, const T *b, std::size_t size) const
 
constexpr T squared_distance_impl (const T *a, const T *b, std::size_t size) const
 
- Public Member Functions inherited from toolbox::metrics::base_metric_t< Derived, ElementType >
constexpr ElementType distance (const ElementType *a, const ElementType *b, std::size_t size) const
 
constexpr ElementType squared_distance (const ElementType *a, const ElementType *b, std::size_t size) const
 
template<typename Container >
constexpr ElementType distance (const Container &a, const Container &b) const
 
template<typename Container >
constexpr ElementType squared_distance (const Container &a, const Container &b) const
 

Static Public Attributes

static constexpr int p_value = P
 

Member Typedef Documentation

◆ element_type

template<typename T , int P = 2>
using toolbox::metrics::LpMetric< T, P >::element_type = T

Member Function Documentation

◆ distance_impl()

template<typename T , int P = 2>
constexpr T toolbox::metrics::LpMetric< T, P >::distance_impl ( const T *  a,
const T *  b,
std::size_t  size 
) const
inlineconstexpr

◆ squared_distance_impl()

template<typename T , int P = 2>
constexpr T toolbox::metrics::LpMetric< T, P >::squared_distance_impl ( const T *  a,
const T *  b,
std::size_t  size 
) const
inlineconstexpr

Member Data Documentation

◆ p_value

template<typename T , int P = 2>
constexpr int toolbox::metrics::LpMetric< T, P >::p_value = P
staticconstexpr

The documentation for this class was generated from the following files: