| Path: | README.rdoc |
| Last Update: | Wed Feb 13 22:53:39 -0500 2008 |
LTF is a Ruby program that generates Maxima code to find linear transformations between vectors given input/output constraints.
LTF should work on any platform that supports both Ruby and Maxima, namely Linux, Mac OS X, and Windows. However, as of this writing it has only been tested on a Gentoo Linux system.
The latest version of LTF can be found at:
www.jessemerriman.com/project/ltf
You can choose to install either through RubyGems, which I highly recommend, or manually. First make sure you have the required prerequisites.
$ gem install ltf
If you don‘t want to use RubyGems, you can download the LTF Zip file instead of the Gem, and unzip that to the location of your choice. You‘ll have to make sure the lib/ directory is in Ruby‘s $LOAD_PATH. You can either run LTF like this:
$ ruby -Ipath/to/LTF/lib/dir path/to/ltf
or insert the following as the second line of the ltf executable (and any other Ruby program that uses the LTF library):
$LOAD_PATH << '/path/to/LTF/lib/dir'
Failure to do either of these will result in a LoadError upon attempting to run the program.
The executable ltf will appear under the bin/ directory where LTF was installed (if you used RubyGems on Linux, this may be something like /usr/lib/ruby/gems/1.8/gems/ltf-0.0.1/bin/ltf).
LTF can be run from the command line like so:
$ ltf [-h|--help]
Vector input-output constraints will be read from STDIN, one line at a time, in the following format:
[a,b,c,...,n] [A,B,C,...,N]
Where each letter is a value. Values may begin with whitespace, followed by a number, which is either an integer, a decimal, or a fraction. Here are some example constraints:
[0,0] [0,0] [1, 45, -2] [3, -65, 54] [6.4] [100.1] [1/2, 5.4] [-55.01, -33/34]
Comments can be entered if they start with whitespace followed by a #, either on lines of their own or after a constraint:
# this is a comment [0] [1] # this is another comment
$ ltf Enter constraints, one per line. Enter a blank line when done. # Find a "spin-push-down" transformation. [0,0,0] [0,0,0] [1,1,1] [1/2,1/2,1/2] [0,1,1] [1,0,0] [1,0,1] [0,1,0] [1,1,0] [0,0,1] Solution: (x3+x2-x1)/2 (x3-x2+x1)/2 -(x3-x2-x1)/2
Each part of the output is the next part of the transformation. So in this case, the result is:
[ x1 ] [ (x3+x2-x1)/2 ] [ (-x1 + x2 + x3)/2 ] [ x2 ] -> [ (x3-x2+x1)/2 ] = [ ( x1 - x2 + x3)/2 ] [ x3 ] [ -(x3-x2-x1)/2 ] [ ( x1 + x2 - x3)/2 ]
Other examples may be found in the examples/ directory where LTF was installed.
Please send bug reports or patches to jessemerriman@warpmail.net
LTF is Copyright (C) 2007 Jesse Merriman, and is released under the GNU General Public License (GPL), Version 2. See COPYING for more information.