"Fossies" - the Fresh Open Source Software Archive

Member "jas-2.6/examples/nabeshima_cgbF00.rb" (7 Sep 2014, 725 Bytes) of package /linux/privat/jas-2.6.5988-src.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ruby source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #
    2 # jruby examples for jas.
    3 # $Id: nabeshima_cgbF00.rb 4898 2014-09-07 13:15:42Z kredel $
    4 #
    5 
    6 require "examples/jas"
    7 
    8 # Nabashima, ISSAC 2007, example Ex-Fig-2
    9 # integral function coefficients
   10 
   11 r = Ring.new( "IntFunc(a, b, c) (x) L" );
   12 puts "Ring: " + str(r);
   13 puts;
   14 
   15 ps = """
   16 (
   17  ( { a } x^3 ),
   18  ( { b } x^2 ),
   19  ( { c } x )
   20 ) 
   21 """;
   22 
   23 #startLog();
   24 
   25 f = r.paramideal( ps );
   26 puts "ParamIdeal: " + str(f);
   27 puts;
   28 
   29 gs = f.CGBsystem();
   30 puts "CGBsystem: " + str(gs);
   31 puts;
   32 
   33 bg = gs.isCGBsystem();
   34 if bg
   35     puts "isCGBsystem: true";
   36 else
   37     puts "isCGBsystem: false";
   38 end
   39 puts;
   40 
   41 #exit();
   42 
   43 gs = f.CGB();
   44 puts "CGB: " + str(gs);
   45 puts;
   46 
   47 bg = gs.isCGB();
   48 if bg
   49     puts "isCGB: true";
   50 else
   51     puts "isCGB: false";
   52 end
   53 puts;
   54 
   55 terminate();