org.neo4j.graphalgo.impl.util
Class BestFirstSelectorFactory<P extends Comparable<P>,D>

java.lang.Object
  extended by org.neo4j.graphalgo.impl.util.BestFirstSelectorFactory<P,D>
All Implemented Interfaces:
BranchOrderingPolicy

public abstract class BestFirstSelectorFactory<P extends Comparable<P>,D>
extends Object
implements BranchOrderingPolicy


Nested Class Summary
 class BestFirstSelectorFactory.BestFirstSelector
           
 
Field Summary
static org.neo4j.graphalgo.impl.util.PriorityMap.Converter<Node,TraversalBranch> CONVERTER
           
 
Constructor Summary
BestFirstSelectorFactory()
           
 
Method Summary
protected abstract  P addPriority(TraversalBranch source, P currentAggregatedValue, D value)
           
protected abstract  D calculateValue(TraversalBranch next)
           
 BranchSelector create(TraversalBranch startSource)
          Instantiates a BranchSelector with startBranch as the first branch to base a decision on "where to go next".
protected abstract  P getStartData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONVERTER

public static final org.neo4j.graphalgo.impl.util.PriorityMap.Converter<Node,TraversalBranch> CONVERTER
Constructor Detail

BestFirstSelectorFactory

public BestFirstSelectorFactory()
Method Detail

create

public BranchSelector create(TraversalBranch startSource)
Description copied from interface: BranchOrderingPolicy
Instantiates a BranchSelector with startBranch as the first branch to base a decision on "where to go next".

Specified by:
create in interface BranchOrderingPolicy
Parameters:
startSource - the TraversalBranch to start from.
Returns:
a new BranchSelector used to decide "where to go next" in the traversal.

getStartData

protected abstract P getStartData()

addPriority

protected abstract P addPriority(TraversalBranch source,
                                 P currentAggregatedValue,
                                 D value)

calculateValue

protected abstract D calculateValue(TraversalBranch next)


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.