galois.objects.graph
Class LocalComputationGraph.LongGraphBuilder

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

public static class LocalComputationGraph.LongGraphBuilder
extends Object

A LocalComputationGraph builder, providing combinations of several features.


Constructor Summary
LocalComputationGraph.LongGraphBuilder()
          Constructs a new builder instance assuming that the graph about to be created is parallel.
 
Method Summary
<N extends GObject>
LongGraph<N>
create()
          Builds the final graph.
<N extends GObject>
LocalComputationGraph.LongGraphBuilder
from(LongGraph<N> in)
          Indicate the graph used as the initial value for the local computation instance about to be created.
 LocalComputationGraph.LongGraphBuilder 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.LongGraphBuilder

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

Method Detail

serial

public LocalComputationGraph.LongGraphBuilder 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.LongGraphBuilder from(LongGraph<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> LongGraph<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:
a long graph with the requested features