Sha256: eb5d6974714484efda7c342c3af6ded33d2aa3e67af53be825c57e49eeaadcc1

Contents?: true

Size: 571 Bytes

Versions: 1

Compression:

Stored size: 571 Bytes

Contents

class BTree

  class Node
    def initialize(tree,parent)
      @parent=parent
      @tree=tree
      @values=[]
      @nodes=[]
    end  
    
    
    
    private
    def check
      if @nodes.length>@tree.maxNodes
      elsif @nodes.length<@tree.minNodes
      end 
    end
  end  
  
  attr_reader :maxNodes, :minNodes
  
  def initialize(minNodes,maxNodes)
    @minNodes=minNodes
    @maxNodes=maxNodes
    @root=Node.new(self,nil)    
  end
  
  def insert(element)
    @root.insert(element)
  end
  
  def delete(element)
    @root.delete(element)
  end
  
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appswarm-0.0.1 apps/plaindb/lib/btree.rb