jung

How to prevent vertex from overlapping?

I use Jung to draw graphs. Below is a simple graph with tree layout that looks fine. All renderers and transformers are default. Now, I have changed the default size of the nodes to 100px by setting a custom VertexShapeTransformer. The problem is that the nodes started to overlap. Here you can see how it looks: Is it possible to g...

JUNG - How to get the exact vertex in Graph?

I have to create a graph with its self-defined node type and the nodes & connections are read from a txt file one by one. The file format is like this: startNode attibutes endNode. Every time I read one line, I created 2 node objects: startNode & endNode. and add edge between them.. However, the startNode may exist in several lines.. ...

how to use JUNG to color & shape vertices and edges

I am facing a problem in using JUNG. I want to draw a network diagram where the vertices will be having different shapes and colors and edges will be dashed or full line in different colors. Since I am a newbie in Java, I am unable to understand the actual architecture of jung. When I use setVertexFillPaintTransformer, it colors all the...

JUNG: how to shape pickable vertices

Hello everyone... I am using JUNG to make a network diagram. I want to shape the vertices depending upon its type. The vertices are pickable and colored. The code for vertices so far is as under: class VertexColors extends PickableVertexPaintTransformer<Number> { VertexColors(PickedInfo<Number> pi) { super(pi, Color.blue, Co...

Cand Jung graphics apear in the same place every time?

Hello, I'm using JUNG ( http://jung.sourceforge.net/index.html ) to draw graphics in java. The software is great but I have a small question. How can I be sure that the displayed graph is each time the same (no changes is architecture or position)? To be more specific: the graph model (data to be represented) doesn't change but its rep...

Importing GraphML files in JUNG

I am new to JUNG, can any one show me how to import a GraphML to JUNG. ...

Displaying 3D graphs using JUNG

I am new to JUNG, I can display graphs in 2D but can anyone show me how to show 3d graphs. ...

JUNG cannot display large graphs ?

I am using JUNG for a project and when I am displaying relatively large graphs eg 1500 nodes, my pc would not be able to handle it (graphs are rendered but If I want to navigate the graph the system become very slow). Any Suggestions. ...

pagerank implementation in java

I am looking for a java implementation of the pagerank algorithm. ...

Creating an adjacency Matrix from a JUNG Graph.

Graph < Integer, Integer> g = new SparseMultigraph<Integer, Integer>(); g.addVertex(1);g.addVertex(2);g.addVertex(3); g.addEdge(0,1,2 ,EdgeType.DIRECTED);g.addEdge(1,2,3 ,EdgeType.DIRECTED);g.addEdge(2,3,1 ,EdgeType.DIRECTED);g.addEdge(3,1,3 ,EdgeType.DIRECTED); How can I convert this graph into an adjacency matrix taking into ...

how can i draw a tree hierarchy using JUNG?

I'm new to JUNG. I tried to draw a graph of a tree using the TreeLayout but the tree never comes out like a real tree. Every time the tree looks different. How can I make the tree look like a normal tree with the root on top & the rest of the nodes descending from it? ...

How do i use GraphMLReader2 in Jung?

I want to use class GraphMLReader to read a Undirected Graph from graphML with JUNG2.0. The code is as follow: import edu.uci.ics.jung.io.*; import edu.uci.ics.jung.io.graphml.*; import java.io.*; import java.util.*; import org.apache.commons.collections15.Transformer; import edu.uci.ics.jung.graph.*; class Vertex{ int id; ...

Improve the rendering of a JUNG graph .

i am using jung to visually display large data sets, (1000s of nodes) but the system becomes very laggy when I zoom in or out, or move a node. Is there anyway to improve the rendering of graphs in JUNG ? ...

Code jumps out of a jar and runs? What is causing this?

I am trying to get a sample program working with JUNG, a graphing tool in Java. I downloaded and referenced all the .jar files in eclipse so my project hierarchy looks like this: In Test.java I have the following code: public class Test { static public void main() { System.out.print("Hello"); }} For some reason though when I tr...

Performance of shortest path algorithm in JUNG API

I use the JUNG API to calculate shortest paths between several nodes in medium large graphs (20 to 100 nodes). Right now I'm iterating over my nodes and use the simple 'ShortetsPath' function to calculate the shortest path for two nodes. All the shortest paths are put in an ArrayList. UnweightedShortestPath<Vertex, SEdge> dist = new Unw...

Extracting a subgraph from a graph using JUNG?

I have a large graph that I am processing using JUNG. I was wondering if there JUNG provides a way to extract say a 2-hop neighborhood of a vertex (complete with all edges amongst themselves) into a separate graph? ...

Vertex label in JUNG graph visualization

I wrote a little graph visualizer class: public void simpleGraph(SparseMultigraph<Vertex,SEdge> graph, String name) { Layout<Vertex, SEdge> layout = new ISOMLayout(graph); layout.setSize(new Dimension(800,800)); BasicVisualizationServer<Vertex, SEdge> vv = new BasicVisualizationServer<Vertex, SEdge>(layout); vv.setP...

apply graph analysis on networked data represented with RDF

I want to run some analysis on networked data having multiple modes(i.e. multiple types of network nodes) and multiplex relations(i.e. multiples types of network edges). The analysis is probably about SNA or applying any algorithm from graph theory, e.g. tie strength, centrality, betweenness, node distance, block, cluster, etc. The sou...

Can the Jung2 graph library traverse a digraph

Does anyone know if the Java Jung2 graph library provides the in-built capability to traverse a Digraph given a start Vector? I did see that there's a BFSDistanceLabeler class that returns a map of distances, which could do, but I then need to sort the values (highest distance first) and iterate through the sorted set. I'm creating a de...

Calculating pageranks for a sparse directed graph with high percentage of deadlinks

Hi, I am a graduate student in computer science at Indiana University, Bloomington. For one of my research projects, i am working on calculating pageranks for a directed graph which is very sparse and has a high percentage of deadlinks. By deadlinks I mean nodes that have outdegree zero. Sometimes, in a graph with a lot of deadlinks, ...