MEPP2 Project
Public Types | Public Member Functions | Protected Attributes | List of all members
FEVV::Filters::Error_metric< HalfedgeGraph, PointMap > Class Template Referenceabstract

Abstract class to compute the collapse cost of each edge in a mesh. It also manages a priority queue of (edge, cost, collapse position). More...

#include <Error_metric.h>

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

Public Types

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

 Error_metric (HalfedgeGraph &g, PointMap &pm, Kept_position< HalfedgeGraph, PointMap > *vkept, FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > &dequantiz)
 
virtual ~Error_metric ()
 
virtual void compute_error ()=0
 
virtual double compute_cost_edge (edge_descriptor e, const Point &collapsePos)=0
 
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 ()
 
virtual std::string get_as_string () const =0
 

Protected Attributes

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::Error_metric< HalfedgeGraph, PointMap >

Abstract class to compute the collapse cost of each edge in a mesh. It also manages a priority queue of (edge, cost, collapse position).

Definition at line 61 of file Error_metric.h.

Member Typedef Documentation

◆ edge2cost_map

template<typename HalfedgeGraph , typename PointMap >
typedef std::map< edge_descriptor, std::pair< double, Point > > FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::edge2cost_map

Priority queue object, manages the priority of (edge, cost, kept vertex position) tuples according to their cost.

Definition at line 85 of file Error_metric.h.

◆ edge_descriptor

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

Definition at line 70 of file Error_metric.h.

◆ edge_iterator

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

Definition at line 68 of file Error_metric.h.

◆ Geometry

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

Definition at line 74 of file Error_metric.h.

◆ halfedge_descriptor

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor

Definition at line 66 of file Error_metric.h.

◆ Point

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

Definition at line 73 of file Error_metric.h.

◆ priority_queue_edges

template<typename HalfedgeGraph , typename PointMap >
typedef std::priority_queue< std::tuple< edge_descriptor, double, Point >, std::vector< std::tuple< edge_descriptor, double, Point > >, Compare_weights2< HalfedgeGraph > > FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::priority_queue_edges

Definition at line 81 of file Error_metric.h.

◆ Vector

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

Definition at line 72 of file Error_metric.h.

◆ vertex_descriptor

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor

Definition at line 64 of file Error_metric.h.

Constructor & Destructor Documentation

◆ Error_metric()

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

Definition at line 87 of file Error_metric.h.

◆ ~Error_metric()

template<typename HalfedgeGraph , typename PointMap >
virtual FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::~Error_metric ( )
inlinevirtual

Definition at line 98 of file Error_metric.h.

Member Function Documentation

◆ compute_cost_edge()

template<typename HalfedgeGraph , typename PointMap >
virtual double FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::compute_cost_edge ( edge_descriptor  e,
const Point collapsePos 
)
pure virtual

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

Implemented in FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >, FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >, and FEVV::Filters::Edge_length_metric< HalfedgeGraph, PointMap >.

◆ compute_error()

template<typename HalfedgeGraph , typename PointMap >
virtual void FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::compute_error ( )
pure virtual

◆ delete_from_descriptors()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::delete_from_descriptors ( edge_descriptor  e)
inline

Definition at line 121 of file Error_metric.h.

◆ get_as_string()

template<typename HalfedgeGraph , typename PointMap >
virtual std::string FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::get_as_string ( ) const
pure virtual

◆ get_mean_threshold()

template<typename HalfedgeGraph , typename PointMap >
double FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::get_mean_threshold ( ) const
inline

Definition at line 119 of file Error_metric.h.

◆ get_size_queue()

template<typename HalfedgeGraph , typename PointMap >
size_t FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::get_size_queue ( ) const
inline

Definition at line 193 of file Error_metric.h.

◆ get_top_cost()

template<typename HalfedgeGraph , typename PointMap >
double FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::get_top_cost ( ) const
inline

Definition at line 117 of file Error_metric.h.

◆ get_top_queue()

template<typename HalfedgeGraph , typename PointMap >
std::tuple< typename boost::graph_traits< HalfedgeGraph >::edge_descriptor, double, typename Geometry::Point > FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::get_top_queue ( ) const
inline

Definition at line 114 of file Error_metric.h.

◆ get_vkept()

template<typename HalfedgeGraph , typename PointMap >
Kept_position< HalfedgeGraph, PointMap >* FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::get_vkept ( )
inline

Definition at line 196 of file Error_metric.h.

◆ is_present_in_map()

template<typename HalfedgeGraph , typename PointMap >
bool FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::is_present_in_map ( edge_descriptor  e) const
inline

Definition at line 123 of file Error_metric.h.

Here is the call graph for this function:

◆ is_queue_empty()

template<typename HalfedgeGraph , typename PointMap >
bool FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::is_queue_empty ( )
inline

Definition at line 110 of file Error_metric.h.

◆ pop_queue()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::pop_queue ( )
inline

Definition at line 115 of file Error_metric.h.

◆ remove_old_edges()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::remove_old_edges ( vertex_descriptor  vs,
vertex_descriptor  vt 
)
inline

Definition at line 134 of file Error_metric.h.

Here is the call graph for this function:

Member Data Documentation

◆ _dequantiz

template<typename HalfedgeGraph , typename PointMap >
FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap >& FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::_dequantiz
protected

Definition at line 215 of file Error_metric.h.

◆ _edges_cost

template<typename HalfedgeGraph , typename PointMap >
edge2cost_map FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::_edges_cost
protected

queue with the cost/weight as the key

Definition at line 209 of file Error_metric.h.

◆ _g

template<typename HalfedgeGraph , typename PointMap >
HalfedgeGraph& FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::_g
protected

Definition at line 204 of file Error_metric.h.

◆ _gt

template<typename HalfedgeGraph , typename PointMap >
const Geometry FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::_gt
protected

Definition at line 205 of file Error_metric.h.

◆ _operator

template<typename HalfedgeGraph , typename PointMap >
FEVV::Filters::VKEPT_POSITION FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::_operator
protected

Definition at line 211 of file Error_metric.h.

◆ _pm

template<typename HalfedgeGraph , typename PointMap >
PointMap& FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::_pm
protected

Definition at line 206 of file Error_metric.h.

◆ _queue

template<typename HalfedgeGraph , typename PointMap >
priority_queue_edges FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::_queue
protected

Definition at line 208 of file Error_metric.h.

◆ _threshold

template<typename HalfedgeGraph , typename PointMap >
double FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::_threshold
protected

Definition at line 214 of file Error_metric.h.

◆ _vkept

template<typename HalfedgeGraph , typename PointMap >
Kept_position< HalfedgeGraph, PointMap >* FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >::_vkept
protected

Definition at line 213 of file Error_metric.h.


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