"Fossies" - the Fresh Open Source Software Archive

Member "jas-2.6/examples/nabeshima_cgbF00.py" (7 Sep 2014, 799 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) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

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