remove references to markov chains

This commit is contained in:
filifa 2025-05-06 22:46:03 -04:00
parent 06048d8a2a
commit c5e70bf401
3 changed files with 5 additions and 7 deletions

View File

@ -25,13 +25,12 @@ import (
"gonum.org/v1/gonum/graph/multi" "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 { type DOTDirectedGraph struct {
*igraph.DirectedGraph *igraph.DirectedGraph
} }
// NewDOTDirectedGraph returns an absorbing Markov chain with no nodes or // NewDOTDirectedGraph returns a graph with no nodes or edges.
// edges.
func NewDOTDirectedGraph() *DOTDirectedGraph { func NewDOTDirectedGraph() *DOTDirectedGraph {
return &DOTDirectedGraph{DirectedGraph: igraph.NewDirectedGraph()} return &DOTDirectedGraph{DirectedGraph: igraph.NewDirectedGraph()}
} }
@ -47,7 +46,7 @@ func (g *DOTDirectedGraph) NewNode() graph.Node {
return &Node{Node: g.DirectedGraph.NewNode()} 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) { func (g *DOTDirectedGraph) SetLine(e graph.Line) {
g.DirectedGraph.SetWeightedLine(e.(*weightedLine)) g.DirectedGraph.SetWeightedLine(e.(*weightedLine))
} }

View File

@ -43,8 +43,7 @@ func (n *Node) DOTID() string {
} }
// weightedLine is a DOT-aware multi.WeightedLine. By being a // weightedLine is a DOT-aware multi.WeightedLine. By being a
// multi.WeightedLine, it allows for self-loops, which are important for // multi.WeightedLine, it allows for self-loops.
// absorbing Markov chains.
type weightedLine struct { type weightedLine struct {
multi.WeightedLine multi.WeightedLine
} }

View File

@ -139,7 +139,7 @@ func init() {
// Cobra also supports local flags, which will only run // Cobra also supports local flags, which will only run
// when this action is called directly. // 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.MarkFlagRequired("file")
rootCmd.Flags().BoolVar(&matlabFmt, "matlab", false, "format output as MATLAB array") rootCmd.Flags().BoolVar(&matlabFmt, "matlab", false, "format output as MATLAB array")