17#ifndef LATTICE_ALGS_GUARD
18#define LATTICE_ALGS_GUARD
51 cout << "Check condition on line " \
52 << __LINE__ << " of file " << __FILE__ \
53 << " not satisfied:\n "#X << endl; \
193 ASSERT(&
n.getGrobLat() ==
this);
218 for (
size_t var = 1; var <
a.getYDim(); ++var)
219 if (
a.getY(var) <= 0 &&
b.getY(var) <= 0)
319 const vector<mpz_class>&
getRhs()
const {
330 if (
plane.isPivot(*
this))
332 if (
plane.isFlat(*
this))
358 for (
size_t i = 0;
i < 4; ++
i)
406 return dn == 0 ||
dn == 1 ||
dn == -1;
415 for (
size_t i = 0;
i < 3; ++
i)
448 const vector<mpz_class>&
rhs,
457 vector<vector<SeqPos> >&
right,
467 const vector<vector<SeqPos> >&
right,
484 const vector<SeqPos>& flatSeq);
488 const vector<const Mlfb*>& pivots,
501bool disjointSeqs(
const vector<SeqPos>&
a,
const vector<SeqPos>&
b);
509 const vector<SeqPos>& flatSeq);
void checkFlatSeq(const vector< SeqPos > &flatSeq, const GrobLat &lat, const Plane &plane)
void checkGraphOnPlane(const Plane &plane, const vector< Mlfb > &mlfbs)
void checkPlanes(const vector< TriPlane > &thinPlanes, const vector< Plane > &dtPlanes)
void checkMlfbs(const vector< Mlfb > &mlfbs, const GrobLat &lat)
bool disjointSeqs(const vector< SeqPos > &a, const vector< SeqPos > &b)
void computePivotSeqs(vector< vector< SeqPos > > &seqs, const Mlfb &pivot, const Plane &plane)
Starting at pivot (which must be a pivot), follow the three non-flat sequences starting at pivot.
void checkSeqs(const vector< vector< SeqPos > > &left, const vector< vector< SeqPos > > &right, const Plane &plane, const vector< Mlfb > &mlfbs)
void computeSeqs(vector< vector< SeqPos > > &left, vector< vector< SeqPos > > &right, const vector< Mlfb > &mlfbs, const Plane &plane)
size_t pushOutFacetZero(const vector< mpz_class > &rhs, const GrobLat &lat)
char getPlaceCode(NeighborPlace place)
void computeMlfbs(vector< Mlfb > &mlfbs, const GrobLat &lat)
void computePivots(vector< const Mlfb * > &pivots, const vector< Mlfb > &mlfbs, const Plane &plane, const vector< SeqPos > &flatSeq)
Put all pivots into pivots.
void checkGraph(const vector< Mlfb > &mlfbs)
void checkMiddle(const Plane &plane, const vector< Mlfb > &mlfbs)
mpq_class getIndexSum(const vector< Mlfb > &mlfbs)
void checkDoubleTriangle(const Plane &plane, const vector< Mlfb > &mlfbs)
void computePlanes(vector< Plane > &planes, const GrobLat &lat, vector< Mlfb > &mlfbs)
const char * getEdgePos(size_t index)
void checkDoubleTrianglePlanes(const vector< Plane > &planes, const GrobLat &lat, const vector< Mlfb > &mlfbs)
size_t pushOutFacetPositive(size_t facetPushOut, const vector< mpz_class > &rhs, const GrobLat &lat)
void getThinPlanes(vector< TriPlane > &planes, const GrobLat &lat)
void checkNonSums(const GrobLat &lat)
void checkPlane(const Plane &plane, const vector< Mlfb > &mlfbs)
void setupPlaneCountsAndOrder(vector< Mlfb > &mlfbs, const Plane &plane, map< size_t, size_t > &typeCounts)
Set the plane vertex count for each mlfb and count how many MLFBs have each possible number of vertic...
void checkPlaneTri(const GrobLat &lat, const vector< Mlfb > &mlfbs, const vector< const Mlfb * > &pivots, const Plane &plane)
void checkPivotSeqs(vector< vector< SeqPos > > &pivotSeqs, const Plane &plane, const vector< Mlfb > &mlfbs, const vector< SeqPos > &flatSeq)
Perform checks where pivotSeqs are the 3 non-flat sequences on one side.
void nullSpace(Matrix &basis, const Matrix &matParam)
Sets the columns of basis to a basis of the null space of mat.
void transpose(Matrix &trans, const Matrix &mat)
Sets trans to the transpose of mat.
void nameFactoryRegister(NameFactory< AbstractProduct > &factory)
Registers the string returned by ConcreteProduct::getStaticName() to a function that default-construc...
A lattice with associated Grobner basis/neighbors.
Neighbor getNeighbor(size_t row) const
Neighbor getSum(size_t a, size_t b) const
const Matrix & getMatrix() const
bool hasZeroEntryY() const
Neighbor getSum(Neighbor a, Neighbor b) const
const SatBinomIdeal & getIdeal() const
bool isPointFreeBody(Neighbor a, Neighbor b, Neighbor c) const
Returns true if the smallest body containing zero, a, b and c has no neighbor in its interior.
size_t getNeighborCount() const
void getInitialIdeal(BigIdeal &ideal) const
bool isInterior(Neighbor a, Neighbor b) const
const Matrix & getYMatrix() const
const vector< Neighbor > & getNonSums() const
bool isSum(Neighbor n) const
const Matrix & getHMatrix() const
vector< Neighbor > _nonSums
const mpq_class & getZero() const
bool isPointFreeBody(Neighbor a, Neighbor b) const
Returns true if the smallest body containing zero, a and b has no neighbor in its interior.
size_t getColCount() const
size_t getRowCount() const
const vector< mpz_class > & getRhs() const
Neighbor getPoint(size_t offset) const
string getName(const Plane &plane) const
bool operator==(const Mlfb &mlfb) const
vector< Neighbor > _points
size_t getFacetOf(const Mlfb &adjacent) const
vector< size_t > edgeHitsFacet
Neighbor getHitsNeighbor(size_t indexParam) const
bool hasPoint(Neighbor n) const
Mlfb * getEdge(size_t indexParam)
void reset(size_t offset, const vector< Neighbor > &points)
size_t getPointCount() const
bool isParallelogram() const
const Mlfb * getEdge(size_t indexParam) const
size_t getMinInitialFacet() const
size_t getHitsFacet(size_t indexParam) const
const mpq_class & getH(size_t i) const
const mpq_class & getY(size_t i) const
const GrobLat & getGrobLat() const
Neighbor & operator=(const Neighbor &neighbor)
bool operator==(const Neighbor &neighbor) const
bool isFlat(const Mlfb &mlfb) const
vector< NeighborPlace > neighborPlace
bool isPivot(const Mlfb &mlfb) const
Plane(Neighbor a, Neighbor b, Neighbor sum, const vector< Mlfb > &mlfbs, const GrobLat &lat)
bool is22(const Mlfb &mlfb) const
NeighborPlace getPlace(Neighbor neighbor) const
map< size_t, size_t > typeCounts
vector< const Mlfb * > pivots
size_t getTypeCount(size_t type) const
bool isSidePivot(const Mlfb &mlfb) const
size_t getMaxType() const
bool inPlane(Neighbor neighbor) const
size_t getType(const Mlfb &mlfb) const
Represents a saturated binomial ideal.
bool isPointFreeBody(const vector< mpz_class > &a, const vector< mpz_class > &b) const
Returns true if the smallest body containing zero, a and b has no generator in its interior.
size_t getVarCount() const
const vector< mpz_class > & getGenerator(size_t index) const
bool hasZeroEntry() const
Returns true if any generator does not involve every variable, i.e.
void getInitialIdeal(BigIdeal &ideal) const
mpz_class dotNormal(Neighbor a) const
bool inPlane(Neighbor a) const
bool closeToPlane(Neighbor a)
bool isParallel(const TriPlane &plane) const
const Matrix & getNormal() const
returns the normal of the plane as the row of a matrix.
TriPlane(Neighbor a, Neighbor b, Neighbor c)
bool isParallel(const Plane &plane) const
vector< const Mlfb * > _bSideMlfbs
const vector< const Mlfb * > & getASideMlfbs() const
const vector< Neighbor > & getNeighborsInInterior() const
vector< Neighbor > _interior
const vector< Neighbor > & getNeighborsOnBoundary() const
const vector< const Mlfb * > & getBSideMlfbs() const
vector< Neighbor > _boundary
vector< const Mlfb * > _aSideMlfbs
SeqPos getReverse() const
bool operator<(const SeqPos &pos) const
size_t getForwardFacet() const
size_t getBackFacet() const