示例#1
0
        /// <summary>
        /// Performs the actual layout algorithm.
        /// </summary>
        /// <param name="graph">The object containing the graph data</param>
        /// <param name="rootNode">Root node</param>
        protected override void PerformLayout(GraphMapData graph, INode rootNode)
        {
            BidirectionalGraph<string, WeightedEdge<string>> bGraph = GraphSharpUtility.GetBidirectionalGraph(graph);
            IDictionary<string, Vector> nodePositions = GraphSharpUtility.GetNodePositions(graph);
            ISOMLayoutParameters isomLayoutParameters = new ISOMLayoutParameters();

            ISOMLayoutAlgorithm<string, WeightedEdge<string>, BidirectionalGraph<string, WeightedEdge<string>>> isomLayoutAlgorithm = new ISOMLayoutAlgorithm<string, WeightedEdge<string>, BidirectionalGraph<string, WeightedEdge<string>>>(bGraph, nodePositions, isomLayoutParameters);
            isomLayoutAlgorithm.Compute();

            GraphSharpUtility.SetNodePositions(graph, isomLayoutAlgorithm.VertexPositions);
            GraphSharpUtility.FSAOverlapRemoval(graph);
        }
示例#2
0
 public ISOMLayoutAlgorithm(TGraph visitedGraph, IDictionary <TVertex, Point> vertexPositions, ISOMLayoutParameters oldParameters)
     : base(visitedGraph, vertexPositions, oldParameters)
 {
     Init(oldParameters);
 }
示例#3
0
 public ISOMLayoutAlgorithm(TGraph visitedGraph, ISOMLayoutParameters oldParameters)
     : base(visitedGraph)
 {
     Init(oldParameters);
 }