galois.objects.graph
Class LocalComputationGraph.IntGraphBuilder

java.lang.Object
  extended by galois.objects.graph.LocalComputationGraph.IntGraphBuilder
Enclosing class:
LocalComputationGraph<N extends GObject,E>

public static class LocalComputationGraph.IntGraphBuilder
extends Object

A LocalComputationGraph builder, providing combinations of several features.


Constructor Summary
LocalComputationGraph.IntGraphBuilder()
          Constructs a new builder instance assuming that the graph about to be created is parallel.
 
Method Summary
<N extends GObject>
IntGraph<N>
create()
          Builds the final graph.
<N extends GObject>
LocalComputationGraph.IntGraphBuilder
from(IntGraph<N> in)
          Indicate the graph used as the initial value for the local computation instance about to be created.
 LocalComputationGraph.IntGraphBuilder serial(boolean serial)
          Indicates whether the implementation of the graph about to be created is serial (there is no concurrency or transactional support) or parallel (can be safely used within Galois iterators).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalComputationGraph.IntGraphBuilder

public LocalComputationGraph.IntGraphBuilder()
Constructs a new builder instance assuming that the graph about to be created is parallel.

Method Detail

serial

public LocalComputationGraph.IntGraphBuilder serial(boolean serial)
Indicates whether the implementation of the graph about to be created is serial (there is no concurrency or transactional support) or parallel (can be safely used within Galois iterators). For example, a graph that is purely thread local can benefit from using a serial implementation, which is expected to add no overheads due to concurrency or the runtime system.

Parameters:
serial - boolean value that indicates whether the graph is serial or not.

from

public <N extends GObject> LocalComputationGraph.IntGraphBuilder from(IntGraph<N> in)
Indicate the graph used as the initial value for the local computation instance about to be created.

Parameters:
in - initial value for the graph

create

public <N extends GObject> IntGraph<N> create()
Builds the final graph. This method does not alter the state of this builder instance, so it can be invoked again to create multiple independent graphs.

Type Parameters:
N - the type of the object stored in each node
Returns:
an integer graph with the requested features