"Fossies" - the Fresh Open Source Software Archive

Member "jas-2.6/examples/armbruster.py" (7 Feb 2009, 1025 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 
    4 from jas import Module
    5 from jas import SubModule
    6 
    7 # Armbruster module example
    8 
    9 r = Module( "Rat(u,v,l) L" );
   10 print "Module: " + str(r);
   11 print;
   12 
   13 
   14 ps = """
   15 (
   16 (     ( 1 ),         ( 2 ),       ( 0 ),       ( l^2 ) ),
   17 (     ( 0 ),   ( l + 3 v ),       ( 0 ),         ( u ) ),
   18 (     ( 1 ),         ( 0 ),       ( 0 ),       ( l^2 ) ),
   19 ( ( l + v ),         ( 0 ),       ( 0 ),         ( u ) ),
   20 (   ( l^2 ),         ( 0 ),       ( 0 ),         ( v ) ),
   21 (     ( u ),         ( 0 ),       ( 0 ), ( v l + v^2 ) ),
   22 (     ( 1 ),         ( 0 ), ( l + 3 v ),         ( 0 ) ),
   23 (   ( l^2 ),         ( 0 ),     ( 2 u ),         ( v ) ),
   24 (     ( 0 ),         ( 1 ),   ( l + v ),         ( 0 ) ),
   25 (     ( 0 ),       ( l^2 ),       ( u ),         ( 0 ) ),
   26 (     ( 0 ),         ( v ),   ( u l^2 ),         ( 0 ) ),
   27 (     ( 0 ), ( v l + v^2 ),     ( u^2 ),         ( 0 ) )
   28 ) 
   29 """;
   30 
   31 f = SubModule( r, ps );
   32 print "SubModule: " + str(f);
   33 print;
   34 
   35 rg = f.GB();
   36 print "seq Output:", rg;
   37 print;
   38 
   39 print "isGB:", rg.isGB();
   40