Metrics

class discopygal.solvers.metrics.Metric

Representation of a metric for nearest neighbor search. Should support all kernels/methods for nearest neighbors (like CGAL and sklearn).

static CGALPY_impl()

Return the metric as a CGAL metric object (of the spatial search module)

static dist(p, q)

Return the distance between two points

Parameters:
Returns:

distance between p and q

Return type:

FT

static sklearn_impl()

Return the metric as sklearn metric object

exception discopygal.solvers.metrics.MetricNotImplemented
class discopygal.solvers.metrics.Metric_Euclidean

Implementation of the Euclidean metric for nearest neighbors search

static CGALPY_impl()

Return the metric as a CGAL metric object (of the spatial search module)

static dist(p, q)

Return the distance between two points

Parameters:
Returns:

distance between p and q

Return type:

FT

static sklearn_impl()

Return the metric as sklearn metric object