Changeset fbaeb5 in git
 Timestamp:
 Aug 5, 2016, 12:24:51 PM (7 years ago)
 Branches:
 (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
 Children:
 f73b0dba8fd582e1ebf4d2a1ed2067a19cab5a36
 Parents:
 5cea7ad489a20fb756363be9d41e8e6955b5835f
 gitauthor:
 Yue <ren@mathematik.unikl.de>20160805 12:24:51+02:00
 gitcommitter:
 Yue <ren@mathematik.unikl.de>20160805 18:10:20+02:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/dyn_modules/gfanlib/bbpolytope.cc
r5cea7a rfbaeb5 385 385 { 386 386 int N = rVar(r); 387 gfan::ZMatrix zm( 1,N+1);387 gfan::ZMatrix zm(0,N+1); 388 388 int *leadexpv = (int*)omAlloc((N+1)*sizeof(int)); 389 389 while (p!=NULL) … … 395 395 } 396 396 omFreeSize(leadexpv,(N+1)*sizeof(int)); 397 return gfan::ZCone(); 397 gfan::ZCone Delta = gfan::ZCone::givenByRays(zm,gfan::ZMatrix(0, zm.getWidth())); 398 return Delta; 398 399 } 399 400 … … 466 467 for (int i=0; i<k; i++) 467 468 { 468 if (l>m[i].Typ() != polytopeID)469 if (l>m[i].Typ() == polytopeID) 469 470 { 470 471 gfan::ZCone* p = (gfan::ZCone*) l>m[i].Data(); … … 472 473 int r = pv.getHeight(); 473 474 int c = pv.getWidth(); 474 gfan::IntMatrix pw(c,r); 475 for (int n=0; n<c; n++) 476 for (int m=0; m<r; m++) 477 { 478 pw[n][m] = pv[m][n].toInt(); 479 } 480 P[i]=pw; 481 } else if (l>m[i].Typ() != POLY_CMD) 475 gfan::IntMatrix pw(r,c1); 476 for (int n=0; n<r; n++) 477 for (int m=1; m<c; m++) 478 pw[n][m1] = pv[n][m].toInt(); 479 P[i]=pw.transposed(); 480 } else if (l>m[i].Typ() == POLY_CMD) 482 481 { 483 482 poly p = (poly) l>m[i].Data(); 484 483 int N = rVar(currRing); 485 gfan::IntMatrix pw(0,N +1);484 gfan::IntMatrix pw(0,N); 486 485 int *leadexpv = (int*)omAlloc((N+1)*sizeof(int)); 487 486 while (p!=NULL) … … 494 493 pIter(p); 495 494 } 496 P[i]=pw ;495 P[i]=pw.transposed(); 497 496 omFreeSize(leadexpv,(N+1)*sizeof(int)); 498 497 } … … 533 532 p>iiAddCproc("","scalePolytope",FALSE,scalePolytope); 534 533 p>iiAddCproc("","dualPolytope",FALSE,dualPolytope); 534 p>iiAddCproc("","mixedVolume",FALSE,mixedVolume); 535 535 /********************************************************/ 536 536 /* the following functions are implemented in bbcone.cc */
Note: See TracChangeset
for help on using the changeset viewer.