44 return Matrix::make(I);
61 o <<
"[unprintable monomial ideal]";
105 ERROR(
"expected ideals in the same ring");
144 ERROR(
"expected ideals in the same ring");
183 ERROR(
"expected ideals in the same ring");
317 for (
int i = 0; i <
nv; i++)
318 exp[i] =
static_cast<int>(mpz_get_si(
323 fprintf(stderr,
"got ");
324 for (
int j = 0; j <
nv; j++) fprintf(stderr,
"%d ",
exp[j]);
325 fprintf(stderr,
"\n");
330 J->insert_minimal(b);
345 if (
M2_gbTrace >= 4) fprintf(stderr,
"adding ");
346 for (
int j = 0; j < nv; j++)
348 if (
M2_gbTrace >= 4) fprintf(stderr,
"%d ", exp[j]);
349 F.addExponent(exp[j]);
356 Frobby::alexanderDual(F, topvec, M);
375 mpz_t *topvec =
nullptr;
379 for (
int i = 0; i < top->len; i++)
380 mpz_init_set_si(topvec[i], top->array[i]);
386 if (topvec !=
nullptr)
388 for (
int i = 0; i < top->len; i++) mpz_clear(topvec[i]);
Variable-length sparse (variable, exponent) encoding of monomials.
exponents::Exponents exponents_t
AssociatedPrimes — codimension and minimal-codimension associated primes of a monomial ideal.
Append-only GC-backed byte buffer used throughout the engine for text output.
MonomialIdeal * associated_primes(int count)
Engine-side immutable monomial value type wrapping a varpower- encoded exponent vector.
unsigned int hash() const
static void from_expvector(int n, exponents::ConstExponents a, Vector &result)
static void to_expvector(int n, ConstExponents a, exponents::Exponents result)
MonomialIdeal * make_monideal(int n, bool use_only_monomials_with_unit_coeffs=false) const
MonomialIdeal * alg1_min_primes(int maxcodim, int count)
MonomialIdeal * erase(const_varpower m) const
bool is_equal(const MonomialIdeal &mi) const
MonomialIdeal * quotient(const_varpower m) const
MonomialIdeal * sat(const MonomialIdeal &J) const
void text_out(buffer &o) const
MonomialIdeal * intersect(const_varpower m) const
MonomialIdeal * borel() const
MonomialIdeal * alexander_dual(const M2_arrayint a) const
const PolynomialRing * get_ring() const
MonomialIdeal * radical() const
Engine-side monomial ideal: a decision tree of Nmi_nodes storing the (typically minimal) generators b...
MyIdealConsumer(const PolynomialRing *R, int nv0)
virtual void consume(mpz_ptr *exponentVector)
Frobby::IdealConsumer adapter that collects Frobby's output monomials into an engine MonomialIdeal.
Abstract base for the engine's polynomial-ring hierarchy.
Front-end-visible "ring element" value: an engine ring_elem paired with the Ring* that gives it meani...
static RingElement * hilbertNumerator(const Matrix *M)
gc_vector< int > & monom()
Debugger-callable d* helpers that pretty-print engine values to stderr.
void INTERNAL_ERROR(const char *s,...)
Engine error-reporting primitives: ERROR, INTERNAL_ERROR, error, error_message.
namespace exc — internal C++ exception types and the TRY / CATCH macro pair.
void intern_monideal(MonomialIdeal *G)
intern_* helpers that register long-lived engine objects with bdwgc finalisers.
Hilbert-series numerator via the Bigatti-Caboara-Robbiano recursion.
int_bag / Bag — minimal (payload, varpower monomial) carrier shared by monomial-ideal code.
VALGRIND_MAKE_MEM_DEFINED & result(result)
Matrix — the engine's immutable homomorphism F -> G between free modules.
MinimalPrimes — minimal primes of a MonomialIdeal via a two-phase state machine.
MonomialIdeal — exponent-vector-only representation of an ideal generated by monomials.
M2_string IM2_MonomialIdeal_to_string(const MonomialIdeal *I)
static MonomialIdeal * wrapperFrobbyAlexanderDual(const MonomialIdeal *I, const M2_arrayint top)
const MonomialIdeal * rawSaturateMonomialIdeal2(const MonomialIdeal *I, const MonomialIdeal *J)
const MonomialIdeal * rawColonMonomialIdeal2(const MonomialIdeal *I, const MonomialIdeal *J)
int IM2_MonomialIdeal_codim(const MonomialIdeal *I)
M2_arrayint rawMonomialIdealLCM(const MonomialIdeal *I)
const MonomialIdeal * rawMonomialMinimalPrimes(const MonomialIdeal *I, int codim_limit, int count)
int IM2_MonomialIdeal_n_gens(const MonomialIdeal *I)
static MonomialIdeal * alexDual(const MonomialIdeal *I, const M2_arrayint top, int strategy)
M2_bool IM2_MonomialIdeal_is_borel(const MonomialIdeal *I)
static MonomialIdeal * FrobbyAlexanderDual(const MonomialIdeal *I, const mpz_t *topvec)
const MonomialIdeal * rawAlexanderDual(const MonomialIdeal *I, const M2_arrayint top, int strategy)
const MonomialIdeal * rawSaturateMonomialIdeal1(const MonomialIdeal *I, const EngineMonomial *a)
const MonomialIdeal * rawRadicalMonomialIdeal(const MonomialIdeal *I)
const MonomialIdeal * IM2_MonomialIdeal_borel(const MonomialIdeal *I)
const MonomialIdeal * IM2_MonomialIdeal_intersect(const MonomialIdeal *I, const MonomialIdeal *J)
const MonomialIdeal * rawMaximalIndependentSets(const MonomialIdeal *I, int count)
const MonomialIdeal * rawColonMonomialIdeal1(const MonomialIdeal *I, const EngineMonomial *a)
unsigned int rawMonomialIdealHash(const MonomialIdeal *F)
int IM2_MonomialIdeal_is_equal(const MonomialIdeal *I, const MonomialIdeal *J)
const MonomialIdeal * IM2_MonomialIdeal_make(const Matrix *m, int n)
const RingElement * IM2_MonomialIdeal_Hilbert(const MonomialIdeal *I)
const Matrix * IM2_MonomialIdeal_to_matrix(const MonomialIdeal *I)
Engine-boundary C API for constructing and operating on MonomialIdeals.
EngineMonomial — opaque single-monomial value type used at the engine boundary.
#define newarray_atomic(T, len)
our_new_delete — per-class opt-in routing of new / delete through bdwgc.
void emit_line(const char *s)
Text-formatting helpers layered on buffer: bignum print, line wrapping, M2_gbTrace-gated emit.