0.0
No commit activity in last 3 years
No release in over 3 years
Uninformed search trees!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

usearchtree

Uninformed search trees - because ignorance is bliss

Build Status

Usage

Dependencies

Install Ruby. Has only been tested with Ruby 2.1.5.

Install RubyGems (requires Ruby).

Install Rake (requires RubyGems):

gem install rake

Install the gem using:

gem install usearchtree

Or get the latest version with:

git clone https://github.com/jleeothon/usearchtree

Documentation

Documentation for the installed gem

To read the documentation for the gem installed, use gem server. Then open your browser in http://localhost:8808/.

Documentation for a repository clone

  1. Install rdoc: gem install rdoc.
  2. cd to the root of the project.
  3. Run rdoc.
  4. Open the docs folder and open any HTML file.

Testing

Warning: test files have been deleted. This section is broken.

Run the tests from the project's root folder using:

rake tests

Or run a single test using the following example command. The argument is a test case's name without the test_ prefix and without the .rb extension.

rake test[1_breadth]

To run a console loaded with usearchtree, run:

rake console

Then run your own commands, for example:

g = Graph.new
load_node_lables g, "path/to/labels.txt"
load_distance_matrix g, "path/to/distance/matrix.txt"
b = BreadthFirstSearch g, "A", "Z"
puts b.path # this is the solution to the search
# [A, B, D, Z]
puts b.tree # this are the nodes and their parents
# [A => nil, B => A, C => A, D => B, E => B, F => C, G => C, Z => D]
puts b.traversal
# [A, B, C, D, E, F, G, Z]
puts b.cost
# 99