This document provides an example-driven, comprehensive coverage of the functionality of Graph for Scala. In each chapter examples are listed first. You may then read the consecutive explanations or skip them and go directly to the next chapter.
References to specific Graph
classes in this document may be looked
up in the Scaladoc API reference. This guide is not meant to be complete.
For the sake of simplicity, most examples are based on graphs spanned
over nodes of the type Int
.
Graph
customization is shown by the node type Airport
and the edge type Flight
.
The most important reasons why Graph for Scala speeds up your development are:
Graph
is intuitive.Graph
has the same "look and feel" as other members of the Scala collection
framework. Whenever appropriate, result types are Scala collection
types themselves.Graph
.
Look and see!
Throughout the library we use the terms node as a synonym to vertex and edge as a generic term for hyperedge, line (undirected edge) or arc (directed edge).
Among others, Graph
creation, editing, functional traversal,
path operations, degree calculation and cycle detection have been completed.
More functionality is due to be added. You are invited to request enhancements
based on your problem domain.
Option
.
The Graph for Scala library consists of the Core and further optional modules. Each module comes with its separate User Guide and is built as a separate Jar.