MsmSlice Class Reference

Invariant: either the slice is a trivial base case, or removeDoubleLcm returns false. More...

`#include <MsmSlice.h>`

Inheritance diagram for MsmSlice:

## Public Member Functions

| MsmSlice (MsmStrategy &strategy)
| MsmSlice (MsmStrategy &strategy, const Ideal &ideal, const Ideal &subtract, const Term &multiply, TermConsumer *consumer)
TermConsumer * | getConsumer ()
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.
virtual Slice & | operator= (const Slice &slice)
| Performs a deep copy of slice into this object.
virtual bool | simplifyStep ()
| Like simplify(), except that only one simplification step is performed.
void | setToProjOf (const MsmSlice &slice, const Projection &projection, TermConsumer *consumer)
void | swap (MsmSlice &slice)
virtual bool | innerSlice (const Term &pivot)
| Sets this object to the inner slice according to pivot.
virtual void | outerSlice (const Term &pivot)
| Sets this object to the outer slice according to pivot.
Public Member Functions inherited from Slice
| Slice (SliceStrategy &strategy)
| Construct the slice in a ring of zero variables.
| Slice (SliceStrategy &strategy, const Ideal &ideal, const Ideal &subtract, const Term &multiply)
| Construct the slice .
virtual | ~Slice ()
size_t | getVarCount () const
| Returns the number of variables in the ambient ring.
const Ideal & | getIdeal () const
| Returns for a slice .
Ideal & | getSubtract ()
| Returns for a slice .
const Ideal & | getSubtract () const
| Returns for a slice .
Term & | getMultiply ()
| Returns for a slice .
const Term & | getMultiply () const
| Returns for a slice .
const Term & | getLcm () const
| Returns the least common multiple of the generators of getIdeal().
void | print (FILE *file) const
| Write a text representation of this object to file in a format appropriate for debugging.
void | resetAndSetVarCount (size_t varCount)
| Resets this slice to in an ambient polynomial ring of varCount variables.
void | clearIdealAndSubtract ()
| Clears getIdeal() and getSubtract() and does not change getMultiply().
void | singleDegreeSortIdeal (size_t var)
| Calls Ideal::singleDegreeSort on getIdeal().
bool | normalize ()
| Removes those generators of getIdeal() that are strictly divisible by some generator of getSubtract().
bool | adjustMultiply ()
| Ensure that for each var, var appears to the first power in some generator of getIdeal().
virtual bool | simplify ()
| Simplifies this object such that it may become simpler without changing the content.
virtual void | run (TaskEngine &tasks)
| Does whatever work this task represents.
virtual void | dispose ()
| Called when the task is no longer used but run has not and will not be called.
Public Member Functions inherited from Task
virtual | ~Task ()

## Private Member Functions

bool | removeDoubleLcm ()
virtual bool | getLowerBound (Term &bound, size_t var) const
| Calculates a lower bound that depends on var.
void | twoVarBaseCase ()
void | oneMoreGeneratorBaseCase ()
bool | twoNonMaxBaseCase ()

## Private Attributes

TermConsumer * | _consumer

## Additional Inherited Members

void | setToProjOf (const Slice &slice, const Projection &projection)
| Set this object to be the projection of slice according to projection.
void | swap (Slice &slice)
| Simultaneously set the value of this object to that of slice and vice versa.
bool | pruneSubtract ()
| Removes those generators of subtract that do not strictly divide the lcm of getIdeal(), or that belong to getIdeal().
bool | applyLowerBound ()
| Calculates a lower bound on the content of the slice using getLowerBound() and calls innerSlice with that lower bound.
Ideal | _ideal
| The of a slice .
Ideal | _subtract
| The of a slice .
Term | _multiply
| The of a slice .
size_t | _varCount
| The number of variables in the ambient polynomial ring.
Term | _lcm
| The lcm of getIdeal() if _lcmUpdated is true, and otherwise the value is undefind.
bool | _lcmUpdated
| Indicates whether _lcm is correct.
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.
SliceStrategy & | _strategy

## Detailed Description

Invariant: either the slice is a trivial base case, or removeDoubleLcm returns false.

Todo
  expand and check comments.

Definition at line 33 of file MsmSlice.h.

## Constructor & Destructor Documentation

## MsmSlice() [1/2]

MsmSlice::MsmSlice | ( | MsmStrategy & | strategy | ) |

Definition at line 23 of file MsmSlice.cpp.

## MsmSlice() [2/2]

MsmSlice::MsmSlice | ( | MsmStrategy & | strategy,
|  | const Ideal & | ideal,
|  | const Ideal & | subtract,
|  | const Term & | multiply,
|  | TermConsumer * | consumer )

Definition at line 28 of file MsmSlice.cpp.

## Member Function Documentation

## baseCase()

bool MsmSlice::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 40 of file MsmSlice.cpp.

## getConsumer()

TermConsumer * MsmSlice::getConsumer | ( |  | ) |

inline

Definition at line 42 of file MsmSlice.h.

## getLowerBound()

bool MsmSlice::getLowerBound | ( | Term & | bound,
|  | size_t | var ) const

private virtual

Calculates a lower bound that depends on var.

To be precise, the lower bound that is calculated is

where 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 213 of file MsmSlice.cpp.

## innerSlice()

bool MsmSlice::innerSlice | ( | const Term & | pivot | ) |

virtual

Sets this object to the inner slice according to pivot.

To be precise, the slice is replaced by where is the pivot, and the slice is then normalized (see normalize).

Returns true if any of the colon operations and were non-trivial in the sense that it changed the support of any minimal generator.

Reimplemented from Slice.

Definition at line 143 of file MsmSlice.cpp.

## oneMoreGeneratorBaseCase()

void MsmSlice::oneMoreGeneratorBaseCase | ( |  | ) |

private

Definition at line 280 of file MsmSlice.cpp.

## operator=()

Slice & MsmSlice::operator= | ( | const Slice & | slice | ) |

virtual

Performs a deep copy of slice into this object.

Implements Slice.

Definition at line 114 of file MsmSlice.cpp.

## outerSlice()

void MsmSlice::outerSlice | ( | const Term & | pivot | ) |

virtual

Sets this object to the outer slice according to pivot.

To be precise, the slice is replaced by where is the pivot, and the slice is then normalized (see normalize).

Note that if pivot is a pure power, then pivot is not actually inserted into since doing so has no effect on the content after the normalization.

Reimplemented from Slice.

Definition at line 155 of file MsmSlice.cpp.

## removeDoubleLcm()

bool MsmSlice::removeDoubleLcm | ( |  | ) |

private

Definition at line 195 of file MsmSlice.cpp.

## setToProjOf()

void MsmSlice::setToProjOf | ( | const MsmSlice & | slice,
|  | const Projection & | projection,
|  | TermConsumer * | consumer )

Definition at line 134 of file MsmSlice.cpp.

## simplifyStep()

bool MsmSlice::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 122 of file MsmSlice.cpp.

## swap()

void MsmSlice::swap | ( | MsmSlice & | slice | ) |

Definition at line 165 of file MsmSlice.cpp.

## twoNonMaxBaseCase()

bool MsmSlice::twoNonMaxBaseCase | ( |  | ) |

private

Definition at line 343 of file MsmSlice.cpp.

## twoVarBaseCase()

void MsmSlice::twoVarBaseCase | ( |  | ) |

private

Definition at line 244 of file MsmSlice.cpp.

## Member Data Documentation

## _consumer

TermConsumer* MsmSlice::_consumer

private

Definition at line 98 of file MsmSlice.h.

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

- src/MsmSlice.h
- src/MsmSlice.cpp