de.grogra.xl.impl.base
Class Neighbors<N>

java.lang.Object
  extended by de.grogra.xl.impl.base.Neighbors<N>
Type Parameters:
N - node type
All Implemented Interfaces:
Operator<N>, ObjectToObjectGenerator<N,NodeEdgePair<N>>

public class Neighbors<N>
extends java.lang.Object
implements Operator<N>

Author:
Ole Kniemeyer

Field Summary
protected  int add
           
protected  int addOrCopy
           
protected  int addWhenMatching
           
protected  int copy
           
protected  int mask
           
protected  RuntimeModel model
           
protected  boolean outgoing
           
 
Fields inherited from interface de.grogra.xl.impl.base.Operator
ONLY_CT_EDGES_MATCH
 
Constructor Summary
Neighbors(RuntimeModel model, int mask, int copy, int add, int addWhenMatching, boolean outgoing)
           
 
Method Summary
 void evaluate(ObjectConsumer<? super NodeEdgePair<N>> cons, NodeEdgePair<N> p)
           
 void evaluateObject(ObjectConsumer<? super NodeEdgePair<N>> cons, N x)
          Generates the sequence of values for parameter x.
 int getUnilateralEdgeBits(N node, NodeEdgePair<N> opResult)
           
 int match(N node, Operator<N> op, NodeEdgePair<N> opResult)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

add

protected final int add

addOrCopy

protected final int addOrCopy

addWhenMatching

protected final int addWhenMatching

copy

protected final int copy

mask

protected final int mask

model

protected final RuntimeModel model

outgoing

protected final boolean outgoing
Constructor Detail

Neighbors

public Neighbors(RuntimeModel model,
                 int mask,
                 int copy,
                 int add,
                 int addWhenMatching,
                 boolean outgoing)
Method Detail

evaluate

public void evaluate(ObjectConsumer<? super NodeEdgePair<N>> cons,
                     NodeEdgePair<N> p)
Specified by:
evaluate in interface Operator<N>

evaluateObject

public void evaluateObject(ObjectConsumer<? super NodeEdgePair<N>> cons,
                           N x)
Description copied from interface: ObjectToObjectGenerator
Generates the sequence of values for parameter x.

Specified by:
evaluateObject in interface ObjectToObjectGenerator<N,NodeEdgePair<N>>
Parameters:
cons - each value is yielded to this consumer
x - where the generator function is to be evaluated

getUnilateralEdgeBits

public int getUnilateralEdgeBits(N node,
                                 NodeEdgePair<N> opResult)
Specified by:
getUnilateralEdgeBits in interface Operator<N>

match

public int match(N node,
                 Operator<N> op,
                 NodeEdgePair<N> opResult)
Specified by:
match in interface Operator<N>