12 #include <gfanlib/gfanlib_zfan.h>
35 static gfan::ZFan*
toZFan(std::set<gfan::ZCone> maxCones)
37 std::set<gfan::ZCone>::iterator sigma = maxCones.begin();
38 gfan::ZFan* zf =
new gfan::ZFan(sigma->ambientDimension());
39 for (; sigma!=maxCones.end(); sigma++)
66 catch (
const std::exception& ex)
68 Werror(
"ERROR: %s",ex.what());
78 number
p = (number) v->
Data();
82 poly gStart = startingIdeal->m[0];
83 std::set<gfan::ZCone> maxCones =
tropicalVariety(gStart,startingRing,¤tStrategy);
90 catch (
const std::exception& ex)
92 Werror(
"ERROR: %s",ex.what());
116 catch (
const std::exception& ex)
118 Werror(
"ERROR: %s",ex.what());
126 number
p = (number) v->
Data();
130 poly gStart = startingIdeal->m[0];
131 std::set<gfan::ZCone> maxCones =
tropicalVariety(gStart,startingRing,¤tStrategy);
136 catch (
const std::exception& ex)
138 Werror(
"ERROR: %s",ex.what());
157 res->
data = (
char*) tropI;
162 catch (
const std::exception& ex)
164 Werror(
"ERROR: %s",ex.what());
172 number
p = (number) v->
Data();
181 res->
data = (
char*) tropI;
185 catch (
const std::exception& ex)
187 Werror(
"ERROR: %s",ex.what());
193 WerrorS(
"tropicalVariety: unexpected parameters");
Class used for (list of) interpreter objects.
static void setOptionRedSB()
ideal id_Copy(ideal h1, const ring r)
void id_Delete(ideal *h, ring r)
static gfan::ZFan * toZFan(std::set< gfan::ZCone > maxCones)
void WerrorS(const char *s)
ring getStartingRing() const
returns the polynomial ring over the valuation ring
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
#define SI_RESTORE_OPT(A, B)
ideal gfanlib_kStd_wrapper(ideal I, ring r, tHomog h=testHomog)
ideal getStartingIdeal() const
returns the input ideal
BOOLEAN tropicalVariety(leftv res, leftv args)
ideal idInit(int idsize, int rank)
const Variable & v
< [in] a sqrfree bivariate poly
implementation of the class groebnerCone
#define SI_SAVE_OPT(A, B)
static int idSize(const ideal id)
Count the effective size of an ideal (without the trailing allocated zero-elements) ...
static void undoSetOptionRedSB()
void Werror(const char *fmt,...)