Skip to content

Commit

Permalink
added max_cost_evaluator
Browse files Browse the repository at this point in the history
  • Loading branch information
klobuczek committed Jan 28, 2010
1 parent e6f64d5 commit 2940f59
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/neo4jr-simple.rb
Expand Up @@ -38,6 +38,7 @@ module Neo4jr
require 'neo4jr/returnable_evaluator'
require 'neo4jr/stop_evaluator'
require 'neo4jr/simple_cost_evaluator'
require 'neo4jr/max_cost_evaluator'
require 'neo4jr/order'
require 'neo4jr/direction'
require 'neo4jr/path_rater'
Expand Down
13 changes: 13 additions & 0 deletions lib/neo4jr/max_cost_evaluator.rb
@@ -0,0 +1,13 @@
module Neo4jr
class MaxCostEvaluator
include org.neo4j.graphalgo.shortestpath.MaxCostEvaluator

def initialize &block
@evaluator_block = block
end

def maxCostExceeded currentCost
@evaluator_block.call currentCost
end
end
end
2 changes: 1 addition & 1 deletion neo4jr-simple.gemspec
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Matthew Deiters"]
s.date = %q{2010-01-26}
s.date = %q{2010-01-27}
s.default_executable = %q{neosh}
s.description = %q{A simple, ready to go JRuby wrapper for the Neo4j graph database engine. Nothing more then Neo4j and Ruby goodness}
s.email = %q{matthew_deiters@mckinsey.com}
Expand Down

0 comments on commit 2940f59

Please sign in to comment.