Frobby  0.9.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
HilbertSlice Class Reference

#include <HilbertSlice.h>

Inheritance diagram for HilbertSlice:
Slice Task

Public Member Functions

 HilbertSlice (HilbertStrategy &strategy)
 
 HilbertSlice (HilbertStrategy &strategy, const Ideal &ideal, const Ideal &subtract, const Term &multiply, CoefTermConsumer *consumer)
 
CoefTermConsumergetConsumer ()
 
virtual bool baseCase (bool simplified)
 Returns true if this slice is a base case slice, and in that case produces output in a derivative-specific way. More...
 
virtual Sliceoperator= (const Slice &slice)
 Performs a deep copy of slice into this object. More...
 
virtual bool simplifyStep ()
 Like simplify(), except that only one simplification step is performed. More...
 
void setToProjOf (const Slice &slice, const Projection &projection, CoefTermConsumer *consumer)
 
void swap (HilbertSlice &slice)
 
- Public Member Functions inherited from Slice
 Slice (SliceStrategy &strategy)
 Construct the slice $(\ideal 0, \ideal 0, 1)$ in a ring of zero variables. More...
 
 Slice (SliceStrategy &strategy, const Ideal &ideal, const Ideal &subtract, const Term &multiply)
 Construct the slice $(\codeVar{ideal}, \codeVar{subtract}, \codeVar{multiply})$. More...
 
virtual ~Slice ()
 
size_t getVarCount () const
 Returns the number of variables in the ambient ring. More...
 
const IdealgetIdeal () const
 Returns $I$ for a slice $(I,S,q)$. More...
 
IdealgetSubtract ()
 Returns $S$ for a slice $(I,S,q)$. More...
 
const IdealgetSubtract () const
 Returns $S$ for a slice $(I,S,q)$. More...
 
TermgetMultiply ()
 Returns $q$ for a slice $(I,S,q)$. More...
 
const TermgetMultiply () const
 Returns $q$ for a slice $(I,S,q)$. More...
 
const TermgetLcm () const
 Returns the least common multiple of the generators of getIdeal(). More...
 
void print (FILE *file) const
 Write a text representation of this object to file in a format appropriate for debugging. More...
 
void resetAndSetVarCount (size_t varCount)
 Resets this slice to $(\ideal 0, \ideal 0, 1)$ in an ambient polynomial ring of varCount variables. More...
 
void clearIdealAndSubtract ()
 Clears getIdeal() and getSubtract() and does not change getMultiply(). More...
 
void singleDegreeSortIdeal (size_t var)
 Calls Ideal::singleDegreeSort on getIdeal(). More...
 
virtual bool innerSlice (const Term &pivot)
 Sets this object to the inner slice according to pivot. More...
 
virtual void outerSlice (const Term &pivot)
 Sets this object to the outer slice according to pivot. More...
 
bool normalize ()
 Removes those generators of getIdeal() that are strictly divisible by some generator of getSubtract(). More...
 
bool adjustMultiply ()
 Ensure that for each var, var appears to the first power in some generator of getIdeal(). More...
 
virtual bool simplify ()
 Simplifies this object such that it may become simpler without changing the content. More...
 
virtual void run (TaskEngine &tasks)
 Does whatever work this task represents. More...
 
virtual void dispose ()
 Called when the task is no longer used but run has not and will not be called. More...
 
- Public Member Functions inherited from Task
virtual ~Task ()
 

Private Member Functions

virtual bool getLowerBound (Term &bound, size_t var) const
 Calculates a lower bound that depends on var. More...
 

Private Attributes

CoefTermConsumer_consumer
 

Additional Inherited Members

- Protected Member Functions inherited from Slice
void setToProjOf (const Slice &slice, const Projection &projection)
 Set this object to be the projection of slice according to projection. More...
 
void swap (Slice &slice)
 Simultaneously set the value of this object to that of slice and vice versa. More...
 
bool pruneSubtract ()
 Removes those generators of subtract that do not strictly divide the lcm of getIdeal(), or that belong to getIdeal(). More...
 
bool applyLowerBound ()
 Calculates a lower bound on the content of the slice using getLowerBound() and calls innerSlice with that lower bound. More...
 
- Protected Attributes inherited from Slice
Ideal _ideal
 The $I$ of a slice $(I,S,q)$. More...
 
Ideal _subtract
 The $S$ of a slice $(I,S,q)$. More...
 
Term _multiply
 The $q$ of a slice $(I,S,q)$. More...
 
size_t _varCount
 The number of variables in the ambient polynomial ring. More...
 
Term _lcm
 The lcm of getIdeal() if _lcmUpdated is true, and otherwise the value is undefind. More...
 
bool _lcmUpdated
 Indicates whether _lcm is correct. More...
 
size_t _lowerBoundHint
 A hint that starting simplification through a lower bound at the variable indicated by _lowerBoundHint is likely to yield a simplification, or at least more likely than a random other variable. More...
 
SliceStrategy_strategy
 

Detailed Description

Definition at line 27 of file HilbertSlice.h.

Constructor & Destructor Documentation

◆ HilbertSlice() [1/2]

HilbertSlice::HilbertSlice ( HilbertStrategy strategy)

Definition at line 24 of file HilbertSlice.cpp.

◆ HilbertSlice() [2/2]

HilbertSlice::HilbertSlice ( HilbertStrategy strategy,
const Ideal ideal,
const Ideal subtract,
const Term multiply,
CoefTermConsumer consumer 
)

Definition at line 29 of file HilbertSlice.cpp.

Member Function Documentation

◆ baseCase()

bool HilbertSlice::baseCase ( bool  simplified)
virtual

Returns true if this slice is a base case slice, and in that case produces output in a derivative-specific way.

If simplified is true, then the slice must be fully simplified when calling baseCase(), while otherwise there is no such requirement.

Implements Slice.

Definition at line 37 of file HilbertSlice.cpp.

◆ getConsumer()

CoefTermConsumer* HilbertSlice::getConsumer ( )
inline

Definition at line 36 of file HilbertSlice.h.

◆ getLowerBound()

bool HilbertSlice::getLowerBound ( Term bound,
size_t  var 
) const
privatevirtual

Calculates a lower bound that depends on var.

To be precise, the lower bound that is calculated is

\[ \frac{1}{x_i}\gcd(\min(I)\cap\ideal{x_i}) \]

where $i$ is var. Note that the real functionality is slightly more sophisticated. Returns false and does not set bound if a base case is detected (a base case is not guaranteed to be detected).

Todo:

rename lower bound to divisor.

describe how the real functionality is slightly more sophisticated.

Implements Slice.

Definition at line 95 of file HilbertSlice.cpp.

◆ operator=()

Slice & HilbertSlice::operator= ( const Slice slice)
virtual

Performs a deep copy of slice into this object.

Implements Slice.

Definition at line 65 of file HilbertSlice.cpp.

◆ setToProjOf()

void HilbertSlice::setToProjOf ( const Slice slice,
const Projection projection,
CoefTermConsumer consumer 
)

Definition at line 81 of file HilbertSlice.cpp.

◆ simplifyStep()

bool HilbertSlice::simplifyStep ( )
virtual

Like simplify(), except that only one simplification step is performed.

If the return value is true, then the Slice may not be fully simplified yet. Iterating simplifyStep() has the same result as calling simplify(), though the performance characteristics can be worse.

Todo:
Is this method actually used, and does it return true iff this object changed?

Implements Slice.

Definition at line 73 of file HilbertSlice.cpp.

◆ swap()

void HilbertSlice::swap ( HilbertSlice slice)

Definition at line 90 of file HilbertSlice.cpp.

Member Data Documentation

◆ _consumer

CoefTermConsumer* HilbertSlice::_consumer
private

Definition at line 59 of file HilbertSlice.h.


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