Changeset 4bde6b in git for Singular/LIB/sets.lib
- Timestamp:
- May 15, 2020, 3:20:00 PM (4 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- a1b40ab8675488c2a4f8e225d9d748ba70340727
- Parents:
- 538e06d0809adf9f75fea000cf70d354bb674ab5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/sets.lib
r538e06 r4bde6b 20 20 (Set, list, int, bigint, string, intmat, bigintmat, intvec, ring, map, poly, matrix, 21 21 ideal, module, vector, resolution) and also works for comparing of int, bigint and 22 number with each other, similar ily for matrix, bigintmat and intmat.22 number with each other, similarly for matrix, bigintmat and intmat. 23 23 24 24 The function size can be used to determine the number of elements. … … 165 165 proc isEqualSet(def a, def b) 166 166 { 167 if(size(a)!=size(b)){ //check if the two sets have the same size 167 if(size(a)!=size(b)) //check if the two sets have the same size 168 { 168 169 return(0); 169 170 } 170 171 list L = a.elements; 171 for(int i=1;i<=size(a);i++){ //chek if every element of the first set occurs in 172 if(!(isElement(L[i],b))){ //the second set 172 for(int i=1;i<=size(a);i++) //check if every element of the first set occurs in 173 { 174 if(!(isElement(L[i],b))) //the second set 175 { 173 176 return(0); 174 177 }
Note: See TracChangeset
for help on using the changeset viewer.