com.sun.hotspot.igv.layout.LayoutGraph Java Examples
The following examples show how to use
com.sun.hotspot.igv.layout.LayoutGraph.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HierarchicalGraphLayout.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
protected void performGraphLayout(UniversalGraph<N, E> graph) { Set<LinkWrapper> links = new LinkedHashSet<LinkWrapper>(); Set<VertexWrapper> vertices = new LinkedHashSet<VertexWrapper>(); Map<N, VertexWrapper> vertexMap = new HashMap<N, VertexWrapper>(); for (N node : graph.getNodes()) { VertexWrapper v = new VertexWrapper(node, graph); vertexMap.put(node, v); vertices.add(v); } for (E edge : graph.getEdges()) { N source = graph.getEdgeSource(edge); N target = graph.getEdgeTarget(edge); LinkWrapper l = new LinkWrapper(vertexMap.get(source), vertexMap.get(target)); links.add(l); } HierarchicalLayoutManager m = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.NONE); LayoutGraph layoutGraph = new LayoutGraph(links, vertices); m.doLayout(layoutGraph); }
Example #2
Source File: HierarchicalGraphLayout.java From hottub with GNU General Public License v2.0 | 6 votes |
protected void performGraphLayout(UniversalGraph<N, E> graph) { Set<LinkWrapper> links = new HashSet<LinkWrapper>(); Set<VertexWrapper> vertices = new HashSet<VertexWrapper>(); Map<N, VertexWrapper> vertexMap = new HashMap<N, VertexWrapper>(); for (N node : graph.getNodes()) { VertexWrapper v = new VertexWrapper(node, graph); vertexMap.put(node, v); vertices.add(v); } for (E edge : graph.getEdges()) { N source = graph.getEdgeSource(edge); N target = graph.getEdgeTarget(edge); LinkWrapper l = new LinkWrapper(vertexMap.get(source), vertexMap.get(target)); links.add(l); } HierarchicalLayoutManager m = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.NONE); LayoutGraph layoutGraph = new LayoutGraph(links, vertices); m.doLayout(layoutGraph); }
Example #3
Source File: HierarchicalGraphLayout.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
protected void performGraphLayout(UniversalGraph<N, E> graph) { Set<LinkWrapper> links = new HashSet<LinkWrapper>(); Set<VertexWrapper> vertices = new HashSet<VertexWrapper>(); Map<N, VertexWrapper> vertexMap = new HashMap<N, VertexWrapper>(); for (N node : graph.getNodes()) { VertexWrapper v = new VertexWrapper(node, graph); vertexMap.put(node, v); vertices.add(v); } for (E edge : graph.getEdges()) { N source = graph.getEdgeSource(edge); N target = graph.getEdgeTarget(edge); LinkWrapper l = new LinkWrapper(vertexMap.get(source), vertexMap.get(target)); links.add(l); } HierarchicalLayoutManager m = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.NONE); LayoutGraph layoutGraph = new LayoutGraph(links, vertices); m.doLayout(layoutGraph); }
Example #4
Source File: HierarchicalGraphLayout.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
protected void performGraphLayout(UniversalGraph<N, E> graph) { Set<LinkWrapper> links = new HashSet<LinkWrapper>(); Set<VertexWrapper> vertices = new HashSet<VertexWrapper>(); Map<N, VertexWrapper> vertexMap = new HashMap<N, VertexWrapper>(); for (N node : graph.getNodes()) { VertexWrapper v = new VertexWrapper(node, graph); vertexMap.put(node, v); vertices.add(v); } for (E edge : graph.getEdges()) { N source = graph.getEdgeSource(edge); N target = graph.getEdgeTarget(edge); LinkWrapper l = new LinkWrapper(vertexMap.get(source), vertexMap.get(target)); links.add(l); } HierarchicalLayoutManager m = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.NONE); LayoutGraph layoutGraph = new LayoutGraph(links, vertices); m.doLayout(layoutGraph); }
Example #5
Source File: HierarchicalGraphLayout.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
protected void performGraphLayout(UniversalGraph<N, E> graph) { Set<LinkWrapper> links = new HashSet<LinkWrapper>(); Set<VertexWrapper> vertices = new HashSet<VertexWrapper>(); Map<N, VertexWrapper> vertexMap = new HashMap<N, VertexWrapper>(); for (N node : graph.getNodes()) { VertexWrapper v = new VertexWrapper(node, graph); vertexMap.put(node, v); vertices.add(v); } for (E edge : graph.getEdges()) { N source = graph.getEdgeSource(edge); N target = graph.getEdgeTarget(edge); LinkWrapper l = new LinkWrapper(vertexMap.get(source), vertexMap.get(target)); links.add(l); } HierarchicalLayoutManager m = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.NONE); LayoutGraph layoutGraph = new LayoutGraph(links, vertices); m.doLayout(layoutGraph); }
Example #6
Source File: HierarchicalGraphLayout.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
protected void performGraphLayout(UniversalGraph<N, E> graph) { Set<LinkWrapper> links = new HashSet<LinkWrapper>(); Set<VertexWrapper> vertices = new HashSet<VertexWrapper>(); Map<N, VertexWrapper> vertexMap = new HashMap<N, VertexWrapper>(); for (N node : graph.getNodes()) { VertexWrapper v = new VertexWrapper(node, graph); vertexMap.put(node, v); vertices.add(v); } for (E edge : graph.getEdges()) { N source = graph.getEdgeSource(edge); N target = graph.getEdgeTarget(edge); LinkWrapper l = new LinkWrapper(vertexMap.get(source), vertexMap.get(target)); links.add(l); } HierarchicalLayoutManager m = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.NONE); LayoutGraph layoutGraph = new LayoutGraph(links, vertices); m.doLayout(layoutGraph); }
Example #7
Source File: HierarchicalGraphLayout.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected void performGraphLayout(UniversalGraph<N, E> graph) { Set<LinkWrapper> links = new HashSet<LinkWrapper>(); Set<VertexWrapper> vertices = new HashSet<VertexWrapper>(); Map<N, VertexWrapper> vertexMap = new HashMap<N, VertexWrapper>(); for (N node : graph.getNodes()) { VertexWrapper v = new VertexWrapper(node, graph); vertexMap.put(node, v); vertices.add(v); } for (E edge : graph.getEdges()) { N source = graph.getEdgeSource(edge); N target = graph.getEdgeTarget(edge); LinkWrapper l = new LinkWrapper(vertexMap.get(source), vertexMap.get(target)); links.add(l); } HierarchicalLayoutManager m = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.NONE); LayoutGraph layoutGraph = new LayoutGraph(links, vertices); m.doLayout(layoutGraph); }
Example #8
Source File: HierarchicalGraphLayout.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
protected void performGraphLayout(UniversalGraph<N, E> graph) { Set<LinkWrapper> links = new HashSet<LinkWrapper>(); Set<VertexWrapper> vertices = new HashSet<VertexWrapper>(); Map<N, VertexWrapper> vertexMap = new HashMap<N, VertexWrapper>(); for (N node : graph.getNodes()) { VertexWrapper v = new VertexWrapper(node, graph); vertexMap.put(node, v); vertices.add(v); } for (E edge : graph.getEdges()) { N source = graph.getEdgeSource(edge); N target = graph.getEdgeTarget(edge); LinkWrapper l = new LinkWrapper(vertexMap.get(source), vertexMap.get(target)); links.add(l); } HierarchicalLayoutManager m = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.NONE); LayoutGraph layoutGraph = new LayoutGraph(links, vertices); m.doLayout(layoutGraph); }
Example #9
Source File: OldHierarchicalLayoutManager.java From hottub with GNU General Public License v2.0 | 4 votes |
public void doRouting(LayoutGraph graph) { }
Example #10
Source File: OldHierarchicalLayoutManager.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph layoutGraph) { doLayout(layoutGraph, new HashSet<Vertex>(), new HashSet<Vertex>()); }
Example #11
Source File: OldHierarchicalLayoutManager.java From hottub with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph layoutGraph) { doLayout(layoutGraph, new HashSet<Vertex>(), new HashSet<Vertex>()); }
Example #12
Source File: OldHierarchicalLayoutManager.java From hottub with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph layoutGraph, Set<? extends Vertex> firstLayerHint, Set<? extends Vertex> lastLayerHint) { doLayout(layoutGraph, firstLayerHint, lastLayerHint, new HashSet<Link>()); }
Example #13
Source File: OldHierarchicalLayoutManager.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void doRouting(LayoutGraph graph) { }
Example #14
Source File: HierarchicalClusterLayoutManager.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void doRouting(LayoutGraph graph) { }
Example #15
Source File: OldHierarchicalLayoutManager.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void doRouting(LayoutGraph graph) { }
Example #16
Source File: HierarchicalLayoutManager.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void doRouting(LayoutGraph graph) { // Do nothing for now }
Example #17
Source File: OldHierarchicalLayoutManager.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph layoutGraph, Set<? extends Vertex> firstLayerHint, Set<? extends Vertex> lastLayerHint, Set<? extends Link> importantLinksHint) { if (TRACE) { System.out.println("HierarchicalPositionManager.doLayout called"); System.out.println("Vertex count = " + layoutGraph.getVertices().size() + " Link count = " + layoutGraph.getLinks().size()); } // Nothing to do => quit immediately if (layoutGraph.getVertices().size() == 0) { return; } initTiming.start(); // Mapping vertex to Node in graph nodeMap = new HashMap<Vertex, Node<NodeData, EdgeData>>(); graph = new Graph<NodeData, EdgeData>(); Set<Node<NodeData, EdgeData>> rootNodes = new HashSet<Node<NodeData, EdgeData>>(); Set<Vertex> startRootVertices = new HashSet<Vertex>(); for (Vertex v : layoutGraph.getVertices()) { if (v.isRoot()) { startRootVertices.add(v); } } rootVertexTiming.start(); Set<Vertex> rootVertices = layoutGraph.findRootVertices(startRootVertices); rootVertexTiming.stop(); for (Vertex node : layoutGraph.getVertices()) { NodeData data = new NodeData(node); Node<NodeData, EdgeData> n = graph.createNode(data, node); nodeMap.put(node, n); if (rootVertices.contains(node)) { rootNodes.add(n); } } Set<? extends Link> links = layoutGraph.getLinks(); Link[] linkArr = new Link[links.size()]; links.toArray(linkArr); List<Link> linkList = new ArrayList<Link>(); for (Link l : linkArr) { linkList.add(l); } createEdgesTiming.start(); Collections.sort(linkList, new Comparator<Link>() { public int compare(Link o1, Link o2) { int result = o1.getFrom().getVertex().compareTo(o2.getFrom().getVertex()); if (result == 0) { return o1.getTo().getVertex().compareTo(o2.getTo().getVertex()); } else { return result; } } }); for (Link edge : linkList) { EdgeData data = new EdgeData(edge); graph.createEdge(graph.getNode(edge.getFrom().getVertex()), graph.getNode(edge.getTo().getVertex()), data, data); if (importantLinksHint.size() > 0 && !importantLinksHint.contains(edge)) { data.setImportant(false); } } createEdgesTiming.stop(); initTiming.stop(); removeCyclesTiming.start(); // STEP 1: Remove cycles! removeCycles(rootNodes); if (ASSERT) {
Example #18
Source File: OldHierarchicalLayoutManager.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph layoutGraph, Set<? extends Vertex> firstLayerHint, Set<? extends Vertex> lastLayerHint) { doLayout(layoutGraph, firstLayerHint, lastLayerHint, new HashSet<Link>()); }
Example #19
Source File: OldHierarchicalLayoutManager.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph layoutGraph) { doLayout(layoutGraph, new HashSet<Vertex>(), new HashSet<Vertex>()); }
Example #20
Source File: HierarchicalClusterLayoutManager.java From hottub with GNU General Public License v2.0 | 4 votes |
public void doRouting(LayoutGraph graph) { }
Example #21
Source File: HierarchicalClusterLayoutManager.java From hottub with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph graph) { doLayout(graph, new HashSet<Vertex>(), new HashSet<Vertex>(), new HashSet<Link>()); }
Example #22
Source File: OldHierarchicalLayoutManager.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph layoutGraph, Set<? extends Vertex> firstLayerHint, Set<? extends Vertex> lastLayerHint, Set<? extends Link> importantLinksHint) { if (TRACE) { System.out.println("HierarchicalPositionManager.doLayout called"); System.out.println("Vertex count = " + layoutGraph.getVertices().size() + " Link count = " + layoutGraph.getLinks().size()); } // Nothing to do => quit immediately if (layoutGraph.getVertices().size() == 0) { return; } initTiming.start(); // Mapping vertex to Node in graph nodeMap = new HashMap<Vertex, Node<NodeData, EdgeData>>(); graph = new Graph<NodeData, EdgeData>(); Set<Node<NodeData, EdgeData>> rootNodes = new HashSet<Node<NodeData, EdgeData>>(); Set<Vertex> startRootVertices = new HashSet<Vertex>(); for (Vertex v : layoutGraph.getVertices()) { if (v.isRoot()) { startRootVertices.add(v); } } rootVertexTiming.start(); Set<Vertex> rootVertices = layoutGraph.findRootVertices(startRootVertices); rootVertexTiming.stop(); for (Vertex node : layoutGraph.getVertices()) { NodeData data = new NodeData(node); Node<NodeData, EdgeData> n = graph.createNode(data, node); nodeMap.put(node, n); if (rootVertices.contains(node)) { rootNodes.add(n); } } Set<? extends Link> links = layoutGraph.getLinks(); Link[] linkArr = new Link[links.size()]; links.toArray(linkArr); List<Link> linkList = new ArrayList<Link>(); for (Link l : linkArr) { linkList.add(l); } createEdgesTiming.start(); Collections.sort(linkList, new Comparator<Link>() { public int compare(Link o1, Link o2) { int result = o1.getFrom().getVertex().compareTo(o2.getFrom().getVertex()); if (result == 0) { return o1.getTo().getVertex().compareTo(o2.getTo().getVertex()); } else { return result; } } }); for (Link edge : linkList) { EdgeData data = new EdgeData(edge); graph.createEdge(graph.getNode(edge.getFrom().getVertex()), graph.getNode(edge.getTo().getVertex()), data, data); if (importantLinksHint.size() > 0 && !importantLinksHint.contains(edge)) { data.setImportant(false); } } createEdgesTiming.stop(); initTiming.stop(); removeCyclesTiming.start(); // STEP 1: Remove cycles! removeCycles(rootNodes); if (ASSERT) {
Example #23
Source File: HierarchicalLayoutManager.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void doRouting(LayoutGraph graph) { // Do nothing for now }
Example #24
Source File: HierarchicalLayoutManager.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Override public void doRouting(LayoutGraph graph) { // Do nothing for now }
Example #25
Source File: HierarchicalLayoutManager.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Override public void doLayout(LayoutGraph graph) { doLayout(graph, new HashSet<Link>()); }
Example #26
Source File: HierarchicalClusterLayoutManager.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public void doRouting(LayoutGraph graph) { }
Example #27
Source File: HierarchicalClusterLayoutManager.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph graph, Set<? extends Link> importantLinks) { doLayout(graph); }
Example #28
Source File: HierarchicalClusterLayoutManager.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph graph) { doLayout(graph, new HashSet<Vertex>(), new HashSet<Vertex>(), new HashSet<Link>()); }
Example #29
Source File: HierarchicalClusterLayoutManager.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph graph) { doLayout(graph, new HashSet<Vertex>(), new HashSet<Vertex>(), new HashSet<Link>()); }
Example #30
Source File: OldHierarchicalLayoutManager.java From hottub with GNU General Public License v2.0 | 4 votes |
public void doLayout(LayoutGraph layoutGraph, Set<? extends Vertex> firstLayerHint, Set<? extends Vertex> lastLayerHint, Set<? extends Link> importantLinksHint) { if (TRACE) { System.out.println("HierarchicalPositionManager.doLayout called"); System.out.println("Vertex count = " + layoutGraph.getVertices().size() + " Link count = " + layoutGraph.getLinks().size()); } // Nothing to do => quit immediately if (layoutGraph.getVertices().size() == 0) { return; } initTiming.start(); // Mapping vertex to Node in graph nodeMap = new HashMap<Vertex, Node<NodeData, EdgeData>>(); graph = new Graph<NodeData, EdgeData>(); Set<Node<NodeData, EdgeData>> rootNodes = new HashSet<Node<NodeData, EdgeData>>(); Set<Vertex> startRootVertices = new HashSet<Vertex>(); for (Vertex v : layoutGraph.getVertices()) { if (v.isRoot()) { startRootVertices.add(v); } } rootVertexTiming.start(); Set<Vertex> rootVertices = layoutGraph.findRootVertices(startRootVertices); rootVertexTiming.stop(); for (Vertex node : layoutGraph.getVertices()) { NodeData data = new NodeData(node); Node<NodeData, EdgeData> n = graph.createNode(data, node); nodeMap.put(node, n); if (rootVertices.contains(node)) { rootNodes.add(n); } } Set<? extends Link> links = layoutGraph.getLinks(); Link[] linkArr = new Link[links.size()]; links.toArray(linkArr); List<Link> linkList = new ArrayList<Link>(); for (Link l : linkArr) { linkList.add(l); } createEdgesTiming.start(); Collections.sort(linkList, new Comparator<Link>() { public int compare(Link o1, Link o2) { int result = o1.getFrom().getVertex().compareTo(o2.getFrom().getVertex()); if (result == 0) { return o1.getTo().getVertex().compareTo(o2.getTo().getVertex()); } else { return result; } } }); for (Link edge : linkList) { EdgeData data = new EdgeData(edge); graph.createEdge(graph.getNode(edge.getFrom().getVertex()), graph.getNode(edge.getTo().getVertex()), data, data); if (importantLinksHint.size() > 0 && !importantLinksHint.contains(edge)) { data.setImportant(false); } } createEdgesTiming.stop(); initTiming.stop(); removeCyclesTiming.start(); // STEP 1: Remove cycles! removeCycles(rootNodes); if (ASSERT) {