Changeset 72382c2 in git for Singular/LIB/surf.lib
- Timestamp:
- Dec 12, 2008, 6:27:01 PM (15 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 73b186d5bc4b455e4e5d630d447f6d74c3cb0f80
- Parents:
- 148455ccfcf8b41197478663486901ebf24ab661
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/surf.lib
r148455 r72382c2 1 1 // last modified 21.07.2005, Oliver Wienand 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: surf.lib,v 1.2 8 2007-07-13 12:31:06Singular Exp $";3 version="$Id: surf.lib,v 1.29 2008-12-12 17:27:01 Singular Exp $"; 4 4 category="Visualization"; 5 5 info=" … … 24 24 25 25 /////////////////////////////////////////////////////////////////////////////// 26 static proc num_of_vars(ideal I) 26 proc num_of_vars(ideal I) 27 "USAGE: num_of_vars(ideal I) 28 29 RETURN: an intvec containing one entry for each ring variable. 30 each contains the sums of all degrees in this variable of all monomials 31 occuring in the ideal. 32 An entry is zero iff the corresponding variable does not occur in the ideal. 33 " 27 34 { 28 35 intvec v; 29 36 int i; 30 37 poly p; 31 for(i= size(I);i>0;i--)38 for(i=ncols(I);i>0;i--) 32 39 { 33 40 p=I[i]; … … 39 46 } 40 47 return(v); 48 } 49 example 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); 41 59 } 42 60
Note: See TracChangeset
for help on using the changeset viewer.