RAA - pascal-tri

pascal-tri / 0.2

Short description: Create arbitrary Pascal-like triangles
Category: Library/Math
Status: beta but usable
Created: 2003-06-12 02:59:19 GMT
Last update: -
Owner: xsdg (Projects of this owner)
Homepage: http://www.cuodan.net/~xsdg/investigations/pascal/
Download: http://www.cuodan.net/~xsdg/investigations/pascal/
License: PublicDomain
Dependency:
None
Description:

This library (though not quite in library form yet) creates a class which allows you to grab an almost-arbitrary row from a Pascal like triangle.

Features:
- includes a function to pretty-print the triangle up to a specified row
- you can pass a Proc to define how the class creates a new value from the two seed/parent values on the previous row
- you can pass a Proc to define how the class creates outer values
- you can pass the initial value
- creates rows of the traditional Pascal's triangle when no args are passed to #initialize

Current limitations (to be fixed soon):
- floating-point values aren't formatted correctly
- doesn't allow you to use different numbers for the right outside and left outside

Previous limitations (fixed in current release):
0.1:
- used a completely recursive method of creating new rows (so the number of new rows that could be created at once was limited by the stack)

Edit this project (for project owner)

back to RAA top