VS
 The generic type for the pervertex state. This is scoped to the
computation of the IGASProgram
.ES
 The generic type for the peredge state. This is scoped to the
computation of the IGASProgram
.ST
 The generic type for the SUM. This is often directly related to
the generic type for the peredge state, but that is not always
true. The SUM type is scoped to the GATHER + SUM operation (NOT
the computation).
TODO Add option to order the vertices to provide a serializable
execution plan (like GraphChi). I believe that this reduces to
computing a DAG over the frontier before executing the GATHER and
then executing the frontier such that the parallel execution is
constrained by arcs in the DAG that do not have mutual
dependencies. This would have to place a partial ordering over the
vertices in the frontier and then process the frontier with
limited parallelism based on that partial ordering.public interface IGASContext<VS,ES,ST> extends Callable<IGASStats>
IGASProgram
. This is distinct from the
IGASEngine
so we can support distributed evaluation and concurrent
evaluation of multiple IGASProgram
s.Modifier and Type  Method and Description 

IGASStats 
call()
Execute the associated
IGASProgram . 
boolean 
doRound(IGASStats stats)
Execute one iteration.

IGASProgram<VS,ES,ST> 
getGASProgram()
Return the program that is being evaluated.

IGASState<VS,ES,ST> 
getGASState()
The computation state.

IGraphAccessor 
getGraphAccessor()
The graph access object.

org.openrdf.model.URI 
getLinkAttributeType()
Return non
null iff there is a single link attribute type to
be visited. 
org.openrdf.model.URI 
getLinkType()
Return non
null iff there is a single link type to be
visited. 
int 
getMaxIterations()
Return the maximum number iterations for the algorithm.

int 
getMaxIterationsAfterTargets()
Return the maximum number iterations for the algorithm to continue
once all the target vertices have been reached.

int 
getMaxVisited()
Return the maximum number of vertices that may be visited.

<T> IReducer<VS,ES,ST,T> 
getRunAfterOp()
Return an optional
IReducer that will run after the
IGASProgram is terminated. 
Set<org.openrdf.model.Value> 
getTargetVertices()
Get the target vertices for the program (if any).

TraversalDirectionEnum 
getTraversalDirection()
Return a type safe value indicating the traversal direction for the
IGASProgram . 
void 
setLinkAttributeType(org.openrdf.model.URI linkType)
Imposes an optional restriction on which link attributes are considered
by the algorithm.

void 
setLinkType(org.openrdf.model.URI linkType)
Set an optional restriction on the type of the visited links.

void 
setMaxIterations(int newValue)
Specify the maximum number of iterations for the algorithm.

void 
setMaxIterationsAfterTargets(int newValue)
Specify the maximum number of iterations for the algorithm to continue
once all the target vertices have been reached.

void 
setMaxVisited(int newValue)
Specify the maximum number of vertices that may be visited.

<T> void 
setRunAfterOp(IReducer<VS,ES,ST,T> afterOp)
Set an optional
IReducer that will run after the
IGASProgram is terminated. 
void 
setTargetVertices(org.openrdf.model.Value[] targetVertices)
Set the target vertices for the program (if any).

void 
setTraversalDirection(TraversalDirectionEnum newVal)
Specify the traversal direction for the
IGASProgram . 
IGASProgram<VS,ES,ST> getGASProgram()
IGraphAccessor getGraphAccessor()
void setTraversalDirection(TraversalDirectionEnum newVal)
IGASProgram
.
The value specified here is used to determine how the EdgesEnum
will be interpreted for the GATHER and SCATTER phases. The default is
TraversalDirectionEnum.Forward
.
TraversalDirectionEnum getTraversalDirection()
IGASProgram
.void setMaxIterations(int newValue)
newValue
 The maximum number of iterations.IllegalArgumentException
 if the new value is nonpositive.int getMaxIterations()
void setMaxVisited(int newValue)
newValue
 The maximum number of vertices in the frontier.IllegalArgumentException
 if the new value is nonpositive.int getMaxVisited()
org.openrdf.model.URI getLinkType()
null
iff there is a single link type to be
visited. This corresponds to a view of the graph as sparse connectivity
matrix. The IGASEngine
can optimize traversal patterns using the
POS
index.
Note: When this option is used, the scatter and gather will not visit the property set for the vertex. Instead, the graph is treated as if it were an unattributed graph and only mined for the connectivity data.
Value
for the predicate that identifies the desired
link type (there can be many types of links  the return value
specifies which attribute is of interest).void setLinkType(org.openrdf.model.URI linkType)
Note: When this option is used, the scatter and gather will not visit the property set for the vertex. Instead, the graph is treated as if it were an unattributed graph and only mined for the connectivity data (which may include a link weight).
linkType
 The link type to visit (optional). When null
, all
link types are visited.org.openrdf.model.URI getLinkAttributeType()
null
iff there is a single link attribute type to
be visited. This imposes a restriction on which link attributes are
considered by the algorithm. The link attribute type restriction may be
(and often is) paired with a link type restriction.Value
for the predicate that identifies the desired
link attribute type.setLinkType(URI)
void setLinkAttributeType(org.openrdf.model.URI linkType)
linkAttributeType
 The link attribute type to visit (optional). When
null
, the link attributes for the visited links
are NOT visited (the topology of the graph is visited, but not
the attributes for the edges).<T> void setRunAfterOp(IReducer<VS,ES,ST,T> afterOp)
IReducer
that will run after the
IGASProgram
is terminated. This may be used to extract results
from the visited vertices.afterOp
 The IReducer
.<T> IReducer<VS,ES,ST,T> getRunAfterOp()
IReducer
that will run after the
IGASProgram
is terminated. This may be used to extract results
from the visited vertices.boolean doRound(IGASStats stats) throws Exception, ExecutionException, InterruptedException
stats
 Used to report statistics about the execution of the
algorithm.Exception
ExecutionException
InterruptedException
IGASStats call() throws Exception
IGASProgram
.void setTargetVertices(org.openrdf.model.Value[] targetVertices)
Set<org.openrdf.model.Value> getTargetVertices()
void setMaxIterationsAfterTargets(int newValue)
newValue
 The maximum number of iterations past the target vertices.int getMaxIterationsAfterTargets()
Copyright © 2006–2016 SYSTAP, LLC DBA Blazegraph. All rights reserved.