change edge weight attribute to len

This commit is contained in:
filifa
2025-05-06 23:38:25 -04:00
parent c5e70bf401
commit 39dd8d901e

View File

@@ -54,7 +54,7 @@ func (e *weightedLine) SetAttribute(attr encoding.Attribute) error {
var err error
switch attr.Key {
case "weight":
case "len":
e.W, err = strconv.ParseFloat(attr.Value, 64)
default:
err = errors.New("unknown key:" + attr.Key)