My Project
Loading...
Searching...
No Matches
Functions | Variables
bbpolytope.h File Reference
#include "kernel/mod2.h"
#include "Singular/ipid.h"
#include "gfanlib/gfanlib.h"

Go to the source code of this file.

Functions

void bbpolytope_setup (SModulFunctions *p)
 
bigintmatgetFacetNormals (gfan::ZCone *zc)
 
int getAmbientDimension (gfan::ZCone *zc)
 
int getCodimension (gfan::ZCone *zc)
 
int getDimension (gfan::ZCone *zc)
 
gfan::ZVector intStar2ZVectorWithLeadingOne (const int d, const int *i)
 

Variables

EXTERN_VAR int polytopeID
 

Function Documentation

◆ bbpolytope_setup()

void bbpolytope_setup ( SModulFunctions p)

Definition at line 549 of file bbpolytope.cc.

550{
551 blackbox *b=(blackbox*)omAlloc0(sizeof(blackbox));
552 // all undefined entries will be set to default in setBlackboxStuff
553 // the default Print is quite usefule,
554 // all other are simply error messages
555 b->blackbox_destroy=bbpolytope_destroy;
556 b->blackbox_String=bbpolytope_String;
557 //b->blackbox_Print=blackbox_default_Print;
558 b->blackbox_Init=bbpolytope_Init;
559 b->blackbox_Copy=bbpolytope_Copy;
560 b->blackbox_Assign=bbpolytope_Assign;
561 p->iiAddCproc("gfan.lib","polytopeViaPoints",FALSE,polytopeViaVertices);
562 p->iiAddCproc("gfan.lib","polytopeViaInequalities",FALSE,polytopeViaNormals);
563 p->iiAddCproc("gfan.lib","vertices",FALSE,vertices);
564 p->iiAddCproc("gfan.lib","newtonPolytope",FALSE,newtonPolytope);
565 p->iiAddCproc("gfan.lib","scalePolytope",FALSE,scalePolytope);
566 p->iiAddCproc("gfan.lib","dualPolytope",FALSE,dualPolytope);
567 p->iiAddCproc("gfan.lib","mixedVolume",FALSE,mixedVolume);
568 /********************************************************/
569 /* the following functions are implemented in bbcone.cc */
570 // iiAddCproc("gfan.lib","getAmbientDimension",FALSE,getAmbientDimension);
571 // iiAddCproc("gfan.lib","getCodimension",FALSE,getAmbientDimension);
572 // iiAddCproc("gfan.lib","getDimension",FALSE,getDimension);
573 /********************************************************/
574 /* the following functions are identical to those in bbcone.cc */
575 // iiAddCproc("gfan.lib","facets",FALSE,facets);
576 // iiAddCproc("gfan.lib","setLinearForms",FALSE,setLinearForms);
577 // iiAddCproc("gfan.lib","getLinearForms",FALSE,getLinearForms);
578 // iiAddCproc("gfan.lib","setMultiplicity",FALSE,setMultiplicity);
579 // iiAddCproc("gfan.lib","getMultiplicity",FALSE,getMultiplicity);
580 // iiAddCproc("gfan.lib","hasFace",FALSE,hasFace);
581 /***************************************************************/
582 // iiAddCproc("gfan.lib","getEquations",FALSE,getEquations);
583 // iiAddCproc("gfan.lib","getInequalities",FALSE,getInequalities);
584 polytopeID=setBlackboxStuff(b,"polytope");
585 //Print("created type %d (polytope)\n",polytopeID);
586}
#define FALSE
Definition: auxiliary.h:96
BOOLEAN polytopeViaVertices(leftv res, leftv args)
Definition: bbpolytope.cc:184
void bbpolytope_destroy(blackbox *, void *d)
Definition: bbpolytope.cc:101
char * bbpolytope_String(blackbox *, void *d)
Definition: bbpolytope.cc:91
BOOLEAN polytopeViaNormals(leftv res, leftv args)
Definition: bbpolytope.cc:330
BOOLEAN dualPolytope(leftv res, leftv args)
Definition: bbpolytope.cc:472
BOOLEAN scalePolytope(leftv res, leftv args)
Definition: bbpolytope.cc:445
VAR int polytopeID
Definition: bbpolytope.cc:16
void * bbpolytope_Init(blackbox *)
Definition: bbpolytope.cc:32
BOOLEAN bbpolytope_Assign(leftv l, leftv r)
Definition: bbpolytope.cc:37
BOOLEAN mixedVolume(leftv res, leftv args)
Definition: bbpolytope.cc:489
gfan::ZCone newtonPolytope(poly p, ring r)
Definition: bbpolytope.cc:412
BOOLEAN vertices(leftv res, leftv args)
Definition: bbpolytope.cc:369
void * bbpolytope_Copy(blackbox *, void *d)
Definition: bbpolytope.cc:110
int setBlackboxStuff(blackbox *bb, const char *n)
define a new type
Definition: blackbox.cc:142
int p
Definition: cfModGcd.cc:4078
CanonicalForm b
Definition: cfModGcd.cc:4103
#define omAlloc0(size)
Definition: omAllocDecl.h:211

◆ getAmbientDimension()

int getAmbientDimension ( gfan::ZCone *  zc)

Definition at line 386 of file bbpolytope.cc.

387{ // hence ambientDimension-1
388 return zc->ambientDimension()-1;
389}

◆ getCodimension()

int getCodimension ( gfan::ZCone *  zc)

Definition at line 391 of file bbpolytope.cc.

392{
393 return zc->codimension();
394}

◆ getDimension()

int getDimension ( gfan::ZCone *  zc)

Definition at line 396 of file bbpolytope.cc.

397{
398 return zc->dimension()-1;
399}

◆ getFacetNormals()

bigintmat * getFacetNormals ( gfan::ZCone *  zc)

◆ intStar2ZVectorWithLeadingOne()

gfan::ZVector intStar2ZVectorWithLeadingOne ( const int  d,
const int *  i 
)

Definition at line 401 of file bbpolytope.cc.

402{
403 gfan::ZVector zv(d+1);
404 zv[0]=1;
405 for(int j=1; j<=d; j++)
406 {
407 zv[j]=i[j];
408 }
409 return zv;
410}
int i
Definition: cfEzgcd.cc:132
int j
Definition: facHensel.cc:110

Variable Documentation

◆ polytopeID

EXTERN_VAR int polytopeID

Definition at line 11 of file bbpolytope.h.