@@ -180,11 +180,11 @@ static PyObject* CallPythonFuncOnOneArg(PyObject* function, PyObject* single_arg
180180#ifndef NMZ_RELEASE
181181static_assert (
182182 false ,
183- " Your Normaliz version (unknown) is too old! Update to 3.10.3 or newer." );
183+ " Your Normaliz version (unknown) is too old! Update to 3.10.4 or newer." );
184184#endif
185- #if NMZ_RELEASE < 31003
185+ #if NMZ_RELEASE < 31004
186186static_assert (false ,
187- " Your Normaliz version is too old! Update to 3.10.3 or newer." );
187+ " Your Normaliz version is too old! Update to 3.10.4 or newer." );
188188#endif
189189
190190/* **************************************************************************
@@ -1899,6 +1899,9 @@ _NmzResultImpl(Cone< Integer >* C, PyObject* prop_obj, const void* nf = nullptr)
18991899 case libnormaliz::ConeProperty::FusionData:
19001900 return NmzFusionDataToPython (C->getFusionDataMatrix ());
19011901
1902+ case libnormaliz::ConeProperty::InductionMatrices:
1903+ return NmzFusionDataToPython (C->getInductionMatrices ());
1904+
19021905 case libnormaliz::ConeProperty::Incidence:
19031906 return NmzVectorToPyList (C->getIncidence ());
19041907
@@ -2401,6 +2404,45 @@ static PyObject* NmzSetModularGrading(PyObject* self, PyObject* args)
24012404 FUNC_END
24022405}
24032406
2407+ static PyObject* NmzSetChosenFusionRing (PyObject* self, PyObject* args)
2408+ {
2409+
2410+ FUNC_BEGIN
2411+
2412+ PyObject* cone = PyTuple_GetItem (args, 0 );
2413+
2414+ if (!is_cone (cone)) {
2415+ PyErr_SetString (PyNormaliz_cppError, " First argument must be a cone" );
2416+ return NULL ;
2417+ }
2418+
2419+ PyObject* chosen_ring_py = PyTuple_GetItem (args, 1 );
2420+
2421+ TempSignalHandler tmpHandler; // use custom signal handler
2422+
2423+ int overflow;
2424+ long chosen_ring = PyLong_AsLongLongAndOverflow (chosen_ring_py, &overflow);
2425+ if (is_cone_mpz (cone)) {
2426+ Cone< mpz_class >* cone_ptr = get_cone_mpz (cone);
2427+ cone_ptr->setChosenFusionRing (chosen_ring);
2428+ Py_RETURN_TRUE;
2429+ }
2430+ else if (is_cone_long (cone)) {
2431+ Cone< long long >* cone_ptr = get_cone_long (cone);
2432+ cone_ptr->setChosenFusionRing (chosen_ring);
2433+ Py_RETURN_TRUE;
2434+ }
2435+ #ifdef ENFNORMALIZ
2436+ else {
2437+ Cone<renf_elem_class>* cone_ptr = get_cone_renf (cone);
2438+ cone_ptr->setChosenFusionRing (chosen_ring);
2439+ Py_RETURN_TRUE;
2440+ }
2441+ #endif
2442+
2443+ FUNC_END
2444+ }
2445+
24042446static PyObject* NmzSetGBDegreeBound (PyObject* self, PyObject* args)
24052447{
24062448
@@ -3007,7 +3049,9 @@ static PyMethodDef PyNormaliz_cppMethods[] = {
30073049 {" NmzSetFaceCodimBound" , (PyCFunction)NmzSetFaceCodimBound,
30083050 METH_VARARGS, " Sets the maximal codimension for the computed faces" },
30093051 {" NmzSetModularGrading" , (PyCFunction)NmzSetModularGrading,
3010- METH_VARARGS, " Picks a modular grading (counting from 1)" },
3052+ METH_VARARGS, " Sets the maximal codimension for the computed faces" },
3053+ {" NmzSetChosenFusionRing" , (PyCFunction)NmzSetChosenFusionRing,
3054+ METH_VARARGS, " Picks a fusion ring (counting from 1)" },
30113055 {" NmzSetGBDegreeBound" , (PyCFunction)NmzSetGBDegreeBound,
30123056 METH_VARARGS, " Sets the maximal degree for binomials in Gröbner and Markov bases" },
30133057 {" NmzSetGBMinDegree" , (PyCFunction)NmzSetGBMinDegree,
0 commit comments