MEPP2 Project
Public Types | Public Member Functions | List of all members
FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap > Class Template Reference

Concrete class to compute the collapse cost of each edge in a mesh as the edge length (L2).
More...

#include <Edge_length_metric.h>

Inheritance diagram for FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >:
Inheritance graph
Collaboration diagram for FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >:
Collaboration graph

Public Types

using edge_iterator = typename boost::graph_traits< HalfedgeGraph >::edge_iterator
 
using edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor
 
using Vector = typename FEVV::Geometry_traits< HalfedgeGraph >::Vector
 
using Point = typename FEVV::Geometry_traits< HalfedgeGraph >::Point
 
using Geometry = typename FEVV::Geometry_traits< HalfedgeGraph >
 
typedef Error_metric< HalfedgeGraph, PointMap > Super_class
 
- Public Types inherited from FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >
using vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor
 
using halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor
 
using edge_iterator = typename boost::graph_traits< HalfedgeGraph >::edge_iterator
 
using edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor
 
using Vector = typename FEVV::Geometry_traits< HalfedgeGraph >::Vector
 
using Point = typename FEVV::Geometry_traits< HalfedgeGraph >::Point
 
using Geometry = typename FEVV::Geometry_traits< HalfedgeGraph >
 
typedef std::priority_queue< std::tuple< edge_descriptor, double, Point >, std::vector< std::tuple< edge_descriptor, double, Point > >, Compare_weights2< HalfedgeGraph > > priority_queue_edges
 
typedef std::map< edge_descriptor, std::pair< double, Point > > edge2cost_map
 

Public Member Functions

 Edge_length_metric (HalfedgeGraph &g, PointMap &pm, Kept_position< HalfedgeGraph, PointMap > *vkept, FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > &dequantiz)
 
 ~Edge_length_metric ()
 
void compute_error () override
 
double compute_cost_edge (edge_descriptor e, const Point &) override
 
std::string get_as_string () const override
 
- Public Member Functions inherited from FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >
 Error_metric (HalfedgeGraph &g, PointMap &pm, Kept_position< HalfedgeGraph, PointMap > *vkept, FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > &dequantiz)
 
virtual ~Error_metric ()
 
bool is_queue_empty ()
 
std::tuple< typename boost::graph_traits< HalfedgeGraph >::edge_descriptor, double, typename Geometry::Pointget_top_queue () const
 
void pop_queue ()
 
double get_top_cost () const
 
double get_mean_threshold () const
 
void delete_from_descriptors (edge_descriptor e)
 
bool is_present_in_map (edge_descriptor e) const
 
void remove_old_edges (vertex_descriptor vs, vertex_descriptor vt)
 
size_t get_size_queue () const
 
Kept_position< HalfedgeGraph, PointMap > * get_vkept ()
 

Additional Inherited Members

- Protected Attributes inherited from FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >
HalfedgeGraph & _g
 
const Geometry _gt
 
PointMap & _pm
 
priority_queue_edges _queue
 
edge2cost_map _edges_cost
 queue with the cost/weight as the key More...
 
FEVV::Filters::VKEPT_POSITION _operator
 
Kept_position< HalfedgeGraph, PointMap > * _vkept
 
double _threshold
 
FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > & _dequantiz
 

Detailed Description

template<typename HalfedgeGraph, typename PointMap>
class FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >

Concrete class to compute the collapse cost of each edge in a mesh as the edge length (L2).

Definition at line 25 of file Edge_length_metric.h.

Member Typedef Documentation

◆ edge_descriptor

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >::edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor

Definition at line 31 of file Edge_length_metric.h.

◆ edge_iterator

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >::edge_iterator = typename boost::graph_traits< HalfedgeGraph >::edge_iterator

Definition at line 29 of file Edge_length_metric.h.

◆ Geometry

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >::Geometry = typename FEVV::Geometry_traits< HalfedgeGraph>

Definition at line 35 of file Edge_length_metric.h.

◆ Point

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >::Point = typename FEVV::Geometry_traits< HalfedgeGraph >::Point

Definition at line 34 of file Edge_length_metric.h.

◆ Super_class

template<typename HalfedgeGraph , typename PointMap >
typedef Error_metric< HalfedgeGraph, PointMap > FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >::Super_class

Definition at line 37 of file Edge_length_metric.h.

◆ Vector

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >::Vector = typename FEVV::Geometry_traits< HalfedgeGraph >::Vector

Definition at line 33 of file Edge_length_metric.h.

Constructor & Destructor Documentation

◆ Edge_length_metric()

template<typename HalfedgeGraph , typename PointMap >
FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >::Edge_length_metric ( HalfedgeGraph &  g,
PointMap &  pm,
Kept_position< HalfedgeGraph, PointMap > *  vkept,
FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > &  dequantiz 
)
inline

Definition at line 38 of file Edge_length_metric.h.

◆ ~Edge_length_metric()

template<typename HalfedgeGraph , typename PointMap >
FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >::~Edge_length_metric ( )
inline

Definition at line 47 of file Edge_length_metric.h.

Member Function Documentation

◆ compute_cost_edge()

template<typename HalfedgeGraph , typename PointMap >
double FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >::compute_cost_edge ( edge_descriptor  e,
const Point collapsePos 
)
inlineoverridevirtual

Method to compute the cost associated with an edge to collapse. It usually depends on the resulting vertex position (the collapsed position).

Implements FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >.

Definition at line 84 of file Edge_length_metric.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_error()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >::compute_error ( )
inlineoverridevirtual

Method to compute 1) all edge costs of the mesh; 2) the mean cost threshold.

Implements FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >.

Definition at line 49 of file Edge_length_metric.h.

Here is the call graph for this function:

◆ get_as_string()

template<typename HalfedgeGraph , typename PointMap >
std::string FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >::get_as_string ( ) const
inlineoverridevirtual

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