Ejemplo n.º 1
0
 internal void CheckClusterConsistency()
 {
     foreach (var cluster in RootCluster.AllClustersDepthFirst())
     {
         CheckClusterConsistency(cluster);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Translates the graph by delta.
        /// Assumes bounding box is already up to date.
        /// </summary>
        public void Translate(Point delta)
        {
            var nodeSet = new Set <Node>(Nodes);

            foreach (var v in Nodes)
            {
                v.Center += delta;
            }

            foreach (var cluster in RootCluster.AllClustersDepthFirstExcludingSelf())
            {
                foreach (var node in cluster.Nodes.Where(n => !nodeSet.Contains(n)))
                {
                    node.Center += delta;
                }
                cluster.Center += delta;
                cluster.RectangularBoundary.TranslateRectangle(delta);
            }

            foreach (var e in edges)
            {
                e.Translate(delta);
            }

            BoundingBox = new Rectangle(BoundingBox.Left + delta.X, BoundingBox.Bottom + delta.Y, new Point(BoundingBox.Width, BoundingBox.Height));
        }
Ejemplo n.º 3
0
        ///<summary>
        ///</summary>

        public void SetDebugIds()
        {
            int id = 0;

            foreach (var node in RootCluster.AllClustersDepthFirst())
            {
                node.DebugId = id++;
            }

            foreach (var node in Nodes)
            {
                if (node.DebugId == null)
                {
                    node.DebugId = id++;
                }
            }
        }
Ejemplo n.º 4
0
 public HierarchicalModelParameters(RootCluster cluster)
 {
     Cluster = cluster;
 }