public PathsManager(string[] nodes, List<Link> nodesLinks) { if (nodes.Length == 0) { throw new Exception("The specified Nodes list is invalid!"); } if (nodesLinks.Count == 0) { throw new Exception("The specified NodesLinks list is invalid!"); } this._nodes = nodes; this._nodesLinks = nodesLinks; this._posiblePaths = new List<PathResult>(); this._currentPath = new PathResult(); }
public bool Equals(PathResult anotherPath) { if (this.Message != anotherPath.Message) { return false; } if (this.TotalWeights != anotherPath.TotalWeights) { return false; } if (this.Path.Equals(anotherPath.Path)) { return false; } return true; }
internal PathResult Clone() { var clonedPath = new PathResult(); clonedPath.IsValidPath = this.IsValidPath; clonedPath.TotalWeights = this.TotalWeights; clonedPath.Path = (this.Path.ToArray().Clone() as string[]).ToList(); return clonedPath; }