Changeset e89ff5 in git
- Timestamp:
- May 11, 2012, 5:39:56 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
- Children:
- 5428647f3ac13d90ef45d257602f128804d6920a
- Parents:
- ed31a6cf71be2add371af4493e8c396c256ca950
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-05-11 17:39:56+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-05-15 15:49:50+02:00
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/schreyer.lib
red31a6 re89ff5 447 447 LIB "general.lib"; // for sort 448 448 449 // TODO: in C++! 450 static proc Tail(def M) 449 /* static proc Tail(def M) // DONE: in C++ (dyn. module: syzextra)! 451 450 { 452 451 int i = ncols(M); def m; … … 454 453 { 455 454 m = M[i]; 456 457 m = m - lead(m); // m = tail(m) 458 459 M[i] = m; 460 455 m = m - lead(m); // m = tail(m) 456 M[i] = m; 461 457 i--; 462 458 } 463 459 return (M); 464 } 460 }*/ 461 465 462 466 463 /* static */ proc SSinit(def M) … … 1426 1423 // exportto(Schreyer, Syzextra::p_Content); 1427 1424 1425 exportto(Schreyer, Syzextra::Tail); 1428 1426 } 1429 1427 else … … 1458 1456 // exportto(Schreyer, Syzextra_g::p_Content); 1459 1457 1458 exportto(Schreyer, Syzextra_g::Tail); 1460 1459 1461 1460 } -
dyn_modules/syzextra/mod_main.cc
red31a6 re89ff5 294 294 295 295 return FALSE; 296 } 297 298 299 300 301 302 303 static BOOLEAN Tail(leftv res, leftv h) 304 { 305 NoReturn(res); 306 307 if( h == NULL ) 308 { 309 WarnS("Tail needs an argument..."); 310 return TRUE; 311 } 312 313 assume( h != NULL ); 314 315 if( h->Typ() == POLY_CMD || h->Typ() == VECTOR_CMD) 316 { 317 const poly p = (const poly)h->Data(); 318 319 res->rtyp = h->Typ(); 320 321 if( p == NULL) 322 res->data = NULL; 323 else 324 res->data = p_Copy( pNext(p), currRing ); 325 326 h = h->Next(); assume (h == NULL); 327 328 return FALSE; 329 } 330 331 if( h->Typ() == IDEAL_CMD || h->Typ() == MODUL_CMD) 332 { 333 const ideal id = (const ideal)h->Data(); 334 335 res->rtyp = h->Typ(); 336 337 if( id == NULL) 338 res->data = NULL; 339 else 340 { 341 const ideal newid = idInit(IDELEMS(id),id->rank); 342 for (int i=IDELEMS(id) - 1; i >= 0; i--) 343 if( id->m[i] != NULL ) 344 newid->m[i] = p_Copy(pNext(id->m[i]), currRing); 345 else 346 newid->m[i] = NULL; 347 348 res->data = newid; 349 } 350 351 h = h->Next(); assume (h == NULL); 352 353 return FALSE; 354 } 355 356 WarnS("Tail needs a single poly/vector/ideal/module argument..."); 357 return TRUE; 296 358 } 297 359 … … 794 856 ADD(psModulFunctions, currPack->libname, "leadrawexp", FALSE, leadrawexp); 795 857 858 ADD(psModulFunctions, currPack->libname, "Tail", FALSE, Tail); 859 796 860 797 861 ADD(psModulFunctions, currPack->libname, "ISUpdateComponents", FALSE, ISUpdateComponents);
Note: See TracChangeset
for help on using the changeset viewer.