Changeset a7a00b in git


Ignore:
Timestamp:
Jul 20, 2006, 4:51:56 PM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
f11ebbbd9cb2500775acb3098085c5fffe4b4110
Parents:
70cb9ba9c923dadb2e68e5c7a5a9ca40cf3dd144
Message:
*hannes: Santiagos changes


git-svn-id: file:///usr/local/Singular/svn/trunk@9334 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular/LIB
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/general.lib

    r70cb9b ra7a00b  
    33//eric, added absValue 11.04.2002
    44///////////////////////////////////////////////////////////////////////////////
    5 version="$Id: general.lib,v 1.49 2006-03-27 13:53:00 Singular Exp $";
     5version="$Id: general.lib,v 1.50 2006-07-20 14:51:56 Singular Exp $";
    66category="General purpose";
    77info="
     
    4848RETURN:  string of n small (if a is small) or capital (if a is capital)
    4949         letters, comma separated, beginning with a, in alphabetical
    50          order (or revers alphabetical order if n<0)
     50         order (or reverse alphabetical order if n<0)
    5151EXAMPLE: example A_Z; shows an example
    5252"
     
    101101proc ASCII (list #)
    102102"USAGE:   ASCII([n,m]); n,m= integers (32 <= n <= m <= 126)
    103 RETURN:   string of printable ASCII characters (no native language support)
    104           ASCII():    string of  all ASCII characters with its numbers,
    105           ASCII(n):   n-th ASCII character
     103RETURN:   string of printable ASCII characters (no native language support)@*
     104          ASCII():    string of  all ASCII characters with its numbers,@*
     105          ASCII(n):   n-th ASCII character@*
    106106          ASCII(n,m): n-th up to m-th ASCII character (inclusive)
    107107EXAMPLE: example ASCII; shows an example
     
    154154@*       So the function can be applied to any type, for which comparison
    155155@*       operators are defined.
    156 SEE ALSO: boolean expressions
    157156EXAMPLE: example absValue; shows an example
    158157"
     
    346345   factorial(37);"";                 //37! of type string (as long integer)
    347346   ring r1 = 0,x,dp;
    348    number p = factorial(37,0);       //37! of type number, computed in r
     347   number p = factorial(37,0);       //37! of type number, computed in r1
    349348   p;
    350349}
     
    352351
    353352proc fibonacci (int n, list #)
    354 "USAGE:    fibonacci(n);  n,p integers
     353"USAGE:    fibonacci(n[,p]);  n,p integers
    355354RETURN:   fibonacci(n): nth Fibonacci number, f(0)=f(1)=1, f(i+1)=f(i-1)+f(i)
    356355@*        - computed in characteristic 0, of type string
     
    408407proc kmemory (list #)
    409408"USAGE:   kmemory([n,[v]]); n,v integers
    410 RETURN:  memory in kilobyte of type int
     409RETURN:  memory in kilobyte of type bigint
    411410@*       n=0: memory used by active variables (same as no parameters)
    412411@*       n=1: total memory allocated by Singular
    413 @*       n=2: difference between top and init memory adress (sbrk memory)
    414 @*       n!=0,1,2: 0
    415412DISPLAY: detailed information about allocated and used memory if v!=0
    416413NOTE:    kmemory uses internal function 'memory' to compute kilobyte, and
     
    828825
    829826proc sort (id, list #)
    830 "USAGE:   sort(id[v,o,n]); id = ideal/module/intvec/list(of intvec's or int's)
     827"USAGE:   sort(id[,v,o,n]); id = ideal/module/intvec/list(of intvec's or int's)
    831828@*       sort may be called with 1, 2 or 3 arguments in the following way:
    832829@*       sort(id[,v,n]); v=intvec of positive integers, n=integer,
     
    11151112
    11161113proc watchdog(int i, string cmd)
    1117 "USAGE:   watchdog(i,cmd); i integer; cmd string
     1114"USAGE:   watchdog(i,cmd); i integer, cmd string
    11181115RETURN:  Result of cmd, if the result can be computed in i seconds.
    11191116         Otherwise the computation is interrupted after i seconds,
     
    12611258                type(l[3])=typeof(n)
    12621259NOTE:    If n is a long integer (of type number) then the procedure
    1263          finds primefactors <= min(p,32003) but n may be larger as
     1260         finds primefactors <= min(p,32003) but n may as larger as
    12641261         2147483647 (max. integer representation)
    12651262WARNING: the procedure works for small integers only, just by testing all
     
    14341431///////////////////////////////////////////////////////////////////////////////
    14351432proc primecoeffs(J, list #)
    1436 "USAGE:   primecoeffs(J[,q]); J any type which can be converted to a matrix
     1433"USAGE:   primecoeffs(J[,p]); J any type which can be converted to a matrix
    14371434         e.g. ideal, matrix, vector, module, int, intvec
    1438          q = intger
     1435         p = integer
    14391436COMPUTE: primefactors <= min(p,32003) of coeffs of J (default p = 32003)
    1440 RETURN:  a list, say l, of two intvectors:
    1441          l[1] : the different primefactors of all coefficients of J
     1437RETURN:  a list, say l, of two intvectors:@*
     1438         l[1] : the different primefactors of all coefficients of J@*
    14421439         l[2] : the different remaining factors
    14431440NOTE:    the procedure works for small integers only, just by testing all
    1444          primes (not to be considerd as serious prime factorization!)
     1441         primes (not to be considered as serious prime factorization!)
    14451442EXAMPLE: example primecoeffs; shows an example
    14461443"
     
    15141511///////////////////////////////////////////////////////////////////////////////
    15151512proc timeFactorize(poly i,list #)
    1516 "USAGE:  timeFactorize(p,d)  poly p , integer d
     1513"USAGE:  timeFactorize(p,d); poly p , integer d
    15171514RETURN:  factorize(p) if the factorization finished after d-1
    15181515         seconds otherwhise f is considered to be irreducible
     
    16691666"USAGE:  factorH(p)  p poly
    16701667RETURN:  factorize(p)
    1671 NOTE:    changes variables to become the last variable the principal
     1668NOTE:    changes variables to make the last variable the principal
    16721669         one in the multivariate factorization and factorizes then
    16731670         the polynomial
  • Singular/LIB/inout.lib

    r70cb9b ra7a00b  
    11// (GMG/BM, last modified 22.06.96)
    22///////////////////////////////////////////////////////////////////////////////
    3 version="$Id: inout.lib,v 1.27 2006-05-18 13:51:36 Singular Exp $";
     3version="$Id: inout.lib,v 1.28 2006-07-20 14:51:56 Singular Exp $";
    44category="General purpose";
    55info="
     
    2626DISPLAY: prints L[1], L[2], ... if an integer with name ALLprint is defined.
    2727@*       makes \"pause\",   if ALLprint > 0
    28 @*       listvar(matrix), if ALLprint = 2
    2928RETURN:  no return value
    3029EXAMPLE: example allprint; shows an example
     
    3534      int i;
    3635      for( i=1; i<=size(#); i=i+1 ) { print(#[i]); }
    37       if( ALLprint==2 ) { pause(); listvar(matrix); }
    3836      if( ALLprint >0 ) { pause(); }
    3937   }
     
    5351"USAGE:   lprint(id[,n]);  id poly/ideal/vector/module/matrix, n integer
    5452RETURN:  string of id in a format fitting into lines of size n, such that no
    55          monomial gests destroyed, i.e. the new line starts with + or -;
     53         monomial gets destroyed, i.e. the new line starts with + or -;
    5654         (default: n = pagewidth).
    5755NOTE:    id is printed columnwise, each column separated by a blank line;
     
    112110
    113111proc pmat (matrix m, list #)
    114 "USAGE:   pmat(M,[n]);  M matrix, n integer
     112"USAGE:   pmat(M[,n]);  M matrix, n integer
    115113DISPLAY: display M in array format if it fits into pagewidth; if n is given,
    116114         only the first n characters of each colum are shown
     
    184182proc rMacaulay
    185183"USAGE:   rMacaulay(s[,n]);  s string, n integer
    186 RETURN:  A string which should be readable by Singular if s is a string which
    187          was produced by Macaulay. If a second argument is present the first
     184RETURN:  A string denoting a file which should be readable by Singular
     185         and it should be produced by Macaulay Classic.
     186         If a second argument is present the first
    188187         n lines of the file are deleted (which is useful if the file was
    189188         produced e.g. by the putstd command of Macaulay).
     
    536535
    537536proc showrecursive (id,poly p,list #)
    538 "USAGE:   showrecursive(id,p[ord]); id= any object of basering, p= product of
     537"USAGE:   showrecursive(id,p[,ord]); id= any object of basering, p= product of
    539538         variables and ord=string (any allowed ordstr)
    540539DISPLAY: display 'id' in a recursive format as a polynomial in the variables
     
    641640         call the list `name`, keeping the list structure
    642641RETURN:  no return value
    643 NOTE:    The syntax of writelist uses and is similar to the syntax of the
     642NOTE:    The syntax of writelist is similar to the syntax of the
    644643         write command of Singular which does not manage lists properly.
    645644         If (file,name) = (\"listfile\",\"L1\"),  writelist creates (resp.
    646645         appends if listfile exists) a file with name listfile and stores
    647646         there the list L under the name L1. The Singular command
    648          execute(read(\"listfile\")); assignes the content of L (stored in
     647         execute(read(\"listfile\")); assigns the content of L (stored in
    649648         listfile) to a list L1.
    650649@*       On a UNIX system, write(\">file\",...) overwrites an existing file
     
    687686"USAGE:    pause([ prompt ])  prompt string
    688687RETURN:   none
    689 PURPOSE:  interrupt the execution of commands until user input
     688PURPOSE:  interrupt the execution of commands, displays prompt or pause
     689          and waits for user input
    690690NOTE:     pause is useful in procedures in connection with printlevel to
    691691          interrupt the computation and to display intermediate results.
  • Singular/LIB/poly.lib

    r70cb9b ra7a00b  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: poly.lib,v 1.37 2005-05-18 18:07:51 levandov Exp $";
     2version="$Id: poly.lib,v 1.38 2006-07-20 14:51:56 Singular Exp $";
    33category="General purpose";
    44info="
    55LIBRARY:  poly.lib      Procedures for Manipulating Polys, Ideals, Modules
    6 AUTHORS:  O. Bachmann, G.-M: Greuel, A. Fruehbis
     6AUTHORS:  O. Bachmann, G.-M. Greuel, A. Fruehbis
    77
    88PROCEDURES:
     
    4949
    5050proc hilbPoly(ideal I)
    51 "USAGE: hilbPoly(I) I a homogeneous ideal
     51"USAGE: hilbPoly(I); I a homogeneous ideal
    5252RETURN: the Hilbert polynomial of basering/I as an intvec v=v_0,...,v_r
    5353        such that the Hilbert polynomial is (v_0+v_1*t+...v_r*t^r)/r!
     
    9797           can be mapped, v,v1,v2,.. ring variables, f,f1,f2,... poly
    9898@*       - case 2: typeof(#[1])==ideal:
    99            substitute1 (I,v,f); I object of basering which can be mapped,
     99           substitute (I,v,f); I object of basering which can be mapped,
    100100           v ideal of ring variables, f ideal
    101101RETURN:  object of same type as I,
     
    191191
    192192proc katsura
    193 "USAGE: katsura([n]): n integer
     193"USAGE: katsura([n]); n integer
    194194RETURN: katsura(n) : n-th katsura ideal of
    195195         (1) newly created and set ring (32003, x(0..n), dp), if
     
    326326proc maxcoef (f)
    327327"USAGE:   maxcoef(f);  f  poly/ideal/vector/module/matrix
    328 RETURN:  maximal length of coefficient of f of type int (by counting the
     328RETURN:  maximal length of coefficient of f of type int (by measuring the
    329329         length of the string of each coefficient)
    330330EXAMPLE: example maxcoef; shows examples
     
    367367         (maxdeg of each var is 1).
    368368         Of type int if id is of type poly, of type intmat else
    369 NOTE:    proc maxdeg1 returns 1 integer, the absolute maximum; moreover, it has
     369NOTE:    proc maxdeg1 returns an integer, the absolute maximum; moreover, it has
    370370         an option for computing weighted degrees
     371SEE ALSO: maxdeg1
    371372EXAMPLE: example maxdeg; shows examples
    372373"
     
    634635proc normalize (id)
    635636"USAGE:   normalize(id);  id=poly/vector/ideal/module
    636 RETURN:  object of same type with leading coefficient equal to 1
     637RETURN:  object of same type,s
     638         each element is normalized to make its leading coefficient equal to 1
    637639EXAMPLE: example normalize; shows an example
    638640"
     
    702704"USAGE:   lcm(p[,q]); p int/intvec q a list of integers or
    703705          p poly/ideal q a list of polynomials
    704 RETURN:  the least common multiple of the common entries of p and q:
     706RETURN:  the least common multiple of p and q:
    705707@*         - of type int if p is an int/intvec
    706708@*         - of type poly if p is a poly/ideal
Note: See TracChangeset for help on using the changeset viewer.