コード例 #1
0
ファイル: AvidPathInfo.cs プロジェクト: jbarson/KineticsTool
        public AvidPathInfo Clone()
        {
            var result = new AvidPathInfo(Distance, Start, Destination);
            result.PathNodes.AddRange(PathNodes);

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

            result.PathNodes.AddRange(PathNodes);

            return(result);
        }
コード例 #3
0
ファイル: AvidPathInfo.cs プロジェクト: jbarson/KineticsTool
 /// <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;
 }
コード例 #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);
        }
コード例 #5
0
 public static string AvidPathToString(AvidPathInfo path)
 {
     string pathNodes = string.Join(" -> ", path.PathNodes);
     return string.Format("D:{0} ({1})", path.Distance, pathNodes);
 }
コード例 #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;
 }