The application graph deals with directed and undirected graphs. They can be defined abstractly as a set of nodes and EDGES or for instance as the vertex-edge graph of a polytope.
Lattice represented as a directed acyclic graph.
Indices of the first nodes in each level. Intended for internal use only; please use nodes_of_dim instead
Each node of the FaceLattice corresponds to a face. The node attribute is a set of vertices comprising the face. Incident edges lead to the containing faces of the next (higher) dimension.
Index of the node representing the empty face
Dimension of the lattice = number of levels - 1
Indices of nodes representing faces of the given dimension
Set<Int> |
Index of the node representing the whole thing
Visualize the FaceLattice.
Int | seed | random seed value for the node placement |
option list: | Visual::Lattice::decorations |
Visual::Lattice |
Visualize the dual FaceLattice.
Int | seed | random seed value for the node placement |
option list: | Visual::Lattice::decorations |
Visual::Lattice |
A graph with optional node and edge attributes.
combinatorial description of the Graph in the form of adjacency matrix
Explore the graph as a sequence of its edges.
Visualizes the graph.
Decorations may include Coord
, disabling the default spring embedder.
Int | seed | random seed value for the spring embedder |
option list: | Visual::Graph::decorations |
Visual::Graph |
Node connectivity of the graph, that is, the minimal number of nodes to be removed from the graph such that the result is disconnected.
Difference of the black and white nodes if the graph is BIPARTITE. Otherwise -1.
Find the automorphism group of the graph.
Find the automorphism group of the symmetric incidence matrix.
IncidenceMatrix<Symmetric> | m |
Array<Array<Int>> | each element encodes a permutation of its rows (=columns). |
Find the automorphism group of the non-symmetric incidence matrix.
IncidenceMatrix<NonSymmetric> | m |
Array<Pair<Array<Int>,Array<Int>>> | each element encodes a permutation of its rows ( first ) and columns (second ). |
Find the node permutation mapping graph1 to graph2. If the given graphs are not isomorphic, throw an expection.
Find the permutations mapping the non-symmetric incidence matrix m1 to m2. If the given matrices are not isomorphic, throw an expection.
IncidenceMatrix<NonSymmetric> | m1 | |
IncidenceMatrix<NonSymmetric> | m2 |
Pair<Array<Int>,Array<Int>> | first permutation applies to the rows, second applies to the columns. |
true if graph1 and graph2 are isomorphic.
Compute the connectivity of a given graph using the Ford-Fulkerson flow algorithm.
Compute the lengths of all edges of a given graph G from the coordinates coords of its nodes.
Graph<Directed> | G | the input graph |
Matrix | coords | the coordinates of the nodes |
EdgeMap |
Creates a graph from a given list of edges.
Draw the given graph or face lattice object using graphviz program
neato
or dot
respectively.
The output is rendered in PostScript format and fed into a viewer program, if one is configured.
If you prefer to produce another output format, please use the File option and call the neato
or dot
program manually.
Visual::Object | vis_obj ... | objects to display |
String | File | "filename" or "AUTO"
Store the graph description in a DOT source file without starting the interactive GUI.
The
.dot suffix is automatically added to the file name. Specify AUTO if you want the filename be automatically derived
from the drawing title.
You can also use any expression allowed for the
open function,
including "-" for terminal output, "&HANDLE" for an already opened file handle,
or "| program" for a pipe. |
Create an embedding of the Hasse diagram as a layered graph. The embedding algorithm tries to minimize the weighted sum of squares of edge lengths, starting from a random distribution. The weights are relative to the fatness of the layers. The y-space between the layers is constant.
Array | label_width | estimates (better upper bounds) of the label width of each node.
The computed layout guarantees that the distances between the nodes in a layer are at least equal to
the widest label in this layer. |
Bool | dual | the node representing the empty face is put on the topmost level |
Float | eps | calculation accuracy. |
Int | seed | effects the initial placement of the nodes. |
Write a graph in LEDA input format.
Produce a MetaPost input file with given visual objects.
Visual::Object | vis_obj ... | objects to display |
String | File | "filename" or "AUTO"
The MetaPost description always has to be stored in a file, there is no interactive viewer for this
kind of visualization.
For the file name you can use any expression allowed for the
open function,
including "-" for terminal output, "&HANDLE" for an already opened file handle,
or "| program" for a pipe. Real file names are automatically completed with the .mp suffix if needed. The default setting "AUTO" lets the file name be derived from the drawing title.
The automatically generated file name is displayed in the verbose mode.
|
Produce a 3-d embedding for the graph using the spring embedding algorithm along the lines of
Thomas Fruchtermann and Edward Reingold:Graph Drawing by Force-directed Placement.Software Practice and Experience Vol. 21, 1129-1164 (1992), no. 11.
props::Graph<Undirected> | graph | to be embedded. |
EdgeMap | edge_weights | relative edge lengths.
By default the embedding algorithm tries to stretch all edges to the same length. |
Vector | z-ordering | an objective function provides an additional force along the z-axis,
trying to rearrange nodes in the order of the function growth. |
Float | z-factor | gain coefficient applied to the z-ordering force. |
Int | seed | random seed for initial node placement on a unit sphere. |
Float | scale | enlarges the ideal edge length |
Float | balance | changes the balance between the edge contraction and node repulsion forces |
Float | inertion | affects how the nodes are moved, can be used to restrain oscillations |
Float | viscosity | idem |
Float | eps | a threshold for point movement between iterations, below that it is considered to stand still |
Int | max-iterations | hard limit for computational efforts.
The algorithm terminates at latest after that many iterations regardless of the convergence achieved so far. |
Attributes modifying the appearance of graphs
Matrix<Float> | Coord | 2-d or 3-d coordinates of the nodes.
If not specified, a random embedding is generated using a pseudo-physical spring model |
Flexible<RGB> | NodeColor | alias for PointColor |
Flexible<Float> | NodeThickness | alias for PointThickness |
Flexible<RGB> | NodeBorderColor | alias for PointBorderColor |
Flexible<Float> | NodeBorderThickness | alias for PointBorderThickness |
Flexible<String> | NodeStyle | alias for PointStyle |
String | NodeLabels | alias for PointLabels |
Attributes modifying the appearance of face lattices
Flexible<Int> | ArrowStyle | How to draw directed edges: 0 (like undirected), 1 (with an arrow pointing towards the edge),
or -1 (with an arrow pointing against the edge). Default is 1. |
Array<String> | AtomLabels | Labels of atoms, to use as building blocks for node labels. By default the ordinal numbers are taken. |