Package org.neo4j.gds.paths.delta
Interface TentativeDistances
-
- All Known Implementing Classes:
TentativeDistances.DistanceAndPredecessor,TentativeDistances.DistanceOnly
public interface TentativeDistances
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTentativeDistances.DistanceAndPredecessorstatic classTentativeDistances.DistanceOnly
-
Field Summary
Fields Modifier and Type Field Description static doubleDIST_INFstatic longNO_PREDECESSOR
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description doublecompareAndExchange(long nodeId, double expectedDistance, double newDistance, long predecessor)Atomically updates the distance and the predecessor for the given node.doubledistance(long nodeId)Returns the distance for the given node orDouble.MAX_VALUEif not set.static TentativeDistances.DistanceAndPredecessordistanceAndPredecessors(long size, int concurrency)static TentativeDistances.DistanceOnlydistanceOnly(long size, int concurrency)org.neo4j.gds.core.utils.paged.HugeAtomicDoubleArraydistances()longpredecessor(long nodeId)Returns the predecessor for the given node orLong.MAX_VALUEif not set.java.util.Optional<org.neo4j.gds.core.utils.paged.HugeAtomicLongArray>predecessors()voidset(long nodeId, long predecessor, double distance)Sets the distance and the predecessor for the given node.
-
-
-
Field Detail
-
DIST_INF
static final double DIST_INF
- See Also:
- Constant Field Values
-
NO_PREDECESSOR
static final long NO_PREDECESSOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
distance
double distance(long nodeId)
Returns the distance for the given node orDouble.MAX_VALUEif not set.
-
predecessor
long predecessor(long nodeId)
Returns the predecessor for the given node orLong.MAX_VALUEif not set.
-
set
void set(long nodeId, long predecessor, double distance)Sets the distance and the predecessor for the given node.
-
compareAndExchange
double compareAndExchange(long nodeId, double expectedDistance, double newDistance, long predecessor)Atomically updates the distance and the predecessor for the given node. The method returns the witness value, which is the value we saw when attempting a store operation. If the witness value is the expected distance, the update for both, distance and predecessor, was successful.
-
distances
org.neo4j.gds.core.utils.paged.HugeAtomicDoubleArray distances()
-
predecessors
java.util.Optional<org.neo4j.gds.core.utils.paged.HugeAtomicLongArray> predecessors()
-
distanceOnly
static TentativeDistances.DistanceOnly distanceOnly(long size, int concurrency)
-
distanceAndPredecessors
static TentativeDistances.DistanceAndPredecessor distanceAndPredecessors(long size, int concurrency)
-
-