Dotx Elixir dot parser v0.2.0 Dotx View Source
This library is a DOT parser and generator.
Main functions are encode/1
and decode/1
(usable also via to_string
and the String.Chars
protocol).
Some additional helper function are useful to inspect a graph and use them :
flatten/1
create unitary edge for every DOT shortand (inline edgea->b->c
or graph edge{a b}->c
)spread_attributes/1
spread default attributes from graph/subgraphs to all children handling inheritance of attributes.
Link to this section Summary
Link to this section Types
Link to this type
dotnode() View Source
Link to this type
edge() View Source
Link to this type
flatedge() View Source
Link to this type
graph() View Source
Link to this type
graph(edgetype)
View Source
graph(edgetype)
View Source
graph(edgetype) :: %Dotx.Graph{
attrs: %{optional(id()) => id()},
children: [dotnode() | edgetype | subgraph(edgetype)],
edges_attrs: %{optional(id()) => id()},
graphs_attrs: %{optional(id()) => id()},
id: nil | id(),
nodes_attrs: %{optional(id()) => id()},
strict: boolean(),
type: :graph | :digraph
}
graph(edgetype) :: %Dotx.Graph{ attrs: %{optional(id()) => id()}, children: [dotnode() | edgetype | subgraph(edgetype)], edges_attrs: %{optional(id()) => id()}, graphs_attrs: %{optional(id()) => id()}, id: nil | id(), nodes_attrs: %{optional(id()) => id()}, strict: boolean(), type: :graph | :digraph }
Link to this type
nodeid()
View Source
nodeid()
View Source
nodeid() :: [binary()]
nodeid() :: [binary()]
Link to this type
subgraph(edgetype) View Source
Link to this section Functions
Link to this function
decode(bin) View Source
Link to this function
decode!(bin) View Source
Link to this function
encode(graph) View Source
Link to this function
flatten(graph) View Source
Link to this function
identify(graph) View Source
Link to this function
identify(graph, i) View Source
Link to this function
spread_attributes(graph) View Source
Link to this function