Module otpbp_graph

Data Types

edge()

edge() = {vertex(), vertex(), label()}

edge_map()

edge_map() = #{vertex() => ordsets:ordset(vertex())}

graph()

graph() = #graph{vs = vertice_map(), in_es = edge_map(), out_es = edge_map(), cyclic = boolean(), next_vid = non_neg_integer()}

graph_cyclicity()

graph_cyclicity() = acyclic | cyclic

graph_type()

graph_type() = graph_cyclicity()

label()

label() = term()

vertex()

vertex() = term()

vertice_map()

vertice_map() = #{vertex() => label()}

Function Index

add_edge/3
add_edge/4
add_vertex/1
add_vertex/2
add_vertex/3
arborescence_root/1
components/1
condensation/1
cyclic_strong_components/1
del_edge/2
del_edges/2
del_edges/3
del_path/3
del_vertex/2
del_vertices/2
edges/1
edges/2
edges/3
fold_vertices/3
get_cycle/2
get_path/3
get_short_cycle/2
get_short_path/3
has_edge/2
has_edge/3
has_path/3
has_vertex/2
in_degree/2
in_edges/2
in_neighbours/2
info/1
is_acyclic/1
is_arborescence/1
is_tree/1
loop_vertices/1
new/0
new/1
no_edges/1
no_vertices/1
out_degree/2
out_edges/2
out_neighbours/2
postorder/1
postorder/2
preorder/1
preorder/2
reachable/2
reachable_via_neighbours/2
reaching/2
reaching_via_neighbours/2
reverse_postorder/1
reverse_postorder/2
roots/1
sink_vertices/1
source_vertices/1
strong_components/1
subgraph/2
subgraph/3
topsort/1
vertex/2
vertex/3
vertices/1
vertices_with_labels/1

Function Details

add_edge/3

add_edge(C::graph(), V1::vertex(), V2::vertex()) -> graph()

add_edge/4

add_edge(G::graph(), V1::vertex(), V2::vertex(), L::label()) -> graph()

add_vertex/1

add_vertex(G::graph()) -> {vertex(), graph()}

add_vertex/2

add_vertex(G::graph(), V::vertex()) -> graph()

add_vertex/3

add_vertex(G::graph(), V::vertex(), L::label()) -> graph()

arborescence_root/1

arborescence_root(G::graph()) -> no | {yes, vertex()}

components/1

components(G::graph()) -> [[vertex()]]

condensation/1

condensation(G::graph()) -> graph()

cyclic_strong_components/1

cyclic_strong_components(G::graph()) -> [[vertex()]]

del_edge/2

del_edge(G::graph(), E::edge()) -> graph()

del_edges/2

del_edges(C::graph(), Es::[edge()]) -> graph()

del_edges/3

del_edges(G::graph(), V1::vertex(), V2::vertex()) -> graph()

del_path/3

del_path(G::graph(), V1::vertex(), V2::vertex()) -> graph()

del_vertex/2

del_vertex(G::graph(), V::vertex()) -> graph()

del_vertices/2

del_vertices(G::graph(), Vs::[vertex()]) -> graph()

edges/1

edges(Graph::graph()) -> [edge()]

edges/2

edges(Graph::graph(), V::vertex()) -> [edge()]

edges/3

edges(Graph::graph(), V1::vertex(), V2::vertex()) -> ordsets:ordset(edge())

fold_vertices/3

fold_vertices(Graph::graph(), Fun::fun((vertex(), label(), any()) -> any()), Acc::any()) -> any()

get_cycle/2

get_cycle(G::graph(), V::vertex()) -> [vertex(), ...] | false

get_path/3

get_path(G::graph(), V1::vertex(), V2::vertex()) -> [vertex(), ...] | false

get_short_cycle/2

get_short_cycle(G::graph(), V::vertex()) -> [vertex(), ...] | false

get_short_path/3

get_short_path(G::graph(), V1::vertex(), V2::vertex()) -> [vertex(), ...] | false

has_edge/2

has_edge(Graph::graph(), E::edge()) -> boolean()

has_edge/3

has_edge(Graph::graph(), V1::vertex(), V2::vertex()) -> boolean()

has_path/3

has_path(G::graph(), From::vertex(), To::vertex()) -> boolean()

has_vertex/2

has_vertex(Graph::graph(), V::vertex()) -> boolean()

in_degree/2

in_degree(Graph::graph(), V::vertex()) -> non_neg_integer()

in_edges/2

in_edges(Graph::graph(), V::vertex()) -> [edge()]

in_neighbours/2

in_neighbours(Graph::graph(), V::vertex()) -> [vertex()]

info/1

info(Graph::graph()) -> [{cyclicity, graph_cyclicity()}]

is_acyclic/1

is_acyclic(G::graph()) -> boolean()

is_arborescence/1

is_arborescence(G::graph()) -> boolean()

is_tree/1

is_tree(G::graph()) -> boolean()

loop_vertices/1

loop_vertices(G::graph()) -> [vertex()]

new/0

new() -> graph()

new/1

new(Options::[graph_type()]) -> graph()

no_edges/1

no_edges(Graph::graph()) -> non_neg_integer()

no_vertices/1

no_vertices(Graph::graph()) -> non_neg_integer()

out_degree/2

out_degree(Graph::graph(), V::vertex()) -> non_neg_integer()

out_edges/2

out_edges(Graph::graph(), V::vertex()) -> [edge()]

out_neighbours/2

out_neighbours(Graph::graph(), V::vertex()) -> [vertex()]

postorder/1

postorder(G::graph()) -> [vertex()]

postorder/2

postorder(G::graph(), Vs::[vertex()]) -> [vertex()]

preorder/1

preorder(G::graph()) -> [vertex()]

preorder/2

preorder(G::graph(), Vs::[vertex()]) -> [vertex()]

reachable/2

reachable(G::graph(), Vs::[vertex()]) -> [vertex()]

reachable_via_neighbours/2

reachable_via_neighbours(G::graph(), Vs::[vertex()]) -> [vertex()]

reaching/2

reaching(G::graph(), Vs::[vertex()]) -> [vertex()]

reaching_via_neighbours/2

reaching_via_neighbours(G::graph(), Vs::[vertex()]) -> [vertex()]

reverse_postorder/1

reverse_postorder(G::graph()) -> [vertex()]

reverse_postorder/2

reverse_postorder(G::graph(), Vs::[vertex()]) -> [vertex()]

roots/1

roots(G::graph()) -> [vertex()]

sink_vertices/1

sink_vertices(Graph::graph()) -> [vertex()]

source_vertices/1

source_vertices(Graph::graph()) -> [vertex()]

strong_components/1

strong_components(G::graph()) -> [[vertex()]]

subgraph/2

subgraph(G::graph(), Vs::[vertex()]) -> graph()

subgraph/3

subgraph(G::graph(), Vs::[vertex()], Options::[{type, inherit | [graph_type()]} | {keep_labels, boolean()}]) -> graph()

topsort/1

topsort(G::graph()) -> [vertex()]

vertex/2

vertex(Graph::graph(), V::vertex()) -> label()

vertex/3

vertex(Graph::graph(), V::vertex(), Default::label()) -> label()

vertices/1

vertices(Graph::graph()) -> [vertex()]

vertices_with_labels/1

vertices_with_labels(Graph::graph()) -> [{vertex(), label()}]


Generated by EDoc