diff --git a/cmd/internal/graph/dot/graph.go b/cmd/internal/graph/dot/graph.go index 3990440..cff53d8 100644 --- a/cmd/internal/graph/dot/graph.go +++ b/cmd/internal/graph/dot/graph.go @@ -25,13 +25,12 @@ import ( "gonum.org/v1/gonum/graph/multi" ) -// DOTDirectedGraph is a graph representing an absorbing Markov chain. +// DOTDirectedGraph is a graph to unmarshal DOT graphs. type DOTDirectedGraph struct { *igraph.DirectedGraph } -// NewDOTDirectedGraph returns an absorbing Markov chain with no nodes or -// edges. +// NewDOTDirectedGraph returns a graph with no nodes or edges. func NewDOTDirectedGraph() *DOTDirectedGraph { return &DOTDirectedGraph{DirectedGraph: igraph.NewDirectedGraph()} } @@ -47,7 +46,7 @@ func (g *DOTDirectedGraph) NewNode() graph.Node { return &Node{Node: g.DirectedGraph.NewNode()} } -// SetLine adds a DOT-aware weighted line to the Markov chain. +// SetLine adds a DOT-aware weighted line to the graph. func (g *DOTDirectedGraph) SetLine(e graph.Line) { g.DirectedGraph.SetWeightedLine(e.(*weightedLine)) } diff --git a/cmd/internal/graph/dot/nodes_edges.go b/cmd/internal/graph/dot/nodes_edges.go index c0cb9fc..c3eb4ae 100644 --- a/cmd/internal/graph/dot/nodes_edges.go +++ b/cmd/internal/graph/dot/nodes_edges.go @@ -43,8 +43,7 @@ func (n *Node) DOTID() string { } // weightedLine is a DOT-aware multi.WeightedLine. By being a -// multi.WeightedLine, it allows for self-loops, which are important for -// absorbing Markov chains. +// multi.WeightedLine, it allows for self-loops. type weightedLine struct { multi.WeightedLine } diff --git a/cmd/root.go b/cmd/root.go index be4b4f1..942aabd 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -139,7 +139,7 @@ func init() { // Cobra also supports local flags, which will only run // when this action is called directly. - rootCmd.Flags().StringVarP(&file, "file", "f", "", "dot file with absorbing Markov chain") + rootCmd.Flags().StringVarP(&file, "file", "f", "", "dot file") rootCmd.MarkFlagRequired("file") rootCmd.Flags().BoolVar(&matlabFmt, "matlab", false, "format output as MATLAB array")