Changeset 3360fb in git for Singular/LIB/sing4ti2.lib


Ignore:
Timestamp:
Apr 14, 2009, 2:00:15 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
334c21f9e573112667d39f4cd9dcad9c7b19a50c
Parents:
2c3a5db391a25c28449b80c5f27e1dd77ed2c30f
Message:
*hannes: format


git-svn-id: file:///usr/local/Singular/svn/trunk@11695 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/sing4ti2.lib

    r2c3a5d r3360fb  
    11///////////////////////////////////////////////////////////////////
    2 version="$Id: sing4ti2.lib,v 1.2 2009-04-07 16:18:06 seelisch Exp $";
     2version="$Id: sing4ti2.lib,v 1.3 2009-04-14 12:00:15 Singular Exp $";
    33category="Commutative Algebra";
    44info="
     
    1212@*    the returned result
    1313
    14 REQUIRES: External programs 4ti2, sed and awk to be installed 
     14REQUIRES: External programs 4ti2, sed and awk to be installed
    1515
    1616PROCEDURES:
     
    8888
    8989//----------------------------------------------------------------------
    90 // calling 4ti2 and converting output 
     90// calling 4ti2 and converting output
    9191// Singular's string is too clumsy for this, hence we first prepare
    9292// using standard unix commands
    9393//----------------------------------------------------------------------
    9494   j=system("sh","markov sing4ti2");
    95    j=system("sh","awk \'BEGIN{ORS=\",\";}{print $0;}\' sing4ti2.mar | sed s/[\\\ \\\t\\\v\\\f]/,/g | sed s/,+/,/g|sed s/,,/,/g|sed s/,,/,/g > sing4ti2.converted"); 
     95   j=system("sh","awk \'BEGIN{ORS=\",\";}{print $0;}\' sing4ti2.mar | sed s/[\\\ \\\t\\\v\\\f]/,/g | sed s/,+/,/g|sed s/,,/,/g|sed s/,,/,/g > sing4ti2.converted");
    9696   if(!defined(keepfiles))
    9797   {
    9898      j=system("sh",("rm -f sing4ti2.mar sing4ti2."+fileending));
    99    } 
     99   }
    100100//----------------------------------------------------------------------
    101101// reading output of 4ti2
     
    115115     {
    116116        if(erglist[2+(i-1)*erglist[2]+j]>=0)
    117         { 
     117        {
    118118//--- positive exponents
    119119           temppol1=temppol1*(var(j)^erglist[2+(i-1)*erglist[2]+j]);
     
    125125        }
    126126     }
    127      toric=toric,temppol1-temppol2; 
     127     toric=toric,temppol1-temppol2;
    128128   }
    129129//--- get rid of leading entry 0;
     
    210210
    211211//----------------------------------------------------------------------
    212 // calling 4ti2 and converting output 
     212// calling 4ti2 and converting output
    213213// Singular's string is too clumsy for this, hence we first prepare
    214214// using standard unix commands
    215215//----------------------------------------------------------------------
    216216   j=system("sh","graver sing4ti2");
    217    j=system("sh","awk \'BEGIN{ORS=\",\";}{print $0;}\' sing4ti2.gra | sed s/[\\\ \\\t\\\v\\\f]/,/g | sed s/,+/,/g |sed s/,,/,/g|sed s/,,/,/g > sing4ti2.converted"); 
     217   j=system("sh","awk \'BEGIN{ORS=\",\";}{print $0;}\' sing4ti2.gra | sed s/[\\\ \\\t\\\v\\\f]/,/g | sed s/,+/,/g |sed s/,,/,/g|sed s/,,/,/g > sing4ti2.converted");
    218218   if(!defined(keepfiles))
    219219   {
    220220      j=system("sh",("rm -f sing4ti2.gra sing4ti2."+fileending));
    221    } 
     221   }
    222222//----------------------------------------------------------------------
    223223// reading output of 4ti2
     
    237237     {
    238238        if(erglist[2+(i-1)*erglist[2]+j]>=0)
    239         { 
     239        {
    240240//--- positive exponents
    241241           temppol1=temppol1*(var(j)^erglist[2+(i-1)*erglist[2]+j]);
     
    247247        }
    248248     }
    249      toric=toric,temppol1-temppol2; 
     249     toric=toric,temppol1-temppol2;
    250250   }
    251251//--- get rid of leading entry 0;
     
    272272@*       - number of variables of basering equals number of columns of A
    273273@*         (for ker(A)) resp. of rows of A (for Im(A))
    274 CREATE:  temporary files sing4ti2.mat, sing4ti2.lat, sing4ti2.mar 
     274CREATE:  temporary files sing4ti2.mat, sing4ti2.lat, sing4ti2.mar
    275275@*       in the current directory (I/O files for communication with 4ti2)
    276276NOTE:    input rules for 4ti2 also apply to input to this procedure
     
    330330
    331331//----------------------------------------------------------------------
    332 // calling 4ti2 and converting output 
     332// calling 4ti2 and converting output
    333333// Singular's string is too clumsy for this, hence we first prepare
    334334// using standard unix commands
    335335//----------------------------------------------------------------------
    336336   j=system("sh","hilbert sing4ti2");
    337    j=system("sh","awk \'BEGIN{ORS=\",\";}{print $0;}\' sing4ti2.hil | sed s/[\\\ \\\t\\\v\\\f]/,/g | sed s/,+/,/g |sed s/,,/,/g|sed s/,,/,/g > sing4ti2.converted"); 
     337   j=system("sh","awk \'BEGIN{ORS=\",\";}{print $0;}\' sing4ti2.hil | sed s/[\\\ \\\t\\\v\\\f]/,/g | sed s/,+/,/g |sed s/,,/,/g|sed s/,,/,/g > sing4ti2.converted");
    338338   if(!defined(keepfiles))
    339339   {
    340340      j=system("sh",("rm -f sing4ti2.hil sing4ti2."+fileending));
    341    } 
     341   }
    342342//----------------------------------------------------------------------
    343343// reading output of 4ti2
     
    357357     {
    358358        if(erglist[2+(i-1)*erglist[2]+j]>=0)
    359         { 
     359        {
    360360//--- positive exponents
    361361           temppol1=temppol1*(var(j)^erglist[2+(i-1)*erglist[2]+j]);
     
    367367        }
    368368     }
    369      toric=toric,temppol1-temppol2; 
     369     toric=toric,temppol1-temppol2;
    370370   }
    371371//--- get rid of leading entry 0;
Note: See TracChangeset for help on using the changeset viewer.