dot

package
v0.9.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package dot creates a graphviz compatible version of the ExprGraph

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(g *gorgonia.ExprGraph) ([]byte, error)

Marshal the graph in a dot (graphviz) This methods also generates the subgraphs

Example
g := gorgonia.NewGraph()

var x, y *gorgonia.Node
var err error

// define the expression
x = gorgonia.NewScalar(g, gorgonia.Float64, gorgonia.WithName("x"))
y = gorgonia.NewScalar(g, gorgonia.Float64, gorgonia.WithName("y"))
if _, err = gorgonia.Add(x, y); err != nil {
	log.Fatal(err)
}
if b, err := Marshal(g); err == nil {
	fmt.Println(string(b))
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL