Sha256: 4674d2aa4c1ea22710649b576daff70cc4cc6c4bac0cf9671544bca6d250d2f5
Contents?: true
Size: 374 Bytes
Versions: 3
Compression:
Stored size: 374 Bytes
Contents
module Neo4jr module PathRater def get_cost path, start_cost, cost_evaluator, cost_accumulator cost = start_cost previous = nil path.each do |r| cost = cost_accumulator.addCosts(cost, cost_evaluator.getCost(r, r.getEndNode == previous)) if r.kind_of? org.neo4j.api.core.Relationship previous = r end cost end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
neo4jr-simple-0.2.1 | lib/neo4jr/path_rater.rb |
neo4jr-simple-0.2.0 | lib/neo4jr/path_rater.rb |
neo4jr-simple-0.1.8 | lib/neo4jr/path_rater.rb |