Minkowski distance¶
The Minkowski distances are the set of distance metrics with different degree \((p > 0)\) and are widely used for distance computation in different algorithms. The most commonly used distance metric, Euclidean distance, is also a Minkowski distance with \(p = 2.0\).
Operation |
Computational methods |
|
Mathematical formulation¶
Refer to Developer Guide: Minkowski distance.
Programming Interface¶
All types and functions in this section are declared in the
oneapi::dal::minkowski_distance
namespace.
Descriptor¶
-
template<typename Float = float, typename Method = method::by_default, typename Task = task::by_default>
class descriptor¶ - Template Parameters
Constructors
-
descriptor() = default¶
Creates a new instance of the class with the default property values.
-
descriptor(double degree)¶
Creates a new instance of the class with the external property values.
Properties
-
double degree¶
The coefficient \(p\) of the Minkowski distance. Default value: 2.0.
- Getter & Setter
double get_degree() const
auto & set_degree(double value)