package graphlib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Generic dot printer.

val pp_graph : ?name:string -> ?cluster:bool -> ?subgraph:bool -> ?attrs:string list -> ?string_of_node:'n symbolizer -> ?node_label:'n symbolizer -> ?edge_label:'e symbolizer -> nodes_of_edge:('e -> 'n * 'n) -> nodes:'n Core_kernel.Sequence.t -> edges:'e Core_kernel.Sequence.t -> Format.formatter -> unit

pp_graph ~nodes_of_edge ~nodes ~edges ppf - generic dot printer.

This function is useful for implementing custom dot printers. Use it if the default dot printer Graph.pp doesn't suit your needs.

For the purpose of this function a graph can be represented with three values:

  • nodes_of_edge returns the source and destination nodes of an edge;
  • nodes is a sequence of nodes;
  • edges is a sequence of edges;
  • parameter name

    the name of the graph.

  • parameter attrs

    graphviz attributes of the graph.

  • parameter string_of_node

    name of a node.

  • parameter node_label

    text representation of the node label.

  • parameter edge_label

    text representation of the edge label.

  • parameter cluster

    print graph as a cluster.

  • parameter subgraph

    print graph as a subgraph.

    All optional parameters default to a null value, so that if a parameter is not specified, then a corresponding entry will not be printed.

OCaml

Innovation. Community. Security.