module BinSearch

Constants

LIN_BITS

BinSearch switches to linear search if the numer of elements to sorted is less than 1 << LIN_BITS (i.e. 2^LIN_BITS - 1)

MODES
MODE_CHECK_EQ
MODE_IS_ASC
MODE_IS_DESC
VERSION

Public Class Methods

files() click to toggle source
# File lib/bin_search.rb, line 7
def self.files
  f = []
  f << 'bin_search/bin_search'
  f
end
load_relative(f) click to toggle source
# File lib/bin_search.rb, line 13
def self.load_relative(f)
  path = "#{File.join(File.dirname(caller[0]), f)}.rb"
  load path
end
reload!() click to toggle source
# File lib/bin_search.rb, line 18
def self.reload!
  files.each { |f| load_relative f }
end