change edge weight attribute to len
This commit is contained in:
		
							parent
							
								
									c5e70bf401
								
							
						
					
					
						commit
						39dd8d901e
					
				| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue