Macaulay2 Engine
Loading...
Searching...
No Matches

◆ find_pivot()

int find_pivot ( const MonomialIdeal & I,
int & npure,
exponents_t pure,
gc_vector< int > & m )
static

Definition at line 236 of file hilb.cpp.

245{
246 int nhits;
247 int exp_of_v;
249 int v = popular_var(I, npure, pure, nhits, vp, exp_of_v);
250
251 // The following will take some tweaking...
252 // Some possibilities: take just this variable, take gcd of 2 or 3
253 // elements containing this variable (choose first 3, last 3, or randomly).
254
255 // For now, let's just take this variable, if there is more than one
256 // non pure power.
257 if (npure >= I.size() - 1)
258 {
259 assert(vp != NULL);
260 varpower::copy(vp, m);
261 return 0;
262 }
263 varpower::var(v, exp_of_v, m);
264 return 1;
265}
varpower::ConstExponents const_varpower
static void copy(ConstExponents vp, Vector &result)
static void var(Exponent v, Exponent e, Vector &result)
int size() const
Definition monideal.hpp:186
static int popular_var(const MonomialIdeal &I, int &npure, exponents_t pure, int &nhits, const_varpower &non_pure_power, int &exp_of_popular)
Definition hilb.cpp:172

References ExponentList< int, true >::copy(), popular_var(), MonomialIdeal::size(), and ExponentList< int, true >::var().

Referenced by hilb_comp::do_ideal().