public AvidPathInfo Clone() { var result = new AvidPathInfo(Distance, Start, Destination); result.PathNodes.AddRange(PathNodes); return result; }
public AvidPathInfo Clone() { var result = new AvidPathInfo(Distance, Start, Destination); result.PathNodes.AddRange(PathNodes); return(result); }
/// <summary> /// Returns a number of identical paths, of which one is the object is the original path, and others are its clones. /// </summary> public AvidPathInfo[] Branch(int numberOfCopies) { var result = new AvidPathInfo[numberOfCopies]; result[0] = this; for (int i = 1; i < numberOfCopies; i++) { result[i] = Clone(); } return result; }
/// <summary> /// Returns a number of identical paths, of which one is the object is the original path, and others are its clones. /// </summary> public AvidPathInfo[] Branch(int numberOfCopies) { var result = new AvidPathInfo[numberOfCopies]; result[0] = this; for (int i = 1; i < numberOfCopies; i++) { result[i] = Clone(); } return(result); }
public static string AvidPathToString(AvidPathInfo path) { string pathNodes = string.Join(" -> ", path.PathNodes); return string.Format("D:{0} ({1})", path.Distance, pathNodes); }
private AvidPathInfo TracePath(LinkedAvidNode leaf, AvidModelWindow start, AvidModelWindow destination) { var pathInfo = new AvidPathInfo(leaf.NodeDistance, start, destination); pathInfo.PathNodes.AddRange(leaf.GetBranch()); pathInfo.PathNodes.Reverse(); return pathInfo; }