class FlatKit::SentinelInternalNode

Private: The Sentinel Internal Node is a private class used by the MergeTree class.

This class represents an empty / completed node in the merge tree where all the data from the descendant leaf node is full used up.

Attributes

left[R]
next_level[RW]
right[R]
winner[R]

Public Class Methods

new(left: nil, right: nil) click to toggle source
# File lib/flat_kit/sentinel_internal_node.rb, line 16
def initialize(left: nil, right: nil)
  @left = nil
  @right = nil
  @winner = nil
  @next_level = nil
end

Public Instance Methods

<=>(other) click to toggle source

A sentinal node is always greater than any other node

# File lib/flat_kit/sentinel_internal_node.rb, line 32
def <=>(other)
  return 0 if other.sentinel?
  return 1
end
leaf?() click to toggle source
# File lib/flat_kit/sentinel_internal_node.rb, line 27
def leaf?
  true
end
sentinel?() click to toggle source
# File lib/flat_kit/sentinel_internal_node.rb, line 23
def sentinel?
  true
end