Changeset cb83c1 in git for Singular/LIB/tropical.lib


Ignore:
Timestamp:
Aug 8, 2008, 12:54:50 PM (15 years ago)
Author:
Thomas Markwig <keilen@…>
Branches:
(u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
Children:
9cb273d69977c6dfe8b9fdb37ec1893193b953c7
Parents:
90203a90e070f1fa64b3e7012c9d1f4ef0992f60
Message:
procedure cleanTmp added and made sure that tex-files are partly removed after leaving procedures


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/tropical.lib

    r90203a rcb83c1  
    1 version="$Id: tropical.lib,v 1.5 2008-08-07 15:52:58 keilen Exp $";
     1version="$Id: tropical.lib,v 1.6 2008-08-08 10:54:50 keilen Exp $";
    22category="Tropical Geometry";
    33info="
     
    110110     tropcialSubst(poly,int,list)     computes the tropical polynomial of poly with certain substitutions
    111111     randomPoly(int,int,int)          computes a polynomial with random coefficients
     112     cleanTmp()                       removes the latex and ps files from /tmp created by other procedures
    112113
    113114KEYWORDS:        tropical curves; tropical polynomials
     
    11801181             the basering must have a global monomial ordering, two variables and up to one parameter!
    11811182RETURN:      NONE
    1182 NOTE:        - the procedure produces the files /tmp/tropicalcurveNUMBER.tex, /tmp/tropicalcurveNUMBER.dvi and
     1183NOTE:        - the procedure produces the files /tmp/tropicalcurveNUMBER.tex and
    11831184               /tmp/tropicalcurveNUMBER.ps, where NUMBER is a random four digit integer;
    11841185               moreover it displays the tropical curve defined by f via kghostview;
     1186               if you wish to remove all these files from /tmp, call the procedure cleanTmp
    11851187@*           - edges with multiplicity greater than one carry this multiplicity
    11861188@*           - if # is empty, then the tropical curve is computed w.r.t. minimum, if #[1] is the
     
    13041306    int rdnum=random(1000,9999);
    13051307    write(":w /tmp/tropicalcurve"+string(rdnum)+".tex",TEXBILD);
    1306     system("sh","cd /tmp; latex /tmp/tropicalcurve"+string(rdnum)+".tex; dvips /tmp/tropicalcurve"+string(rdnum)+".dvi -o; kghostview tropicalcurve"+string(rdnum)+".ps &"); 
     1308    system("sh","cd /tmp; latex /tmp/tropicalcurve"+string(rdnum)+".tex; dvips /tmp/tropicalcurve"+string(rdnum)+".dvi -o; /bin/rm tropicalcurve"+string(rdnum)+".log;  /bin/rm tropicalcurve"+string(rdnum)+".aux;  /bin/rm tropicalcurve"+string(rdnum)+".ps?;  /bin/rm tropicalcurve"+string(rdnum)+".dvi; kghostview tropicalcurve"+string(rdnum)+".ps &"); 
    13071309  }
    13081310  else
     
    13361338RETURN:   NONE
    13371339NOTE:     - the procedure produces the files /tmp/newtonsubdivisionNUMBER.tex,
    1338             /tmp/newtonsubdivisionNUMBER.dvi and /tmp/newtonsubdivisionNUMBER.ps,
    1339             where NUMBER is a random four digit integer;
     1340            and /tmp/newtonsubdivisionNUMBER.ps, where NUMBER is a random four digit integer;
    13401341            moreover it desplays the tropical curve defined by f via kghostview;
     1342            if you wish to remove all these files from /tmp, call the procedure cleanTmp
    13411343@*          if # is empty, then the tropical curve is computed w.r.t. minimum, if #[1] is the
    13421344            string 'max', then it is computed w.r.t. maximum
     
    13951397  int rdnum=random(1000,9999);
    13961398  write(":w /tmp/newtonsubdivision"+string(rdnum)+".tex",TEXBILD);
    1397   system("sh","cd /tmp; latex /tmp/newtonsubdivision"+string(rdnum)+".tex; dvips /tmp/newtonsubdivision"+string(rdnum)+".dvi -o; kghostview newtonsubdivision"+string(rdnum)+".ps &"); 
     1399  system("sh","cd /tmp; latex /tmp/newtonsubdivision"+string(rdnum)+".tex; dvips /tmp/newtonsubdivision"+string(rdnum)+".dvi -o; /bin/rm newtonsubdivision"+string(rdnum)+".log;  /bin/rm newtonsubdivision"+string(rdnum)+".aux;  /bin/rm newtonsubdivision"+string(rdnum)+".ps?;  /bin/rm newtonsubdivision"+string(rdnum)+".dvi; kghostview newtonsubdivision"+string(rdnum)+".ps &"); 
    13981400//  return(TEXBILD);
    13991401}
     
    31193121}
    31203122
     3123proc cleanTmp ()
     3124"USAGE:  cleanTmp()
     3125PURPOSE: some procedures create latex and ps-files in the directory /tmp;
     3126         in order to remove them simply call cleanTmp();
     3127RETURN:  none"
     3128{
     3129  system("sh","cd /tmp; /bin/rm -f tropicalcurve*; /bin/rm -f tropicalnewtonsubdivision*"); 
     3130}
    31213131
    31223132/////////////////////////////////////////////////////////////////////////////////
     
    39383948    export(PARA);
    39393949  }
     3950  // kill the gfan files in /tmp
     3951  system("sh","cd /tmp; /bin/rm gfaninput; /bin/rm gfanoutput"); 
    39403952  // we return a list which contains the parametrisation ring (with the parametrisation ideal)
    39413953  // and the string representing the maximal ideal describing the necessary field extension
     
    48914903    kill TRRING;
    48924904  }
     4905  // kill the gfan files in /tmp
     4906  system("sh","cd /tmp; /bin/rm gfaninput; /bin/rm gfanoutput"); 
    48934907  // we return a list which contains lists of the parametrisation rings (with the parametrisation ideal)
    48944908  // and an integer N such that t should be replaced by t^1/N
Note: See TracChangeset for help on using the changeset viewer.