Changeset ff12c6 in git
- Timestamp:
- Oct 8, 2012, 6:44:02 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 7ec05993a90b8b8d6cd1f03ce111460365a98194
- Parents:
- e9927ff3cc13ebaddd8a4a7419c26390ff895c18
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-10-08 18:44:02+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-10-08 20:37:21+02:00
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/schreyer.lib
re9927f rff12c6 1404 1404 listvar(Syzextra); 1405 1405 } 1406 1407 exportto(Top, Syzextra::ClearContent); 1408 exportto(Top, Syzextra::ClearDenominators); 1406 1409 1407 1410 // export Syzextra; … … 1439 1442 } 1440 1443 1444 exportto(Top, Syzextra_g::ClearContent); 1445 exportto(Top, Syzextra_g::ClearDenominators); 1446 1441 1447 // export Syzextra_g; 1442 1448 // exportto(Schreyer, Syzextra_g::noop); -
dyn_modules/syzextra/mod_main.cc
re9927f rff12c6 6 6 7 7 #include <coeffs/coeffs.h> 8 9 #include <polys/PolyEnumerator.h> 8 10 9 11 #include <polys/monomials/p_polys.h> … … 45 47 res->data = NULL; 46 48 } 49 50 /// wrapper around n_ClearContent 51 static BOOLEAN _ClearContent(leftv res, leftv h) 52 { 53 NoReturn(res); 54 55 const char *usage = "'ClearContent' needs a (non-zero!) poly or vector argument..."; 56 57 if( h == NULL ) 58 { 59 WarnS(usage); 60 return TRUE; 61 } 62 63 assume( h != NULL ); 64 65 if( !( h->Typ() == POLY_CMD || h->Typ() == VECTOR_CMD) ) 66 { 67 WarnS(usage); 68 return TRUE; 69 } 70 71 assume (h->Next() == NULL); 72 73 poly ph = reinterpret_cast<poly>(h->Data()); 74 75 if( ph == NULL ) 76 { 77 WarnS(usage); 78 return TRUE; 79 } 80 81 const ring r = currRing; 82 assume( r != NULL ); assume( r->cf != NULL ); const coeffs C = r->cf; 83 84 number n; 85 86 // experimentall (recursive enumerator treatment) of alg. ext 87 CPolyCoeffsEnumerator itr(ph); 88 n_ClearContent(itr, n, C); 89 90 res->data = n; 91 res->rtyp = NUMBER_CMD; 92 93 return FALSE; 94 } 95 96 /// wrapper around n_ClearDenominators 97 static BOOLEAN _ClearDenominators(leftv res, leftv h) 98 { 99 NoReturn(res); 100 101 const char *usage = "'ClearDenominators' needs a (non-zero!) poly or vector argument..."; 102 103 if( h == NULL ) 104 { 105 WarnS(usage); 106 return TRUE; 107 } 108 109 assume( h != NULL ); 110 111 if( !( h->Typ() == POLY_CMD || h->Typ() == VECTOR_CMD) ) 112 { 113 WarnS(usage); 114 return TRUE; 115 } 116 117 assume (h->Next() == NULL); 118 119 poly ph = reinterpret_cast<poly>(h->Data()); 120 121 if( ph == NULL ) 122 { 123 WarnS(usage); 124 return TRUE; 125 } 126 127 const ring r = currRing; 128 assume( r != NULL ); assume( r->cf != NULL ); const coeffs C = r->cf; 129 130 number n; 131 132 // experimentall (recursive enumerator treatment) of alg. ext. 133 CPolyCoeffsEnumerator itr(ph); 134 n_ClearDenominators(itr, n, C); 135 136 res->data = n; 137 res->rtyp = NUMBER_CMD; 138 139 return FALSE; 140 } 141 47 142 48 143 /// try to get an optional (simple) integer argument out of h … … 851 946 // #define ADD(A,B,C,D,E) ADD0(iiAddCproc, "", C, D, E) 852 947 #define ADD(A,B,C,D,E) ADD0(A->iiAddCproc, B, C, D, E) 948 ADD(psModulFunctions, currPack->libname, "ClearContent", FALSE, _ClearContent); 949 ADD(psModulFunctions, currPack->libname, "ClearDenominators", FALSE, _ClearDenominators); 950 853 951 ADD(psModulFunctions, currPack->libname, "DetailedPrint", FALSE, DetailedPrint); 854 952 ADD(psModulFunctions, currPack->libname, "leadmonomial", FALSE, leadmonom); -
dyn_modules/syzextra/test.sh
re9927f rff12c6 2 2 3 3 # env 4 "$SINGULAR_EXECUTABLE" -teq "$srcdir/test_clear_enum.tst" 4 5 5 6 "$SINGULAR_EXECUTABLE" -teq "$srcdir/syzextra.tst" && "$SINGULAR_EXECUTABLE" -teq "$srcdir/ederc.tst"
Note: See TracChangeset
for help on using the changeset viewer.