SemiDiscreteOT 1.0
Semi-Discrete Optimal Transport Library
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
PowerDiagramSpace::PowerDiagramBase< dim, spacedim > Class Template Referenceabstract

A base class for power diagrams. More...

#include <PowerDiagram.h>

Inheritance diagram for PowerDiagramSpace::PowerDiagramBase< dim, spacedim >:
Inheritance graph
[legend]

Public Member Functions

virtual ~PowerDiagramBase ()=default
 
virtual void set_generators (const std::vector< Point< spacedim > > &points, const Vector< double > &potentials)=0
 Sets the generator points and their potentials.
 
virtual void compute_power_diagram ()=0
 Computes the power diagram.
 
virtual void output_vtu (const std::string &filename) const =0
 Outputs the power diagram to a VTU file.
 
virtual void compute_cell_centroids ()=0
 Computes the centroids of the power cells.
 
virtual void save_centroids_to_file (const std::string &filename) const =0
 Saves the centroids of the power cells to a file.
 
virtual const std::vector< Point< spacedim > > & get_cell_centroids () const =0
 Returns the centroids of the power cells.
 

Protected Attributes

std::vector< Point< spacedim > > generator_points
 The generator points.
 
std::vector< double > generator_potentials
 The potentials of the generator points.
 
std::vector< Point< spacedim > > cell_centroids
 The centroids of the power cells.
 

Detailed Description

template<int dim, int spacedim = dim>
class PowerDiagramSpace::PowerDiagramBase< dim, spacedim >

A base class for power diagrams.

This class provides a common interface for different implementations of power diagrams, such as those based on deal.II or Geogram.

Template Parameters
dimThe dimension of the mesh.
spacedimThe dimension of the space the mesh is embedded in.

Definition at line 40 of file PowerDiagram.h.

Constructor & Destructor Documentation

◆ ~PowerDiagramBase()

template<int dim, int spacedim = dim>
virtual PowerDiagramSpace::PowerDiagramBase< dim, spacedim >::~PowerDiagramBase ( )
virtualdefault

Member Function Documentation

◆ set_generators()

template<int dim, int spacedim = dim>
virtual void PowerDiagramSpace::PowerDiagramBase< dim, spacedim >::set_generators ( const std::vector< Point< spacedim > > &  points,
const Vector< double > &  potentials 
)
pure virtual

Sets the generator points and their potentials.

Parameters
pointsThe generator points.
potentialsThe potentials of the generator points.

Implemented in PowerDiagramSpace::DealIIPowerDiagram< dim, spacedim >, and PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >.

◆ compute_power_diagram()

template<int dim, int spacedim = dim>
virtual void PowerDiagramSpace::PowerDiagramBase< dim, spacedim >::compute_power_diagram ( )
pure virtual

◆ output_vtu()

template<int dim, int spacedim = dim>
virtual void PowerDiagramSpace::PowerDiagramBase< dim, spacedim >::output_vtu ( const std::string &  filename) const
pure virtual

Outputs the power diagram to a VTU file.

Parameters
filenameThe name of the output file.

Implemented in PowerDiagramSpace::DealIIPowerDiagram< dim, spacedim >, and PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >.

◆ compute_cell_centroids()

template<int dim, int spacedim = dim>
virtual void PowerDiagramSpace::PowerDiagramBase< dim, spacedim >::compute_cell_centroids ( )
pure virtual

◆ save_centroids_to_file()

template<int dim, int spacedim = dim>
virtual void PowerDiagramSpace::PowerDiagramBase< dim, spacedim >::save_centroids_to_file ( const std::string &  filename) const
pure virtual

Saves the centroids of the power cells to a file.

Parameters
filenameThe name of the output file.

Implemented in PowerDiagramSpace::DealIIPowerDiagram< dim, spacedim >, and PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >.

◆ get_cell_centroids()

template<int dim, int spacedim = dim>
virtual const std::vector< Point< spacedim > > & PowerDiagramSpace::PowerDiagramBase< dim, spacedim >::get_cell_centroids ( ) const
pure virtual

Member Data Documentation

◆ generator_points

template<int dim, int spacedim = dim>
std::vector<Point<spacedim> > PowerDiagramSpace::PowerDiagramBase< dim, spacedim >::generator_points
protected

The generator points.

Definition at line 78 of file PowerDiagram.h.

◆ generator_potentials

template<int dim, int spacedim = dim>
std::vector<double> PowerDiagramSpace::PowerDiagramBase< dim, spacedim >::generator_potentials
protected

The potentials of the generator points.

Definition at line 79 of file PowerDiagram.h.

◆ cell_centroids

template<int dim, int spacedim = dim>
std::vector<Point<spacedim> > PowerDiagramSpace::PowerDiagramBase< dim, spacedim >::cell_centroids
protected

The centroids of the power cells.

Definition at line 80 of file PowerDiagram.h.


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