Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

avl_tree

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

avl_tree

  • 1.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

AVL tree, Red-black tree in Ruby

avl_tree - AVL tree, Red-black tree and Lock-free Red black tree in Ruby Copyright (C) 2014 Hiroshi Nakamura nahi@ruby-lang.org

Usage

You can use AVLTree, RedBlackTree or ConcurrentRedBlackTree just as a replacement of Hash.

@points = Hash.new
...
@points[score] = person
...
@points.each do |score, person|
  ...
end

->

require 'avl_tree'
@points = AVLTree.new

require 'red_black_tree'
@points = RedBlackTree.new
@points = ConcurrentRedBlackTree.new

AVLTree and RedBlackTree are faster but not thread-safe. Use ConcurrentRedBlackTree in multi-thread environment.

Author

Name:: Hiroshi Nakamura E-mail:: nahi@ruby-lang.org Project web site:: http://github.com/nahi/avl_tree

License

This program is copyrighted free software by Hiroshi Nakamura. You can redistribute it and/or modify it under the same terms of Ruby's license; either the dual license version in 2003, or any later version.

FAQs

Package last updated on 11 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc