Gröbner basis project
Codebase for research into Gröbner basis computation
Monomial_Ideal Class Reference

A class for monomial ideals. More...

#include <monomial_ideal.hpp>

Public Member Functions

Construction
 Monomial_Ideal (NVAR_TYPE nvars)
 Creates a zero ideal.
 
 Monomial_Ideal (NVAR_TYPE nvars, const list< Monomial > &G, const Dense_Univariate_Integer_Polynomial *h_old=nullptr, const WT_TYPE *h_grading=nullptr)
 Copies basis. If you supply a Hilbert function that is not computed according to the standard grading, please supply the grading as h_grading .
 
 Monomial_Ideal (NVAR_TYPE nvars, const vector< Monomial > &G, const Dense_Univariate_Integer_Polynomial *h_old=nullptr, const WT_TYPE *h_grading=nullptr)
 Copies basis. If you supply a Hilbert function that is not computed according to the standard grading, please supply the grading as h_grading .
 
 Monomial_Ideal (const Monomial_Ideal &I)
 copy constructor
 
Destruction
 ~Monomial_Ideal ()
 destroys the Hilbert data, but not the grading.
 
Basic properties

The following functions give information about the ideal, but do not modify it.

NVAR_TYPE number_of_variables () const
 number of variables in each Monomial
 
unsigned size () const
 number of generators
 
const list< Monomial > & generators () const
 returns the list of generators
 
unsigned dimension ()
 returns the dimension of the ideal
 
Dense_Univariate_Integer_Polynomialhilbert_numerator (const WT_TYPE *grading=nullptr)
 the (un-reduced) Hilbert numerator More...
 
Dense_Univariate_Integer_Polynomialreduced_hilbert_numerator (const WT_TYPE *grading=nullptr)
 the reduced Hilbert Numerator More...
 
Dense_Univariate_Rational_Polynomialhilbert_poly ()
 the Hilbert Polynomial for this ideal More...
 
Computation
Monomial_Idealcolon (const Monomial &t) const
 returns the ideal \(J=\{u:t \forall u\in I\}\), where \(I\) is this More...
 
void colon_with (const Monomial &t)
 replaces the generators of this with those of the ideal \(J=\{u:t \forall u\in I\}\), where \(I\) is this More...
 
Modification
void add_generator (const Monomial &t)
 adds t to the basis
 
void remove_newest ()
 removes the newest monomial from the basis
 
void forget_hilbert_numerator ()
 sets numerator to nullptr
 
void set_hilbert_numerator (Dense_Univariate_Integer_Polynomial *h)
 sets numerator to given value; only use when you know this is true!
 

Protected Attributes

const WT_TYPE * current_grading
 the most recent grading for the Hilbert functions; nullptr implies standard grading
 
list< Monomialgens
 the ideal's generators
 
Dense_Univariate_Integer_PolynomialhGradNum
 the ideal's Hilbert numerator, according to current_grading
 
Dense_Univariate_Integer_PolynomialhGradRedNum
 the ideal's reduced Hilbert numerator, according to current_grading
 
Dense_Univariate_Integer_PolynomialhNum
 the ideal's Hilbert numerator, standard grading
 
Dense_Univariate_Rational_PolynomialhPol
 the ideal's Hilbert polynomial – standard grading only
 
Dense_Univariate_Integer_PolynomialhRedNum
 the ideal's reduced Hilbert numerator, standard grading
 
NVAR_TYPE n
 number of variables the monomials of this ideal have
 

Friends

I/O
ostream & operator<< (ostream &, const Monomial_Ideal &)
 

Detailed Description

A class for monomial ideals.

Author
John Perry
Date
2016

Mostly a convenience class to encapsulate basic operations. I am in the process of moving some functions outside this class into it.

Definition at line 53 of file monomial_ideal.hpp.

Member Function Documentation

◆ colon()

Monomial_Ideal* Monomial_Ideal::colon ( const Monomial t) const
inline

returns the ideal \(J=\{u:t \forall u\in I\}\), where \(I\) is this

This does not recompute Hilbert data even if already known. It is probably better to do that explicitly, anyhow.

Definition at line 261 of file monomial_ideal.hpp.

◆ colon_with()

void Monomial_Ideal::colon_with ( const Monomial t)
inline

replaces the generators of this with those of the ideal \(J=\{u:t \forall u\in I\}\), where \(I\) is this

Warning
does not delete the old Hilbert numerator (as this could be a copy) so delete manually if you need that done

Definition at line 270 of file monomial_ideal.hpp.

◆ hilbert_numerator()

Dense_Univariate_Integer_Polynomial* Monomial_Ideal::hilbert_numerator ( const WT_TYPE *  grading = nullptr)
inline

the (un-reduced) Hilbert numerator

Parameters
gradinggrading to use for computing this; use nullptr for standard, which is the default
Warning
Destroys the old Hilbert numerator if it was assigned a different grading. The comparison is by pointer only, not by values.

Definition at line 178 of file monomial_ideal.hpp.

◆ hilbert_poly()

Dense_Univariate_Rational_Polynomial* Monomial_Ideal::hilbert_poly ( )
inline

the Hilbert Polynomial for this ideal

A “Hilbert Polynomial” does not exist in the non-standard graded case, so there is no option to supply a grading here, and if the Hilbert numerators have been computed for a different grading, this function re-computes them for the standard grading, without however losing the ones computed for the non-standard grading.

Definition at line 237 of file monomial_ideal.hpp.

◆ reduced_hilbert_numerator()

Dense_Univariate_Integer_Polynomial* Monomial_Ideal::reduced_hilbert_numerator ( const WT_TYPE *  grading = nullptr)
inline

the reduced Hilbert Numerator

Parameters
gradinggrading to use for computing this; use nullptr for standard, which is the default

Definition at line 206 of file monomial_ideal.hpp.


The documentation for this class was generated from the following file: