Class: Neo4j::Algo::EstimateEvaluator

Inherits:
Object
  • Object
show all
Defined in:
lib/neo4j/algo.rb

Overview

:nodoc

Instance Method Summary (collapse)

Constructor Details

- (EstimateEvaluator) initialize(&evaluator)

A new instance of EstimateEvaluator



25
26
27
# File 'lib/neo4j/algo.rb', line 25

def initialize(&evaluator)
  @evaluator = evaluator
end

Instance Method Details

- (Object) get_cost(node, goal)

Implements T getCost(Node node, Node goal) Estimate the weight of the remaining path from one node to another.



31
32
33
# File 'lib/neo4j/algo.rb', line 31

def get_cost(node, goal)
  @evaluator.call(node, goal)
end