Changeset 72382c2 in git for Singular/LIB/surf.lib


Ignore:
Timestamp:
Dec 12, 2008, 6:27:01 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
73b186d5bc4b455e4e5d630d447f6d74c3cb0f80
Parents:
148455ccfcf8b41197478663486901ebf24ab661
Message:
*hannes: dupl. proc: num_of_vars->surf.lib


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/surf.lib

    r148455 r72382c2  
    11// last modified 21.07.2005, Oliver Wienand
    22///////////////////////////////////////////////////////////////////////////////
    3 version="$Id: surf.lib,v 1.28 2007-07-13 12:31:06 Singular Exp $";
     3version="$Id: surf.lib,v 1.29 2008-12-12 17:27:01 Singular Exp $";
    44category="Visualization";
    55info="
     
    2424
    2525///////////////////////////////////////////////////////////////////////////////
    26 static proc num_of_vars(ideal I)
     26proc num_of_vars(ideal I)
     27"USAGE: num_of_vars(ideal I)
     28
     29RETURN: an intvec containing one entry for each ring variable.
     30each contains the sums of all degrees in this variable of all monomials
     31occuring in the ideal.
     32An entry is zero iff the corresponding variable does not occur in the ideal.
     33"
    2734{
    2835  intvec v;
    2936  int i;
    3037  poly p;
    31   for(i=size(I);i>0;i--)
     38  for(i=ncols(I);i>0;i--)
    3239  {
    3340    p=I[i];
     
    3946  }
    4047  return(v);
     48}
     49example
     50{
     51  "EXAMPLE:"; echo = 2;
     52  ring r = 0, (x,y,z),dp;
     53  ideal j0 = x^2-x*y;
     54  num_of_vars(j0);
     55  ideal j1 = x^2-x*y-y;
     56  num_of_vars(j1);
     57  ideal j2 = x^2-x*y-y, x^3-2*y;
     58  num_of_vars(j2);
    4159}
    4260
Note: See TracChangeset for help on using the changeset viewer.