Details
GTS_GNODE_SPLIT_CLASS()
#define GTS_GNODE_SPLIT_CLASS(klass) |
GTS_GNODE_SPLIT()
#define GTS_GNODE_SPLIT(obj) |
GTS_IS_GNODE_SPLIT()
#define GTS_IS_GNODE_SPLIT(obj) |
GTS_GNODE_SPLIT_N1()
#define GTS_GNODE_SPLIT_N1(ns) (GTS_IS_GNODE_SPLIT ((ns)->n1) ? GTS_GNODE_SPLIT ((ns)->n1)->n : GTS_GNODE ((ns)->n1)) |
GTS_GNODE_SPLIT_N2()
#define GTS_GNODE_SPLIT_N2(ns) (GTS_IS_GNODE_SPLIT ((ns)->n2) ? GTS_GNODE_SPLIT ((ns)->n2)->n : GTS_GNODE ((ns)->n2)) |
struct GtsGNodeSplitClass
struct GtsGNodeSplitClass; |
struct GtsGNodeSplit
struct GtsGNodeSplit {
GtsObject object;
GtsGNode * n;
GtsObject * n1;
GtsObject * n2;
}; |
gts_gnode_split_new ()
Creates a new GtsGNodeSplit which would collapse n1 and n2 into
n. The collapse itself is not performed.
gts_gnode_split_collapse ()
Collapses the node split ns. Any new edge created during the
process will be of class klass.
gts_gnode_split_expand ()
Expands the node split ns adding the new nodes to g.
GTS_PGRAPH_CLASS()
#define GTS_PGRAPH_CLASS(klass) |
GTS_IS_PGRAPH()
#define GTS_IS_PGRAPH(obj) |
struct GtsPGraph
struct GtsPGraph {
GtsObject object;
GtsGraph * g;
GPtrArray * split;
GArray * levels;
GtsGNodeSplitClass * split_class;
GtsWGEdgeClass * edge_class;
guint pos, min, level;
}; |
gts_pgraph_new ()
Creates a new multilevel approximation of graph g. At each level a
maximal matching is created using the Heavy Edge Matching (HEM)
technique of Karypis and Kumar (1997). The newly created nodes are
of type node_class and their weight is set to the sum of the
weights of their children. The newly created edges are of type
edge_class and their weight is set to the sum of the weight of the
collapsed edges. The last level is reached when the maximal
matching obtained would lead to a graph with less than min nodes.
gts_pgraph_add_node ()
Adds one node to the multilevel graph pg by expanding the next
available GtsGNodeSplit.
gts_pgraph_remove_node ()
Removes one node from the multilevel graph pg by collapsing the
first available GtsGNodeSplit.
gts_pgraph_down ()
Performs the required number of expansions to go from the current
level to the level immediately below.
If func is not NULL, it is called after each GtsGNodeSplit has
been expanded.
gts_pgraph_set_node_number ()
void gts_pgraph_set_node_number (GtsPGraph *pg,
guint n); |
Performs the required number of collapses or expansions to set the
number of nodes of pg to n.
gts_pgraph_get_node_number ()
guint gts_pgraph_get_node_number (GtsPGraph *pg); |
gts_pgraph_max_node_number ()
guint gts_pgraph_max_node_number (GtsPGraph *pg); |
gts_pgraph_min_node_number ()
guint gts_pgraph_min_node_number (GtsPGraph *pg); |
gts_pgraph_foreach_node ()