29 #ifndef GUM_SIMPLICIAL_SET_H 30 #define GUM_SIMPLICIAL_SET_H 40 #define GUM_QUASI_RATIO 0.99 41 #define GUM_WEIGHT_THRESHOLD 0.0 154 bool avoid_check =
false);
399 #ifndef GUM_NO_INLINE void makeClique(const NodeId id)
adds the necessary edges so that node 'id' and its neighbors form a clique
void __initialize()
initialize: compute __nb_triangles, __nb_adjacent_neighbors, etc when a new graph is set ...
NodeId bestQuasiSimplicialNode()
gets a quasi simplicial node with the lowest clique weight
void eraseNode(const NodeId id)
removes a node and its adjacent edges from the underlying graph
NodeProperty< __Belong > __containing_list
#define GUM_WEIGHT_THRESHOLD
void setGraph(UndiGraph *graph, const NodeProperty< double > *log_domain_sizes, NodeProperty< double > *log_weights, double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
initialize the simplicial set w.r.t. a new graph
bool hasQuasiSimplicialNode()
indicates whether there exists a quasi simplicial node
void replaceLogWeights(NodeProperty< double > *old_weigths, NodeProperty< double > *new_weights)
reassigns a new set of cliques' log weights (with the same content)
bool hasAlmostSimplicialNode()
indicates whether there exists an almost simplicial node
void eraseClique(const NodeId id)
removes a node and its adjacent edges from the underlying graph
double __log_threshold
quasi and almost simplicial nodes may not be eliminated unless their weight is lower than (1 + thresh...
NodeProperty< Size > __nb_adjacent_neighbours
for each node, the number of pairs of adjacent neighbours
UndiGraph * __graph
the graph on which we perform the simplicial computations
void __updateAllNodes()
put all the nodes in their appropriate list
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
__Belong
indicates for each node to which list (simplicial, almost simplicial, quasi simplicial) it belongs ...
NodeProperty< double > * __log_weights
the weights of the nodes (i.e., weight of their clique)
double __log_tree_width
the current (induced) tree width
The class for generic Hash Tables.
void __updateList(const NodeId id)
put node id in the correct simplicial/almost simplicial/quasi simplicial list
NodeSet __changed_status
the set of nodes that have potentially changed of status
const PriorityQueue< NodeId, double > & allSimplicialNodes()
returns all the simplicial nodes
double __quasi_ratio
for a given node, if the number of pairs of neighbors that are adjacent / the number of adjacent neig...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
EdgeProperty< Size > __nb_triangles
for each edge, keep track of the number of triangles passing through this egde
Class enabling fast retrieval of simplicial, quasi and almost simplicial nodes.
PriorityQueue< NodeId, double > __simplicial_nodes
a queue of the simplicial nodes ordered by increasing node weight
void addEdge(NodeId first, NodeId second)
adds a new edge to the graph and recomputes the simplicial set
PriorityQueue< NodeId, double > __quasi_simplicial_nodes
a queue of the quasi simplicial nodes ordered by increasing node weight
bool hasSimplicialNode()
indicates whether there exists a simplicial node
EdgeSet __fill_ins_list
fill-ins list
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
SimplicialSet(UndiGraph *graph, const NodeProperty< double > *log_domain_sizes, NodeProperty< double > *log_weights, double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
constructor. initializes the simplicial set w.r.t. a given graph
bool isSimplicial(const NodeId id)
indicates whether a given node is a simplicial node
The base class for all undirected edges.
NodeId bestAlmostSimplicialNode()
gets the almost simplicial node with the lowest clique weight
SimplicialSet & operator=(const SimplicialSet &)
prevent a copy operator to be used
Base class for undirected graphs.
NodeId bestSimplicialNode()
returns the simplicial node with the lowest clique weight
const PriorityQueue< NodeId, double > & allAlmostSimplicialNodes()
returns all the almost simplicial nodes
PriorityQueue< NodeId, double > __almost_simplicial_nodes
a queue of the almost simplicial nodes ordered by increasing node weight
bool __we_want_fill_ins
a boolean indicating if we want fill-ins list with the standard triangulation method ...
~SimplicialSet()
destructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const PriorityQueue< NodeId, double > & allQuasiSimplicialNodes()
returns all the quasi simplicial nodes
const NodeProperty< double > * __log_domain_sizes
the log of the modalities of the nodes
void setFillIns(bool on_off)
sets/unset the fill-ins storage in the standard triangulation procedure
Size NodeId
Type for node ids.
const EdgeSet & fillIns() const
returns the set of all the fill-ins added to the graph so far
void eraseEdge(const Edge &edge)
removes an edge from the graph and recomputes the simplicial set