Class: XRVG::BinaryTreeRange
- Inherits:
-
Object
- Object
- XRVG::BinaryTreeRange
- Defined in:
- lib/interpolation.rb
Instance Method Summary collapse
-
#initialize(limit, quadleft, quadright, range = nil) ⇒ BinaryTreeRange
constructor
A new instance of BinaryTreeRange.
- #range(index) ⇒ Object
Constructor Details
#initialize(limit, quadleft, quadright, range = nil) ⇒ BinaryTreeRange
Returns a new instance of BinaryTreeRange.
84 85 86 87 88 89 |
# File 'lib/interpolation.rb', line 84 def initialize( limit, quadleft, quadright, range=nil ) @limit = limit @quadleft = quadleft @quadright = quadright @range = range end |
Instance Method Details
#range(index) ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/interpolation.rb', line 91 def range( index ) if @limit if index < @limit return @quadleft.range( index ) else return @quadright.range( index ) end else return @range end end |