# JUNG Frequently Asked Questions

## General questions

1. What is JUNG?
2. Who created JUNG?
3. I heard JUNG is open-source. What license does it use?
4. What does JUNG stand for?
5. Why was JUNG written in Java?
6. How do I use JUNG?
7. Can I contribute to the Jung Project?

## Technical questions

8. What specific algorithms does JUNG provide?
9. Does JUNG support dynamic graphs?
10. Is there a limit to the size of graphs JUNG can handle?
11. What kind of data types does JUNG support (e.g. labels, weights,etc.)?
12. Is JUNG specific to Swing? Can I use JUNG with SWT, or other windowing toolkits?
13. What version of Java does JUNG use? What third-party libraries does JUNG use?
14. Why did you create JUNG? How does it differ from existing tools?
15. How is JUNG different from...?
16. Does JUNG support bipartite graphs? How can I use them?

1. ## What is JUNG?

   JUNG is a Java-based open-source software library designed to support the modeling, analysis, and visualization of data that can be represented as graphs. Its focus is on mathematical and algorithmic graph applications pertaining to the fields of social network analysis, information visualization, knowledge discovery and data mining. However, it is not specific to these fields and can be used for many other applications pertaining to graphs and networks.

2. ## Who created JUNG?

   JUNG was created by three Information and Computer Science PhD students at the University of California, Irvine: Scott White, Danyel Fisher, and Joshua O'Madadhain.

3. ## I heard JUNG is open-source. What license does it use?

   JUNG is licensed and made freely available under the Berkeley Software Distribution (BSD) license.

4. ## What does JUNG stand for?

   JUNG stands for the Java Universal Network/Graph Framework. If you find various references in the code such as ArchetypeGraph you can be sure that we did not forget about our dear friend Carl. :) (JUNG is not, however, associated with any of the various graph theorists named Jung, such as Heinz Jung or Hwan-Ok Jung.)

5. ## Why was JUNG written in Java?

   Java is a language that arguably has the most to offer people who want to analyze and visualize complex networks. It provides strong support for object-oriented design, excellent developer tools for writing code, and an extensive API for such tasks as database connectivity, writing GUIs and layout algorithms, and web support. In addition, it is a widely adopted programming language, so there are many third-party packages that can be leveraged for statistical analysis, data structures, visualization, etc.

6. ## How do I use JUNG?

   JUNG is a software library, so you write Java programs that call our routines. Programs that use JUNG can be simple (snippets of code to test out algorithms or ideas) or sophisticated (applications with GUIs).

7. ## Can I contribute to the Jung Project?

   Absolutely; we welcome contributions! If you have some specific code you'd like to contribute, please send a package containing your code, documentation, and unit tests, to the mailing list jung-support@lists.sourceforge.net. (You can find examples of unit tests in our distribution, in the directory jung.src.test.) Once we feel comfortable that your contributions are consistently of good quality, we may invite you to become an official developer. We also have specific capabilities that we'd like to add to JUNG, so if you'd like to help us create them, please submit a resume (or paragraph) describing your background and a proposal of what area of the code you'd like to work on to the mailing list. Current areas where we could use help are: social network algorithms, 2D graph drawing algorithms, general graph theory algorithms, and general statistical routines for network analysis.

8. ## What specific algorithms does JUNG provide?

   JUNG provides a number of algorithms. Since new algorithms are constantly being added it's best to look at the Javadoc documentation. General algorithms are listed under the jung.algorithms package.

9. ## Does JUNG support dynamic graphs?

   Yes, JUNG supports dynamic graphs that can be changed both through a system of filters or by explicitly adding and removing nodes. Either way, it's easy to visualize the results, to apply graph algorithms to the results, and to manipulate those results further.

10. ## Is there a limit to the size of graphs JUNG can handle?

    No. The only limit to the size graphs JUNG can support is the hardware you are using to run the Java Virtual Machine. We have on many occasions used JUNG to analyze sparse graphs with more than 10,000 nodes.

11. ## What kind of data can JUNG attach to graph elements (e.g. labels, weights, ...)?

    One of JUNG's key strengths is that it can annotate graphs, vertices (entities), or edges (relations) with any Java data type.

12. ## Is JUNG specific to Swing? Can I use JUNG with SWT, or other windowing toolkits?

    The renderers that are currently available in the JUNG distribution use the Java Swing tools. However, the renderer (the piece of the library that draws things on the screen) is decoupled from the layout algorithm (the piece of the library that determines where things get drawn), so you can use other renderers if you like.

13. ## What version of Java does JUNG use? What third-party libraries does JUNG use?

    JUNG depends on the advanced functionality of the JDK version 1.4. As of release 1.0, uses the following libraries:

    - Apache Jakarta Commons Collections
    - Cern Colt scientific library
    - Xerces
    - JUnit (optional, needed for automated testing)

14. ## Why did you create JUNG? How does it differ from existing tools?

    We created JUNG because we perceived a need for a general, flexible, and powerful API for manipulating, analyzing, and visualizing graphs and networks in Java. However, there are other tools available for manipulating networks, which may be more appropriate for you, depending on your specific needs and abilities.

    The following is a very brief summary of our understanding of the major distinctions between JUNG and a few of the more popular tools for network analysis and visualization. It is not intended to be a complete characterization of any of these tools; see the resources provided by the tool's developers for details. (If you believe that we have misrepresented the capabilities of one of these tools, please contact us and we will edit this text accordingly.)

15. ## How is JUNG different from...

    1. ### ... UCINET?

       UCINET is a widely-used application among social networks researchers for performing standard social network analysis techniques to graphs.
       However, UCINET cannot be embedded into applications: you can't call UCINET in an end-user display.
       JUNG provides facilities to dynamically change graphs, to programatically call code, and to output the results as the program continues.

    2. ### ... PAJEK?

       PAJEK is a stand-alone tool for visualizing and analyzing networks. JUNG provides many algorithms that PAJEK does not (and, currently vice versa), and--as noted for UCINET--is easily incorporated into network applications.
       JUNG is capable of both reading and writing simple PAJEK-format files. (JUNG's PAJEK file reader does not currently support the entire PAJEK file format.)

    3. ### ... R? http://www.r-project.org

       R is a programming language geared primarily towards the statistics community. As such, it provides many advanced statistical routines. However, its community base is small, and it doesn't have access to the type of extensive API that Java does (e.g. database connectivity, Web support), therefore it is difficult to build real-world applications on top of R.
       Furthermore, R, unlike JUNG, does not provide native sparse graph data structures which are necessary to write efficient algorithms on real-world data sets.

    4. ### ... GFC? http://www.alphaworks.ibm.com/tech/gfc

       GFC is a graph drawing-oriented package released by IBM. It is specific to using Java's AWT/Swing, and contains few graph manipulation algorithms.

    JUNG is open-source, free, and has a wide variety of algorithms available. Better, it's easily extensible through a widely-documented API: if it's not there yet, you can add it yourself.

16. ## Does JUNG support bipartite graphs? How can I use them?

Funny you should ask...

### On Hypergraphs and Affiliation Networks

In this brief discussion, I will point out that hypergraphs and affiliation networks can be represented as bipartite graphs, and will discuss how these are all mutually implemented in JUNG.

The JUNG bipartite graph divides the world into two classes of vertices: type "A" and type "B". All these vertices maintain the constraint that "A" vertices may only point to "B" type vertices, and so on.

This structure, then, can easily represent an affiliation network: let the "A"s be the events, and the "B"s be the people. This is explained in Wasserman & Faust (8.3), but generally means that one can view the graph as a series of connections between the events and the people.

JUNG is beginning to support an increasing number of bipartite operations; the simplest include "folding" the bipartite graph (referred to as generating the "co-membership" diagram in W&F, it is equivalent to the matrix product of the event-by-event matrix by its transpose). A graph "folded" on B has an edge for each pair of A's that co-participated in a B, and vice-versa. Each edge is annotated by every B that contributed to that connection.

Thus, if A1 and A2 both attended BX and BY, the edge from A1 to A2 would be labelled with both BX and BY in its user data. (The UserData flag to check is stored in BipartiteGraph).

Another use of BipartiteGraphs is to consider them as Hypergraphs. A Hyperedge joins zero or more vertices; the set of hyperedges and vertices forms the graph.

Again, the BipartieGraph supports this. If category "A" is considered as "hyperedges", and category "B" is considered as "vertices", then a BipartiteEdge from a vertex VA in A to a vertex VB in B is equivalent to saying that VB is a member of the hyperedge VA.

In this manner, JUNG supports (as of the Halloween release) hyperedges and hypergraphs.