Macaulay2 Engine
Loading...
Searching...
No Matches
monideal-minprimes.hpp
Go to the documentation of this file.
1
6
7// (c) 1994-2005 Michael E. Stillman
8#ifndef _monideal_minprimes_h_
9#define _monideal_minprimes_h_
10
46
47#include "monideal.hpp"
48
50// A class which enables one to compute the codimension and
51// associated primes of minimal codimension, of a monomial ideal.
52{
55 int nvars;
56
57 MonomialIdeal *mi; // A radical monomial ideal
58
60 VECTOR(Bag *) Q; // Each monomial corresponds to a potential prime monomial
61 // ideal: a monomial is the product of the gens of
62 // the prime ideal.
63 int codim_limit; // only consider monomial primes of codim <= this number.
64 int minprime_limit; // -1 means find all. >= 1 means stop after that number
65 int n_minprimes; // number found so far, during associated_primes computation
67
68 int depth_limit; // -codim_limit-1
71 int *monoms;
72
73 void alg1_grab_prime(int depth);
74 void alg1_min_prime_generator(int *which, int depth);
75
76 void ass_prime_generator(Nmi_node *p, int codim);
77
78 public:
79 MinimalPrimes(const MonomialIdeal *const &mi);
80
82
83 int codimension();
84
86
87 MonomialIdeal *alg1_min_primes(int maxcodim, int count);
88
89 MonomialIdeal *min_primes(int maxcodim, int count);
90 // maxcodim == nvars means get all of them
91 // count == -1 means no limit
92 // return value: A monomial ideal where each
93 // monomial prime ideal is represented as a
94 // monomial: the product of the generators.
95 // NOTE: this is the complement of the gens from
96 // max_indep_sets
97
99
100 public:
101 // Static routines:
102 static int codimension(const MonomialIdeal *I);
103
105 int maxcodim,
106 int count);
107
108 static MonomialIdeal *max_indep_sets(const MonomialIdeal *I, int count);
109};
110
111#endif
112
113// Local Variables:
114// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
115// indent-tabs-mode: nil
116// End:
exponents::Exponents exponents_t
VECTOR(Bag *) Q
void ass_prime_generator(Nmi_node *p, int codim)
MonomialIdeal * primes
static MonomialIdeal * max_indep_sets(const MonomialIdeal *I, int count)
MinimalPrimes(const MonomialIdeal *const &mi)
MonomialIdeal * mi
MonomialIdeal * max_indep_sets(int count)
MonomialIdeal * associated_primes(int count)
void alg1_grab_prime(int depth)
MonomialIdeal * alg1_min_primes(int maxcodim, int count)
void alg1_min_prime_generator(int *which, int depth)
static MonomialIdeal * min_primes(const MonomialIdeal *I, int maxcodim, int count)
static int codimension(const MonomialIdeal *I)
MonomialIdeal * min_primes(int maxcodim, int count)
Engine-side monomial ideal: a decision tree of Nmi_nodes storing the (typically minimal) generators b...
Definition monideal.hpp:136
Internal tree node of the MonomialIdeal decision tree.
Definition monideal.hpp:74
int p
int_bag Bag
Definition int-bag.hpp:70
MonomialIdeal — exponent-vector-only representation of an ideal generated by monomials.
static gmp_randstate_t state
Definition random.cpp:18