galois.objects.graph
Class LocalComputationGraph.ObjectGraphBuilder

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

public static class LocalComputationGraph.ObjectGraphBuilder
extends Object

A LocalComputationGraph builder, providing combinations of several features.


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

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

Method Detail

serial

public LocalComputationGraph.ObjectGraphBuilder 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 LocalComputationGraph.ObjectGraphBuilder from(ObjectGraph 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,E> ObjectGraph<N,E> 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
E - the type of the object stored in each edge
Returns:
an object graph with the requested features