Example #1
0
        public AvidPathInfo Clone()
        {
            var result = new AvidPathInfo(Distance, Start, Destination);
            result.PathNodes.AddRange(PathNodes);

            return result;
        }
Example #2
0
        public AvidPathInfo Clone()
        {
            var result = new AvidPathInfo(Distance, Start, Destination);

            result.PathNodes.AddRange(PathNodes);

            return(result);
        }
Example #3
0
 /// <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;
 }
Example #4
0
        /// <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);
 }
Example #6
0
 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;
 }