Simple Graph

Simple Graph is a graph interface for Java 6 that is designed to expose a very simple API to support working with graphs

License

License

GroupId

GroupId

gr.james
ArtifactId

ArtifactId

simple-graph
Last Version

Last Version

0.16
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

Simple Graph
Simple Graph is a graph interface for Java 6 that is designed to expose a very simple API to support working with graphs
Project URL

Project URL

https://github.com/gstamatelat/simple-graph
Source Code Management

Source Code Management

https://github.com/gstamatelat/simple-graph

Download simple-graph

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Simple Graph

Simple Graph is a graph interface for Java 6 that is designed to expose a very simple API to support working with graphs. The API includes interfaces and implementations for weighted, unweighted, directed and undirected graphs. Simple Graph does not include algorithm implementations and is meant to be used as a playground for graph-theoretic abstractions. This package can be used when Java 6 is required, for assignments, simple projects etc.

Capabilities

For simplicity, vertices are, for each graph instance, represented using integers in the range [0,V). There is no inherent edge value notion; all edges are anonymous but can have a weight assigned on weighted graph types.

Exceptions are used in a fail-fast approach when certain invocations don't make sense, for example trying to access the adjacent nodes of a vertex that doesn't exist or when an argument is null. These exceptions exist to augment the robustness of a client program and should not be catched.

All graph classes in this package implement the Serializable interface as well as the equals, hashCode and toString methods in a semantically reasonable way.

API Summary

An overview of the public API of Simple Graph is presented in the following tables:

Base Graphs

Interface Implementation Directed Weighted
Graph MutableGraph
DirectedGraph MutableDirectedGraph
WeightedGraph MutableWeightedGraph
DirectedWeightedGraph MutableDirectedWeightedGraph

Derived Graphs

Interface Implementation Base Type
BipartiteGraph MutableBipartiteGraph Graph
Tree MutableTree Graph

Getting started

You can add a dependency from your project using Maven:

<dependency>
  <groupId>gr.james</groupId>
  <artifactId>simple-graph</artifactId>
  <version>0.16</version>
</dependency>

Or using Gradle:

implementation 'gr.james:simple-graph:0.16' // Runtime
api            'gr.james:simple-graph:0.16' // Public API

For some usage examples see the files inside the demo directory.

Versions

Version
0.16
0.15
0.14
0.13
0.12
0.11
0.10
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1