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

#include <custom_metric.hpp>

Inheritance diagram for toolbox::metrics::WeightedMetric< BaseMetric >:

Public Types

using base_metric_type = BaseMetric
 
using element_type = typename BaseMetric::element_type
 
- Public Types inherited from toolbox::metrics::base_metric_t< WeightedMetric< BaseMetric >, BaseMetric::element_type >
using element_type = BaseMetric::element_type
 
using result_type = BaseMetric::element_type
 

Public Member Functions

 WeightedMetric (BaseMetric base_metric, const std::vector< element_type > &weights)
 
constexpr element_type distance_impl (const element_type *a, const element_type *b, std::size_t size) const
 
constexpr element_type squared_distance_impl (const element_type *a, const element_type *b, std::size_t size) const
 
- Public Member Functions inherited from toolbox::metrics::base_metric_t< WeightedMetric< BaseMetric >, BaseMetric::element_type >
constexpr BaseMetric::element_type distance (const BaseMetric::element_type *a, const BaseMetric::element_type *b, std::size_t size) const
 
constexpr BaseMetric::element_type distance (const Container &a, const Container &b) const
 
constexpr BaseMetric::element_type squared_distance (const BaseMetric::element_type *a, const BaseMetric::element_type *b, std::size_t size) const
 
constexpr BaseMetric::element_type squared_distance (const Container &a, const Container &b) const
 

Member Typedef Documentation

◆ base_metric_type

template<typename BaseMetric >
using toolbox::metrics::WeightedMetric< BaseMetric >::base_metric_type = BaseMetric

◆ element_type

template<typename BaseMetric >
using toolbox::metrics::WeightedMetric< BaseMetric >::element_type = typename BaseMetric::element_type

Constructor & Destructor Documentation

◆ WeightedMetric()

template<typename BaseMetric >
toolbox::metrics::WeightedMetric< BaseMetric >::WeightedMetric ( BaseMetric  base_metric,
const std::vector< element_type > &  weights 
)
inline

Member Function Documentation

◆ distance_impl()

template<typename BaseMetric >
constexpr element_type toolbox::metrics::WeightedMetric< BaseMetric >::distance_impl ( const element_type a,
const element_type b,
std::size_t  size 
) const
inlineconstexpr

◆ squared_distance_impl()

template<typename BaseMetric >
constexpr element_type toolbox::metrics::WeightedMetric< BaseMetric >::squared_distance_impl ( const element_type a,
const element_type b,
std::size_t  size 
) const
inlineconstexpr

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