No commit activity in last 3 years
No release in over 3 years
Simple jruby wrapper around the original java lib
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.16
~> 10.0
 Project Readme

Princeton Standard Libraries Jruby wrapper

I was going through the Algorithms 4th edition and wanted to write the algorithms in ruby instead of the default java. The book uses the Princeton Standard Libraries to help clarify the code.

Installation

Add this line to your application's Gemfile:

gem 'princeton_standard_libraries'

And then execute:

$ bundle

Or install it yourself as:

$ gem install princeton_standard_libraries

Usage

require 'princeton_standard_libraries'

n = 50
Java::StdDraw.set_xscale(0,n)
Java::StdDraw.set_yscale(0,n*n)
Java::StdDraw.pen_radius = 0.01

1.upto(n) do |i|
  Java::StdDraw.point(i, i)
  Java::StdDraw.point(i, i*i)
  Java::StdDraw.point(i, i*Math.log(i))
end

License

The gem is available as open source under the terms of the GNU General Public License, version 3 (GPLv3).