func (l *Link) Attributes() []encoding.Attribute {
	attrs := []encoding.Attribute{{
		Key:   "weight",
		Value: fmt.Sprintf("%f", l.ConnectionWeight),
	},
		{
			Key:   "recurrent",
			Value: fmt.Sprintf("%v", l.IsRecurrent),
		},
	}
	if len(l.Params) > 0 {
		attrs = append(attrs, encoding.Attribute{
			Key:   "parameters",
			Value: fmt.Sprintf("%v", l.Params),
		})
	}
	return attrs
}
Attributes returns list of standard attributes associated with the graph edge
package network
import (
	"fmt"
	"gonum.org/v1/gonum/graph"
	"gonum.org/v1/gonum/graph/encoding"
)
func (l *Link) From() graph.Node {
	return l.InNode
}
func (l *Link) To() graph.Node {
	return l.OutNode
}
func (l *Link) Weight() float64 {
	return l.ConnectionWeight
}
func (l *Link) ReversedEdge() graph.Edge {
	return l
}