Top | ![]() |
![]() |
![]() |
![]() |
|
(*UfoFilterPredicate) () |
UfoGraph * | ufo_graph_new () |
|
ufo_graph_connect_nodes () |
|
ufo_graph_is_connected () |
|
ufo_graph_remove_edge () |
|
ufo_graph_get_edge_label () |
|
ufo_graph_get_num_nodes () |
|
ufo_graph_get_nodes () |
|
ufo_graph_get_nodes_filtered () |
|
ufo_graph_get_num_edges () |
|
ufo_graph_get_edges () |
|
ufo_graph_get_roots () |
|
ufo_graph_get_leaves () |
|
ufo_graph_get_num_predecessors () |
|
ufo_graph_get_predecessors () |
|
ufo_graph_get_num_successors () |
|
ufo_graph_get_successors () |
|
ufo_graph_find_longest_path () |
|
ufo_graph_flatten () |
|
ufo_graph_expand () |
UfoGraph * | ufo_graph_copy () |
UfoGraph * | ufo_graph_shallow_copy () |
UfoGraph * | ufo_graph_shallow_subgraph () |
|
ufo_graph_dump_dot () |
void ufo_graph_connect_nodes (UfoGraph *graph
,UfoNode *source
,UfoNode *target
,);
gpointer label
Connect source
with target
in graph
and annotate the edge with
label
.
gboolean ufo_graph_is_connected (UfoGraph *graph
,UfoNode *from
,UfoNode *to
);
Check whether from
is connected to to
.
void ufo_graph_remove_edge (UfoGraph *graph
,UfoNode *source
,UfoNode *target
);
Remove edge between source
and target
.
gpointer ufo_graph_get_edge_label (UfoGraph *graph
,UfoNode *source
,UfoNode *target
);
Retrieve edge label between source
and target
.
guint ufo_graph_get_num_nodes (UfoGraph *graph
);
Get number of nodes in graph
. The number is always divisible by two, because
nodes are only part of a graph if member of an edge.
GList * ufo_graph_get_nodes_filtered (UfoGraph *graph
,UfoFilterPredicate func
,);
gpointer user_data
Get nodes filtered by the predicate func
.
graph |
A UfoGraph |
|
func |
Predicate function to filter out nodes. |
[scope call] |
user_data |
Data to be passed to |
guint ufo_graph_get_num_edges (UfoGraph *graph
);
Get number of edges present in graph
.
GList * ufo_graph_get_edges (UfoGraph *graph
);
Get all edges contained in graph
.
a list of UfoEdge elements or NULL
g_list_free()
[transfer full][element-type UfoEdge]
guint ufo_graph_get_num_predecessors (UfoGraph *graph
,UfoNode *node
);
GList * ufo_graph_get_predecessors (UfoGraph *graph
,UfoNode *node
);
Get the all nodes connected to node
.
guint ufo_graph_get_num_successors (UfoGraph *graph
,UfoNode *node
);
GList * ufo_graph_get_successors (UfoGraph *graph
,UfoNode *node
);
Get the successors of node
.
GList * ufo_graph_find_longest_path (UfoGraph *graph
,UfoFilterPredicate pred
,);
gpointer user_data
Find the longest path in task_graph
that fulfills predicate
.
graph |
A UfoGraph |
|
pred |
Predicate function for which elements of the path must
evaluate to |
[scope call] |
user_data |
User data passed to |
void ufo_graph_expand (UfoGraph *graph
,);
GList *path
Duplicate nodes between head and tail of path and insert at the exact the position of where path started and ended.
UfoGraph * ufo_graph_copy (UfoGraph *graph
,);
GError **error
Deep-copies the structure of graph
by duplicating all nodes via
ufo_node_copy()
. This means the nodes will not be the same but have the same
properties.
UfoGraph *
ufo_graph_shallow_copy (UfoGraph *graph
);
Make a shallow copy of graph
, which means both graphs share the same nodes.
UfoGraph * ufo_graph_shallow_subgraph (UfoGraph *graph
,UfoFilterPredicate pred
,);
gpointer user_data
Make a shallow subgraph of graph
that contains nodes which satisfy pred
.
graph |
A UfoGraph |
|
pred |
A filter predicate. |
[scope call] |
user_data |
User data that is passed to |