deblais
Exact optimal transport between point clouds
Loading...
Searching...
No Matches
deblais::Cloud Struct Reference

A weighted point cloud: a non-owning view of the data of the caller. More...

#include <deblais/plan.hpp>

Public Member Functions

 Cloud ()=default
 An empty cloud.
 Cloud (const double *points_, std::size_t size_, const double *masses_=nullptr)
 Views size_ points and, optionally, their masses.

Public Attributes

const double * points = nullptr
 size * D coordinates, point after point.
std::size_t size = 0
 Number of points.
const double * masses = nullptr
 size non negative masses, or nullptr for the uniform probability measure (mass 1 / size per point).

Detailed Description

A weighted point cloud: a non-owning view of the data of the caller.

The coordinates are stored point after point (x0 y0 x1 y1 ... in dimension 2). The dimension is not part of the view: it is given to solve(). The arrays must stay alive during the call that uses the view.

Constructor & Destructor Documentation

◆ Cloud()

deblais::Cloud::Cloud ( const double * points_,
std::size_t size_,
const double * masses_ = nullptr )
inline

Views size_ points and, optionally, their masses.

Parameters
points_size_ * D coordinates, point after point.
size_Number of points.
masses_size_ masses, or nullptr for the uniform probability measure.