github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

kanwei / algorithms

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 299
    • 18
  • Source
  • Commits
  • Network (18)
  • Issues (2)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • gh-pages
    • master ✓
  • Tags (2)
    • 0.2.0
    • 0.1.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A library of algorithms and containers for Ruby. — Read more

  cancel

http://rubyforge.org/projects/algorithms/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Add Levenshtein distance in C as part of String algorithms 
kanwei (author)
Sun Jan 03 23:00:11 -0800 2010
commit  fb4081946c89056f1f896c4c3644d79480e4bbb2
tree    c51285f261293dbe8fac40796b59d454ed2c98f3
parent  98d20f9775648df745fd89953e8d69a819b58777
algorithms /
name age
history
message
file .gitignore Fri Feb 27 21:34:24 -0800 2009 Let GitHub build the gem too [kanwei]
file History.txt Sun Jan 03 23:00:11 -0800 2010 Add Levenshtein distance in C as part of String... [kanwei]
file Manifest Sun Jan 03 23:00:11 -0800 2010 Add Levenshtein distance in C as part of String... [kanwei]
file README.markdown Fri Apr 03 20:36:39 -0700 2009 KDTree docs [kanwei]
file Rakefile Sun Jan 03 23:00:11 -0800 2010 Add Levenshtein distance in C as part of String... [kanwei]
file algorithms.gemspec Sun Mar 29 06:03:51 -0700 2009 Release 0.2.0 [kanwei]
directory benchmarks/ Sun Nov 15 09:30:10 -0800 2009 Fix splaytree gc marking issue, and it can now ... [kanwei]
directory ext/ Sun Jan 03 23:00:11 -0800 2010 Add Levenshtein distance in C as part of String... [kanwei]
directory lib/ Sun Jan 03 23:00:11 -0800 2010 Add Levenshtein distance in C as part of String... [kanwei]
directory spec/ Sun Jan 03 23:00:11 -0800 2010 Add Levenshtein distance in C as part of String... [kanwei]
README.markdown

algorithms

  • Official homes are here on github, and at rubyforge
  • Documentation: http://algorithms.rubyforge.org/

DESCRIPTION:

Started as a Google Summer of Code 2008 project

Written by Kanwei Li, mentored by Austin Ziegler

Original Proposal: Using the right data structure or algorithm for the situation is an important aspect of programming. In computer science literature, many data structures and algorithms have been researched and extensively documented. However, there is still no standard library in Ruby implementing useful structures and algorithms like Red/Black Trees, tries, different sorting algorithms, etc. This project will create such a library with documentation on when to use a particular structure/algorithm. It will also come with a benchmark suite to compare performance in different situations.

FEATURES:

Done so far:

    * Heaps              Containers::Heap, Containers::MaxHeap, Containers::MinHeap
    * Priority Queue     Containers::PriorityQueue
    * Deque              Containers::Deque, Containers::CDeque (C extension), Containers::RubyDeque
    * Stack              Containers::Stack (uses Deque)
    * Queue              Containers::Queue (uses Deque)
    * Red-Black Trees    Containers::RBTreeMap, Containers::CRBTreeMap (C extension), Containers::RubyRBTreeMap
    * Splay Trees        Containers::SplayTreeMap, Containers::CSplayTreeMap (C extension), Containers::RubySplayTreeMap
    * Tries              Containers::Trie
    * Suffix Array       Containers::SuffixArray
    * kd Tree                    Containers::KDTree

    * Search algorithms
      - Binary Search            Algorithms::Search.binary_search
      - Knuth-Morris-Pratt       Algorithms::Search.kmp_search
    * Sort algorithms           
      - Bubble sort              Algorithms::Sort.bubble_sort
      - Comb sort                Algorithms::Sort.comb_sort
      - Selection sort           Algorithms::Sort.selection_sort
      - Heapsort                 Algorithms::Sort.heapsort
      - Insertion sort           Algorithms::Sort.insertion_sort
      - Shell sort               Algorithms::Sort.shell_sort
      - Quicksort                Algorithms::Sort.quicksort
      - Mergesort                Algorithms::Sort.mergesort

SYNOPSIS:

    require 'rubygems'
    require 'algorithms'

    max_heap = Containers::MaxHeap.new

    # To not have to type "Containers::" before each class, use:
    include Containers
    max_heap = MaxHeap.new

REQUIREMENTS:

  • Ruby 1.8 compatible Ruby, or Ruby 1.9
  • C compiler for C extensions (optional, but very much recommended for vast performance benefits)

INSTALL:

  • sudo gem install algorithms

LICENSE:

(The MIT License)

Algorithms and Containers project is Copyright (c) 2009 Kanwei Li

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server