Home [Download] [Tutorial] [API Documentation] [Other Documentation] [References]

RTensor

Summary

The RTensor library (rtensor.so and rtensor_sup.rb) provides the tensor (multi-dimensional matrix) functionality for the Ruby programming language. It is built for Windows only (and only 32-bit Windows XP and Vista have been tested) with RubyInstaller 1.9.2-p290 and DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe.

The library is encapsulated in module Tsr which facilitates the namespace. It consists of three classes: Tnsr (which provides the data structure for tensor), Tensor (which is derived from Tnsr and provides mathematical operations), and IRange (which provides integer range with step). It also includes some global variables. And finally it includes module DM just for fun.

Installation

  • First, if necessary, install Ruby for Windows.

  • Next, the library can be downloaded from here.

  • Move the files "rtensor.so" and "rtensor_sup.rb" to one of the directories in $: (or $LOAD_PATH).
    (For example, in RubyInstaller 1.9.2-p290, the directories are $: = ["{rubydir}/lib/ruby/site_ruby/1.9.1", "{rubydir}/lib/ruby/site_ruby/1.9.1/i386-msvcrt", "{rubydir}/lib/ruby/site_ruby", "{rubydir}/lib/ruby/vendor_ruby/1.9.1", "{rubydir}/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt", "{rubydir}/lib/ruby/vendor_ruby", "{rubydir}/lib/ruby/1.9.1","{rubydir}/lib/ruby/1.9.1/i386-mingw32"] where {rubydir} is the directory where you installed Ruby.)

    The directory "{rubydir}/lib/ruby/site_ruby/1.9.1/i386-msvcrt/" is recommended.
  • Run "Interactive Ruby" and then type
    require 'rtensor'
    (If desirable, you could also then type "include Tsr".) You are all set!
  • Documentation

    The API documentation is available at http://tensor.heliohost.org/rtensor/api/.

    Additional documentation is available at http://tensor.heliohost.org/rtensor/doc/.

    A tutorial is available at http://tensor.heliohost.org/rtensor/tutorial/.

    Addendum

    You may also want to install:

  • NArray (ver 0.5.9.7 x86-mingw32 was tested):
  • From "Start Command Prompt with Ruby", type
  • gem install narray-ruby19
  • Ruby/GSL (ver 1.14.7 was tested):
  • First, install NArray as described above.
  • Next, a precompiled version of GSL is available here.
  • Move the files "libgsl-0.dll" and "libgslcblas-0.dll" into the Ruby bin directory "{rubydir}/bin/" where {rubydir} is the directory where you installed Ruby.
  • Next, a precompiled version of Ruby/GSL is available here.
  • Move the file "rb_gsl.so" to the directory "{rubydir}/lib/ruby/site_ruby/1.9.1/i386-msvcrt/".
  • Move the file "gsl.rb" to the directory "{rubydir}/lib/ruby/site_ruby/1.9.1/".
  • Create the directory "{rubydir}/lib/ruby/site_ruby/1.9.1/gsl/".
  • Move the file "oper.rb" to the directory "{rubydir}/lib/ruby/site_ruby/1.9.1/gsl/".
  • Gnuplot (ver 4.4.3 was tested):
  • First, download, for example, the Gnuplot 4.4.3 for Windows.
  • Unzip it and put/move the directory "gnuplot" into the Ruby bin directory "{rubydir}/bin/".
  • GiNaC (ver 1.6.1 was tested):
  • A precompiled version of GiNaC is available here.
  • Move the file "ginsh.exe" into the Ruby bin directory "{rubydir}/bin/".
  • License

    RTensor is licensed under the terms of "New BSD License" or "Modified BSD License" as shown here.

    (I can be contacted via Ruby Forum by searching for "RTensor".)

    Disclaimer

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    ISearchBible.com Bible Verses


    Your Ad Here