Skip to content

Latest commit

 

History

History
148 lines (83 loc) · 3.87 KB

digraph_export.md

File metadata and controls

148 lines (83 loc) · 3.87 KB

Module digraph_export

Utility functions for converting and viewing digraph graphs.

Data Types


convert_properties() = [{name, string()} | pretty | {pretty, boolean()}]

format() = dot | graphml

program() = cytoscape | gephi

Function Index

convert/2Equivalent to convert / 3.
convert/3 Serialize a digraph graph to the given file format.
formats/0 List all file formats supported by the convert functions.
programs/0 List all external viewing programs supported by the view function.
view/3 Launch an external program to view a serialized graph.

Function Details

convert/2


convert(Graph::digraph:graph(), Format::format()) -> unicode:charlist()

Equivalent to convert / 3.

convert/3


convert(Graph::digraph:graph(), Format::format(), Options::convert_properties()) -> unicode:charlist()

Graph: An existing digraph graph.
Format: One of the supported file formats.
Options: Property list of conversion options.

returns: The serialized graph data.

Serialize a digraph graph to the given file format.

Options are passed as a property list. The two supported options are:

  • Name: An optional name to include in the graph file.

  • Pretty: A boolean value for if the output file should be formatted for human readability or optimized for size.

See also: formats/0.

formats/0


formats() -> [format(), ...]

List all file formats supported by the convert functions.

See also: convert/2, convert/3.

programs/0


programs() -> [program(), ...]

List all external viewing programs supported by the view function.

See also: view/3.

view/3


view(Converted::unicode:charlist(), Format::format(), Program::program()) -> string()

Converted: The serialized graph data.
Format: The format the graph was serialized in.
Program: The external program to launch.

returns: The output of the program.

Launch an external program to view a serialized graph. A temporary file is created to store the graph and passed into the external program.

The external program will need to be installed and on the current PATH for this to function.

This will block on the external program completing. Please spawn this function in a separate process if that is not desired.

See also: formats/0, programs/0.