Class ArcLabelledImmutableGraph

All Implemented Interfaces:
Direct Known Subclasses:
ArcLabelledImmutableSequentialGraph, ArcRelabelledImmutableGraph, BitStreamArcLabelledImmutableGraph, UnionArcLabelledImmutableGraph

public abstract class ArcLabelledImmutableGraph extends ImmutableGraph
An abstract implementation of a graph labelled on its arcs.

The main purpose of this class is that of override covariantly the return type of nodeIterator() and nodeIterator(long) so that it is an ArcLabelledNodeIterator, and the return type of all static load methods and of copy() so that it is an ArcLabelledImmutableGraph (the methods themselves just delegate to the corresponding method in ImmutableGraph).

The only additional instance methods are labelBigArray(long) and prototype().

Saving labels

A subclass of this class may implement

  • store(ArcLabelledImmutableGraph, CharSequence, CharSequence, ProgressLogger);
  • store(ArcLabelledImmutableGraph, CharSequence, CharSequence).

These methods must save the labels of the given arc-labelled graph using the first given character sequence as a basename, and a suitable property file using the second given basename. Note that the graph will not be saved—use the store() method of an ImmutableGraph implementation for that purpose.

For istance, assuming g is an arc-labelled graph the idiomatic way of storing it on disk using BVGraph for the underlying graph and BitStreamArcLabelledImmutableGraph for the labels is, "foo");, "bar", "foo");

Underlying graphs

Often, implementations of this class will just wrap an underlying graph (i.e., an instance of ImmutableGraph). In that case, we suggest that if the implementation uses property files the basename of the underlying graph is specified using the property key UNDERLYINGGRAPH_PROPERTY_KEY. If the basename must be generated starting from the arc-labelled graph basename, we suggest to just add at the end the string UNDERLYINGGRAPH_SUFFIX.