public class StaticFrontier2 extends Object implements IStaticFrontier
Note: This implementation has package private methods that permit certain kinds of mutation.
| Constructor and Description | 
|---|
| StaticFrontier2() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | copyIntoResetFrontier(int off,
                     IArraySlice<org.openrdf.model.Value> slice)Copy a slice into the backing array. | 
| boolean | isCompact()Return  trueiff the frontier is known to be compact (no
 duplicate vertices). | 
| boolean | isEmpty()Return  trueif the frontier is known to be empty. | 
| Iterator<org.openrdf.model.Value> | iterator() | 
| void | resetAndEnsureCapacity(int minCapacity)Grow the backing array iff necessary. | 
| void | resetFrontier(int minCapacity,
             boolean sort,
             Iterator<org.openrdf.model.Value> itr)Reset the frontier from the supplied vertices. | 
| void | setCompact(boolean newValue) | 
| int | size()The number of vertices in the frontier. | 
| String | toString() | 
public boolean isCompact()
IStaticFrontiertrue iff the frontier is known to be compact (no
 duplicate vertices).
 
 Note: If the frontier is not compact, then the IGASEngine may
 optionally elect to eliminate duplicate work when it schedules the
 vertices in the frontier.
 
 Note: A non-compact frontier can arise when the IGASScheduler
 chooses a per-thread approach and then copies the per-thread segments
 onto the shared backing array in parallel. This can reduce the time
 between rounds, which can speed up the overall execution of the algorithm
 significantly.
isCompact in interface IStaticFrontierpublic void setCompact(boolean newValue)
public int size()
IStaticFrontiersize in interface IStaticFrontierpublic boolean isEmpty()
IStaticFrontiertrue if the frontier is known to be empty.isEmpty in interface IStaticFrontierpublic Iterator<org.openrdf.model.Value> iterator()
public void resetAndEnsureCapacity(int minCapacity)
null are cleared. This is
 done to faciltiate GC by clearing references that would otherwise remain
 if/when the frontier contracted.minCapacity - The required minimum capacity.public void copyIntoResetFrontier(int off,
                         IArraySlice<org.openrdf.model.Value> slice)
off - The offset at which to copy the slice.slice - The slice.public void resetFrontier(int minCapacity,
                 boolean sort,
                 Iterator<org.openrdf.model.Value> itr)
IStaticFrontierresetFrontier in interface IStaticFrontierminCapacity - The minimum capacity of the new frontier. (A minimum capacity
            is specified since many techniques to compact the frontier can
            only estimate the required capacity.)itr - The vertices in the new frontier.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.