public override sealed void init() { base.init(); if (edges.Count <= 0 || edges.Count > 2) { throw new Exception("MoronChoice must contain either one or two edges, never more or less"); } trueEdge = edges[0]; if (edges.Count == 2) { falseEdge = edges[1]; } }
protected GraphEdge recurseToIntent(GraphEdge root) { MoronChoice choice; if (root == null) { return(null); } choice = root.to as MoronChoice; if (choice == null) { return(root); } return(choice.update()); }
public bool equals(GraphEdge other) { return(to == other.to && from == other.from); }