// SetNodeLevel set a level for a node
SetNodeLevel set a level for a node
// SetNodeLevel set a level for a node
func (lg LevelGraph) SetNodeLevel(node graph.NodeID, level Level) error {
	if !lg.IsNodeValid(node) {
		return fmt.Errorf("node %v is invalid", node)
	}
	lg.nodesLevel[node] = level
	return nil
}
func ( lg LevelGraph ) SetNodeLevel ( node graph . NodeID , level Level ) error { if ! lg . IsNodeValid ( node ) { return fmt . Errorf ( " " , node ) } lg . nodesLevel [ node ] = level return nil }
SetNodeLevel set a level for a node
SetNodeLevel set a level for a node