40 #ifndef EXPLORAGRAM_OPTIMAL_TRANSPORT_VSDM
41 #define EXPLORAGRAM_OPTIMAL_TRANSPORT_VSDM
101 progress_ = progress;
140 index_t n,
const double* x,
double f,
const double* g,
double gnorm
192 Delaunay_var delaunay_;
197 double affinity_scaling_;
199 static VSDM* instance_;
200 Optimizer_var optimizer_;
Class and functions to compute restricted Voronoi diagrams and extract information from them.
Tracks the progress of a task.
Voronoi Square Distance Minimization.
void set_progress(ProgressTask *progress)
Sets an optional progress bar to track progress during calls of optimize()
static void newiteration_CB(index_t n, const double *x, double f, const double *g, double gnorm)
The callback for each iteration of the optimizer.
virtual ~VSDM()
VSDM destructor.
void set_subdivision_surface(Mesh *mesh, index_t nb_subdiv)
Sets a subdivision surface.
static void compute_graph_Laplacian(Mesh *S, NLSparseMatrix *L)
Computes the graph Laplacian of a surface mesh.
void optimize(index_t nb_iter)
Optimizes the fitting.
static void funcgrad_CB(index_t n, double *x, double &f, double *g)
The callback to evaluate the objective function, used by the optimizer.
static VSDM * instance()
Gets the instance.
VSDM(Mesh *S, Mesh *T)
VSDM constructor.
virtual void newiteration()
Updates the progress bar (if specified) and graphics.
void add_funcgrad_affinity(index_t n, double *x, double &f, double *g)
Adds the value and gradient of the affinity to the currently evaluated objective function.
void set_affinity(double x)
Sets the affinity.
virtual void funcgrad(index_t n, double *x, double &f, double *g)
Evaluates the objective function and its gradient.
Abstract interface for Delaunay.
#define EXPLORAGRAM_API
Linkage declaration for exploragram symbols.
Included by all headers in exploragram.
Global Vorpaline namespace.
geo_index_t index_t
The type for storing and manipulating indices.
Internal OpenNL functions to manipulate sparse matrices.
Abstract base class for numerical optimizers, used to minimize a multivariate function.
The base class for abstract matrices.