SemiDiscreteOT 1.0
Semi-Discrete Optimal Transport Library
Loading...
Searching...
No Matches
Functions
Distance.h File Reference

A collection of distance functions, their gradients, and exponential maps. More...

#include <deal.II/base/point.h>
Include dependency graph for Distance.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<int spacedim>
double euclidean_distance (const Point< spacedim > a, const Point< spacedim > b)
 Computes the Euclidean distance between two points.
 
template<int spacedim>
double spherical_distance (const Point< spacedim > a, const Point< spacedim > b)
 Computes the spherical distance between two points.
 
template<int spacedim>
Vector< double > euclidean_distance_gradient (const Point< spacedim > a, const Point< spacedim > b)
 Computes the gradient of the squared Euclidean distance.
 
template<int spacedim>
Vector< double > spherical_distance_gradient (const Point< spacedim > a, const Point< spacedim > b)
 Computes the gradient of the squared spherical distance.
 
template<int spacedim>
Point< spacedim > euclidean_distance_exp_map (const Point< spacedim > a, const Vector< double > v)
 Computes the exponential map for the Euclidean distance.
 
template<int spacedim>
Point< spacedim > spherical_distance_exp_map (const Point< spacedim > a, const Vector< double > v)
 Computes the exponential map for the spherical distance.
 

Detailed Description

A collection of distance functions, their gradients, and exponential maps.

Definition in file Distance.h.

Function Documentation

◆ euclidean_distance()

template<int spacedim>
double euclidean_distance ( const Point< spacedim >  a,
const Point< spacedim >  b 
)

Computes the Euclidean distance between two points.

Parameters
aThe first point.
bThe second point.
Returns
The Euclidean distance between a and b.

Definition at line 24 of file Distance.h.

◆ spherical_distance()

template<int spacedim>
double spherical_distance ( const Point< spacedim >  a,
const Point< spacedim >  b 
)

Computes the spherical distance between two points.

Parameters
aThe first point.
bThe second point.
Returns
The spherical distance between a and b.

Definition at line 36 of file Distance.h.

Here is the caller graph for this function:

◆ euclidean_distance_gradient()

template<int spacedim>
Vector< double > euclidean_distance_gradient ( const Point< spacedim >  a,
const Point< spacedim >  b 
)

Computes the gradient of the squared Euclidean distance.

Parameters
aThe first point.
bThe second point.
Returns
The gradient of the squared Euclidean distance.

Definition at line 62 of file Distance.h.

◆ spherical_distance_gradient()

template<int spacedim>
Vector< double > spherical_distance_gradient ( const Point< spacedim >  a,
const Point< spacedim >  b 
)

Computes the gradient of the squared spherical distance.

Parameters
aThe first point.
bThe second point.
Returns
The gradient of the squared spherical distance.

Definition at line 79 of file Distance.h.

Here is the call graph for this function:

◆ euclidean_distance_exp_map()

template<int spacedim>
Point< spacedim > euclidean_distance_exp_map ( const Point< spacedim >  a,
const Vector< double >  v 
)

Computes the exponential map for the Euclidean distance.

Parameters
aThe point.
vThe vector.
Returns
The exponential map.

Definition at line 103 of file Distance.h.

◆ spherical_distance_exp_map()

template<int spacedim>
Point< spacedim > spherical_distance_exp_map ( const Point< spacedim >  a,
const Vector< double >  v 
)

Computes the exponential map for the spherical distance.

Parameters
aThe point.
vThe vector.
Returns
The exponential map.

Definition at line 120 of file Distance.h.