update comments
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
||||
"gonum.org/v1/gonum/graph/multi"
|
||||
)
|
||||
|
||||
// DOTWeightedGraph is a graph to unmarshal DOT graphs.
|
||||
// DOTWeightedGraph is a struct to unmarshal DOT graphs.
|
||||
type DOTWeightedGraph struct {
|
||||
igraph.WeightedGraph
|
||||
WeightAttribute string
|
||||
@@ -36,6 +36,7 @@ func NewDOTDirectedGraph(weightAttr string) DOTWeightedGraph {
|
||||
return DOTWeightedGraph{WeightedGraph: multi.NewWeightedDirectedGraph(), WeightAttribute: weightAttr}
|
||||
}
|
||||
|
||||
// NewDOTUndirectedGraph returns a graph with no nodes or edges.
|
||||
func NewDOTUndirectedGraph(weightAttr string) DOTWeightedGraph {
|
||||
return DOTWeightedGraph{WeightedGraph: multi.NewWeightedUndirectedGraph(), WeightAttribute: weightAttr}
|
||||
}
|
||||
|
||||
@@ -48,8 +48,8 @@ type weightedLine struct {
|
||||
weightAttribute string
|
||||
}
|
||||
|
||||
// SetAttribute enables storing the weight read from a DOT file. It errors if
|
||||
// an attribute is read that can't be stored in a weightedLine.
|
||||
// SetAttribute enables storing the weight read from a DOT file. It only errors
|
||||
// if the weight can't be parsed as a float.
|
||||
func (e *weightedLine) SetAttribute(attr encoding.Attribute) error {
|
||||
var err error
|
||||
|
||||
|
||||
Reference in New Issue
Block a user