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

#include <custom_metric.hpp>

Inheritance diagram for toolbox::metrics::ParameterizedMetric< T >:

Public Types

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

Public Member Functions

 ParameterizedMetric ()=default
 
void set_parameter (T param)
 
get_parameter () 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< ParameterizedMetric< T >, T >
constexpr T distance (const T *a, const T *b, std::size_t size) const
 
constexpr T distance (const Container &a, const Container &b) const
 
constexpr T squared_distance (const T *a, const T *b, std::size_t size) const
 
constexpr T squared_distance (const Container &a, const Container &b) const
 

Protected Attributes

parameter_ = T(2)
 

Member Typedef Documentation

◆ element_type

template<typename T >
using toolbox::metrics::ParameterizedMetric< T >::element_type = T

Constructor & Destructor Documentation

◆ ParameterizedMetric()

template<typename T >
toolbox::metrics::ParameterizedMetric< T >::ParameterizedMetric ( )
default

Member Function Documentation

◆ get_parameter()

template<typename T >
T toolbox::metrics::ParameterizedMetric< T >::get_parameter ( ) const
inline

◆ set_parameter()

template<typename T >
void toolbox::metrics::ParameterizedMetric< T >::set_parameter ( param)
inline

◆ squared_distance_impl()

template<typename T >
constexpr T toolbox::metrics::ParameterizedMetric< T >::squared_distance_impl ( const T *  a,
const T *  b,
std::size_t  size 
) const
inlineconstexpr

Member Data Documentation

◆ parameter_

template<typename T >
T toolbox::metrics::ParameterizedMetric< T >::parameter_ = T(2)
protected

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