# graph : Java Glossary

graph
To most people when they hear the word graph they think of a traditional x-y graph with ordinate and abscissa, but it can also refer to diagrams of nodes and edges connecting them, like a road map.

## Graphing Packages

There are packages for creating such graphs, along with bar graphs, such as:
.net Charting: C#
Askalon: (parallel processing) includes surface charts
Batik — SVG Toolkit (Scalable Vector Graphics)
GNUPLot: for scientific graphs, also 3D, written in C
ILog: Jviews, Gant Charts, maps, organisational charts etc
ImageJ: open source, image analysis, 2D/3D
JasperReports
Java2s: charting classes
JClass Chart by Quest, née Sitraka, née KL Group,
JFreeChart
JGraph (commercial)
JMSL (commercial)
JSci
Krisalis JCharts: free
Noaa SGT: Scientific Graph Toolkit includes contour map charts
Pentaho Reporting formerly JFreeReport
Ptolemy Plot
SAS/GRAPH (so expensive and complex pricing they don’t quote prices)
SmartChart
Yellowfin: commericial. Secret prices

## Nodes and Edges

However, when computer scientists use the term graph, they are usually thinking in term of nodes and their connections called edges. Trees and linked lists are a special types of graph. The edges can be unidirectional, (called directed) or bidirectional (called Hamilton). The connections can contain loops back to where you started (cyclic), or not (acyclic). They can have several pieces not connected to each other (disconnected) or may be all in one piece (connected). Many mathematical algorithms are conceptualised in terms of painting the connections between the different nodes to put them into different categories, e.g. red-black trees. Colouring a graph does not mean creating an x-y graph in many colours for a PowerPoint presentation. That should be enough to get you started researching this fascinating branch of mathematics.

## Node Graphing Packages

Check out there packages to deal with boxes connected by lines type graphs:
Eclipse GEF: Draw2D, UML diagrams
GraphViz the Dot: written in C
JGraph: for boxes connected by lines
JGraphT: for datamodels and algorithms
JHotDraw: for drawing shapes connected by lines
JUNG (Java Universal Network Graph framework)
Mica: for drawing interconnecting pipe-like drawings
OpenJGraph: boxes connected by lines
Tigris GEF

## Node Representation

The most common ways to represent graphs are by numbering the nodes and edges between them:
• Connection matrix: boolean array of size NxN, where N is number of nodes. Entry [x,y] is true if there is an edge between nodes x and y. Consumes a lot of space when N is large, but quick for checking existence of edges between given nodes. You can compress it using a BitSet.
• Edge list: a list of pairs. (i.e. Edge class with fields x and y), if (x,y) is present, there is an edge between nodes x and y. If you have unconnected nodes, you need a separate list of nodes. The most space-efficient representation for sparse connections, but slow for lookups.
• Connectivity list: for each node, you have an ArrayList of all the nodes which are directly connected to it by an edge. This is still fairly space-efficient and nearly as fast for lookups as the matrix (possibly faster when doing a traversal since you always iterate over the list of nodes connected to the current one anyway.)

## Books

recommend book⇒The Visual Display of Quantitative Information
by Edward R. Tufte 978-1-930824-13-3 paperback
birth 1942 age:73 978-0-9613921-4-7 hardcover
publisher Graphics
published 2001-05
How to display graphical information. The use of colours. Not just an artistic perspective. Based on research on what humans actually understand best.
 abe books anz abe books.co.uk amazon.cn amazon.co.uk abe books.de abe books.ca amazon.de amazon.ca amazon.es Chapters Indigo iberlibro.com abe books.com abe books.fr amazon.com amazon.fr Barnes & Noble abe books.it Google play amazon.it O’Reilly Safari junglee.com Powells Kobo other stores
Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder.