Class Neo4jDistanceWithMetrics
java.lang.Object
org.evomaster.client.java.controller.internal.db.neo4j.Neo4jDistanceWithMetrics
Result of scoring one captured Cypher query against the live graph: the distance to satisfying the
query, how many graph nodes were considered, and whether the evaluation failed.
The distance is 1 - ofTrue of the Truthness computed by the heuristics calculator, so a
computed value lies in [0,1] by construction, with 0 meaning the query is satisfied. A failed
evaluation carries Neo4jHeuristicsCalculator.MAX_NEO4J_DISTANCE.
-
Constructor Summary
ConstructorsConstructorDescriptionNeo4jDistanceWithMetrics(double distance, int numberOfEvaluatedNodes, boolean evaluationFailure) Creates a Neo4j heuristic result. -
Method Summary
Modifier and TypeMethodDescriptiondoubleintboolean
-
Constructor Details
-
Neo4jDistanceWithMetrics
public Neo4jDistanceWithMetrics(double distance, int numberOfEvaluatedNodes, boolean evaluationFailure) Creates a Neo4j heuristic result.- Parameters:
distance- distance to satisfying the query, 0 meaning satisfiednumberOfEvaluatedNodes- number of graph nodes consideredevaluationFailure- whether the evaluation failed, in which case the distance must beNeo4jHeuristicsCalculator.MAX_NEO4J_DISTANCE
-
-
Method Details
-
getDistance
public double getDistance()- Returns:
- distance to satisfying the query, 0 meaning satisfied,
Neo4jHeuristicsCalculator.MAX_NEO4J_DISTANCEon failure
-
getNumberOfEvaluatedNodes
public int getNumberOfEvaluatedNodes()- Returns:
- number of graph nodes considered
-
isEvaluationFailure
public boolean isEvaluationFailure()- Returns:
- whether the evaluation failed
-