LatticeAlgs.h
Go to the documentation of this file.
/* Frobby: Software for monomial ideal computations.
Copyright (C) 2011 Bjarke Hammersholt Roune (www.broune.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
*/
#ifndef LATTICE_ALGS_GUARD
#define LATTICE_ALGS_GUARD
#include "SatBinomIdeal.h"
#include "IOFacade.h"
#include "Scanner.h"
#include "IOHandler.h"
#include "DataType.h"
#include "BigIdeal.h"
#include "MsmStrategy.h"
#include "TermTranslator.h"
#include "TranslatingTermConsumer.h"
#include "DebugStrategy.h"
#include "Matrix.h"
#include "BigTermRecorder.h"
#include "SliceParams.h"
#include "SliceFacade.h"
#include <algorithm>
#include <set>
#include <sstream>
#include <limits>
#include <fstream>
#include <map>
// Computations and data structures on lattices.
// Support for LatticeAnalyzeAction.
#include <iostream>
// wrapped in do .. while(false) to make it act like a single statement.
#define CHECK(X) \
do { \
if (!(X)) { \
cout << "Check condition on line " \
<< __LINE__ << " of file " << __FILE__ \
<< " not satisfied:\n "#X << endl; \
exit(1); \
} \
} while (false)
enum NeighborPlace {
InPlane,
UnderPlane,
OverPlane,
NoPlace
};
char getPlaceCode(NeighborPlace place);
class Mlfb;
struct SeqPos {
SeqPos();
SeqPos(const Mlfb* mlfb, size_t nextFacet, size_t previousFacet);
size_t getForwardFacet() const;
size_t getBackFacet() const;
SeqPos getReverse() const;
void order();
bool operator<(const SeqPos& pos) const;
const Mlfb* mlfb;
size_t fixFacet1;
size_t fixFacet2;
size_t comingFromFacet;
};
class GrobLat;
class Neighbor {
public:
Neighbor(); // invalid
Neighbor(const GrobLat& lat); // zero
Neighbor(const GrobLat& lat, const size_t row); // row of lat
Neighbor& operator=(const Neighbor& neighbor) {
_lat = neighbor._lat;
_row = neighbor._row;
return *this;
}
bool operator==(const Neighbor& neighbor) const {
return _lat == neighbor._lat && getRow() == neighbor.getRow();
}
const mpq_class& getH(size_t i) const;
size_t getHDim() const;
const mpq_class& getY(size_t i) const;
size_t getYDim() const;
size_t getRow() const {return _row;}
bool isZero() const;
bool isValid() const;
bool isSpecial() const;
bool isGenerator() const;
string getName() const;
const GrobLat& getGrobLat() const {return *_lat;}
private:
const GrobLat* _lat;
size_t _row;
};
class GrobLat {
public:
GrobLat(const Matrix& matrix, const SatBinomIdeal& ideal);
Neighbor getNeighbor(size_t row) const {
ASSERT(row < getNeighborCount());
return Neighbor(*this, row);
}
size_t getNeighborCount() const {
ASSERT(_h.getRowCount() == _y.getRowCount());
return _y.getRowCount();
}
const Matrix& getYMatrix() const {return _y;}
const Matrix& getHMatrix() const {return _h;}
const Matrix& getMatrix() const {return _mat;}
const SatBinomIdeal& getIdeal() const {return _ideal;}
Neighbor getSum(Neighbor a, Neighbor b) const {
vector<mpq_class> sum(getHDim());
for (size_t i = 0; i < getHDim(); ++i)
sum[i] = _h(a.getRow(), i) + _h(b.getRow(), i);
for (size_t row = 0; row < _h.getRowCount(); ++row) {
bool match = true;
for (size_t col = 0; col < _h.getColCount(); ++col)
if (sum[col] != _h(row, col))
match = false;
if (match)
return Neighbor(*this, row);
}
return Neighbor();
}
Neighbor getSum(size_t a, size_t b) const {
vector<mpq_class> sum(getHDim());
for (size_t i = 0; i < getHDim(); ++i)
sum[i] = _h(a, i) + _h(b, i);
for (size_t row = 0; row < _h.getRowCount(); ++row) {
bool match = true;
for (size_t col = 0; col < _h.getColCount(); ++col)
if (sum[col] != _h(row, col))
match = false;
if (match)
return Neighbor(*this, row);
}
return Neighbor();
}
size_t getYDim() const {
ASSERT(_y.getColCount() == _ideal.getVarCount());
return _y.getColCount();
}
size_t getHDim() const {
return _h.getColCount();
}
bool hasZeroEntryY() const {
return _ideal.hasZeroEntry();
}
void getInitialIdeal(BigIdeal& ideal) const {
_ideal.getInitialIdeal(ideal);
}
bool isSum(Neighbor n) const {
ASSERT(n.isValid());
ASSERT(&n.getGrobLat() == this);
ASSERT(n.getRow() < _isSumRow.size());
return _isSumRow[n.getRow()];
}
const vector<Neighbor>& getNonSums() const {return _nonSums;}
const mpq_class& getZero() const {return _zero;} // todo: remove
bool isPointFreeBody(Neighbor a, Neighbor b) const {
return _ideal.isPointFreeBody(_ideal.getGenerator(a.getRow()),
_ideal.getGenerator(b.getRow()));
}
bool isPointFreeBody(Neighbor a, Neighbor b, Neighbor c) const {
return _ideal.isPointFreeBody(_ideal.getGenerator(a.getRow()),
_ideal.getGenerator(b.getRow()),
_ideal.getGenerator(c.getRow()));
}
bool isInterior(Neighbor a, Neighbor b) const {
if (!isPointFreeBody(a, b))
return false;
for (size_t var = 1; var < a.getYDim(); ++var)
if (a.getY(var) <= 0 && b.getY(var) <= 0)
return false;
return true;
}
private:
vector<bool> _isSumRow;
vector<Neighbor> _nonSums;
Matrix _y; // rows are neighbors in y-space
Matrix _h; // rows are neighbors in h-space
Matrix _mat; // matrix that defines lattice
SatBinomIdeal _ideal; // other representation of _y, necessary for now
mpq_class _zero;
};
class Tri {
public:
Tri(Neighbor a, Neighbor b, Neighbor sum,
const vector<Mlfb>& mlfbs, const GrobLat& lat);
Neighbor getA() const {return _a;}
Neighbor getB() const {return _b;}
Neighbor getSum() const {return _sum;}
const vector<const Mlfb*>& getASideMlfbs() const {return _aSideMlfbs;}
const vector<const Mlfb*>& getBSideMlfbs() const {return _bSideMlfbs;}
const vector<Neighbor>& getNeighborsOnBoundary() const {return _boundary;}
const vector<Neighbor>& getNeighborsInInterior() const {return _interior;}
private:
Neighbor _a;
Neighbor _b;
Neighbor _sum; // neighbor that is sum of a and b
vector<const Mlfb*> _aSideMlfbs; // MLFBs containing {0,a,sum}
vector<const Mlfb*> _bSideMlfbs; // MLFBs containing {0,b,sum}
vector<Neighbor> _interior; // neighbors on boundary of <0,a,b,sum>
vector<Neighbor> _boundary; // neighbors in interior of <0,a,b,sum>
};
class Plane {
public:
Plane(Neighbor a, Neighbor b, Neighbor sum,
const vector<Mlfb>& mlfbs, const GrobLat& lat):
tri(a, b, sum, mlfbs, lat) {}
size_t getTypeCount(size_t type) const;
size_t getMaxType() const;
NeighborPlace getPlace(Neighbor neighbor) const;
bool inPlane(Neighbor neighbor) const;
bool isPivot(const Mlfb& mlfb) const;
bool isSidePivot(const Mlfb& mlfb) const;
bool isFlat(const Mlfb& mlfb) const;
bool is22(const Mlfb& mlfb) const;
size_t getType(const Mlfb& mlfb) const;
bool hasFlat() const {
return getTypeCount(4) > 0;
}
Matrix nullSpaceBasis;
Tri tri;
Matrix rowAB;
size_t flatIntervalCount;
map<size_t, size_t> typeCounts;
vector<NeighborPlace> neighborPlace;
vector<SeqPos> flatSeq;
vector<const Mlfb*> pivots;
};
class Mlfb {
public:
size_t getMinInitialFacet() const {
return minInitialFacet;
}
bool hasPoint(Neighbor n) const {
for (size_t i = 0; i < _points.size(); ++i)
if (_points[i] == n)
return true;
return false;
}
Neighbor getPoint(size_t offset) const {
ASSERT(offset < getPointCount());
return _points[offset];
}
size_t getPointCount() const {
return _points.size();
}
bool operator==(const Mlfb& mlfb) const {
return _offset == mlfb._offset;
}
size_t getOffset() const {
return _offset;
}
const vector<mpz_class>& getRhs() const {
return _rhs;
}
string getName() const {
ostringstream name;
name << 'm' << (getOffset() + 1);
return name.str();
}
string getName(const Plane& plane) const {
if (plane.isPivot(*this))
return getName() + 'P';
if (plane.isFlat(*this))
return getName() + 'F';
return getName();
}
Neighbor getHitsNeighbor(size_t indexParam) const {
ASSERT(indexParam < edgeHitsFacet.size());
return getPoint(getHitsFacet(indexParam));
}
size_t getHitsFacet(size_t indexParam) const {
ASSERT(indexParam < edgeHitsFacet.size());
return edgeHitsFacet[indexParam];
}
const Mlfb* getEdge(size_t indexParam) const {
ASSERT(indexParam < edges.size());
return edges[indexParam];
}
Mlfb* getEdge(size_t indexParam) {
ASSERT(indexParam < edges.size());
return edges[indexParam];
}
size_t getFacetOf(const Mlfb& adjacent) const {
for (size_t i = 0; i < 4; ++i)
if (*getEdge(i) == adjacent)
return i;
return 4;
}
bool isParallelogram() const {
return _isParallelogram;
}
mpq_class index;
mpz_class dotDegree;
vector<Mlfb*> edges;
vector<size_t> edgeHitsFacet;
size_t minInitialFacet;
void reset(size_t offset, const vector<Neighbor>& points);
private:
vector<mpz_class> _rhs;
vector<Neighbor> _points;
size_t _offset;
bool _isParallelogram;
};
class TriPlane {
public:
TriPlane(Neighbor a, Neighbor b, Neighbor c):
_a(a), _b(b), _c(c) {
Matrix mat(2, 3);
for (size_t col = 0; col < 3; ++col) {
mat(0, col) = a.getH(col) - c.getH(col);
mat(1, col) = b.getH(col) - c.getH(col);
}
nullSpace(_normal, mat);
transpose(_normal, _normal);
_line = (_normal.getRowCount() != 1);
}
bool isLine() const {
return _line;
}
bool closeToPlane(Neighbor a) {
ASSERT(!isLine());
mpz_class dn = dotNormal(a);
return dn == 0 || dn == 1 || dn == -1;
}
bool inPlane(Neighbor a) const {
return dotNormal(a) == 0;
}
mpz_class dotNormal(Neighbor a) const {
mpz_class prod = 0;
for (size_t i = 0; i < 3; ++i)
prod += a.getH(i) * _normal(0, i);
return prod;
}
bool isParallel(const TriPlane& plane) const {
ASSERT(!isLine());
ASSERT(!plane.isLine());
mpz_class da = plane.dotNormal(_a);
return plane.dotNormal(_b) == da && plane.dotNormal(_c) == da;
}
bool isParallel(const Plane& plane) const {
ASSERT(!isLine());
return plane.nullSpaceBasis == getNormal();
}
const Matrix& getNormal() const {
return _normal;
}
private:
Neighbor _a, _b, _c;
Matrix _normal;
bool _line;
};
void getThinPlanes(vector<TriPlane>& planes, const GrobLat& lat);
void checkPlanes(const vector<TriPlane>& thinPlanes,
const vector<Plane>& dtPlanes);
size_t pushOutFacetPositive(size_t facetPushOut,
const vector<mpz_class>& rhs,
const GrobLat& lat);
size_t pushOutFacetZero(const vector<mpz_class>& rhs, const GrobLat& lat);
void computeMlfbs(vector<Mlfb>& mlfbs, const GrobLat& lat);
void computeSeqs(vector<vector<SeqPos> >& left,
vector<vector<SeqPos> >& right,
const vector<Mlfb>& mlfbs,
const Plane& plane);
void computePivotSeqs(vector<vector<SeqPos> >& seqs, const Mlfb& pivot,
const Plane& plane);
void checkSeqs(const vector<vector<SeqPos> >& left,
const vector<vector<SeqPos> >& right,
const Plane& plane,
const vector<Mlfb>& mlfbs);
void checkMiddle(const Plane& plane,
const vector<Mlfb>& mlfbs);
void checkDoubleTriangle(const Plane& plane,
const vector<Mlfb>& mlfbs);
void checkGraph(const vector<Mlfb>& mlfbs);
void checkGraphOnPlane(const Plane& plane,
const vector<Mlfb>& mlfbs);
void checkPivotSeqs(vector<vector<SeqPos> >& pivotSeqs,
const Plane& plane,
const vector<Mlfb>& mlfbs,
const vector<SeqPos>& flatSeq);
void checkPlaneTri(const GrobLat& lat,
const vector<Mlfb>& mlfbs,
const vector<const Mlfb*>& pivots,
const Plane& plane);
void computePlanes(vector<Plane>& planes,
const GrobLat& lat,
vector<Mlfb>& mlfbs);
void setupPlaneCountsAndOrder(vector<Mlfb>& mlfbs,
const Plane& plane,
map<size_t, size_t>& typeCounts);
bool disjointSeqs(const vector<SeqPos>& a, const vector<SeqPos>& b);
void computePivots(vector<const Mlfb*>& pivots,
const vector<Mlfb>& mlfbs,
const Plane& plane,
const vector<SeqPos>& flatSeq);
void checkNonSums(const GrobLat& lat);
void checkFlatSeq(const vector<SeqPos>& flatSeq,
const GrobLat& lat,
const Plane& plane);
const char* getEdgePos(size_t index);
mpq_class getIndexSum(const vector<Mlfb>& mlfbs);
void checkMlfbs(const vector<Mlfb>& mlfbs, const GrobLat& lat);
void checkDoubleTrianglePlanes(const vector<Plane>& planes,
const GrobLat& lat,
const vector<Mlfb>& mlfbs);
void checkPlane(const Plane& plane, const vector<Mlfb>& mlfbs);
#endif
BigIdeal.h
BigTermRecorder.h
DataType.h
DebugStrategy.h
IOFacade.h
IOHandler.h
checkFlatSeq
void checkFlatSeq(const vector< SeqPos > &flatSeq, const GrobLat &lat, const Plane &plane)
Definition LatticeAlgs.cpp:1180
checkGraphOnPlane
void checkGraphOnPlane(const Plane &plane, const vector< Mlfb > &mlfbs)
Definition LatticeAlgs.cpp:1017
NeighborPlace
NeighborPlace
Definition LatticeAlgs.h:58
InPlane
@ InPlane
Definition LatticeAlgs.h:59
OverPlane
@ OverPlane
Definition LatticeAlgs.h:61
UnderPlane
@ UnderPlane
Definition LatticeAlgs.h:60
NoPlace
@ NoPlace
Definition LatticeAlgs.h:62
checkPlanes
void checkPlanes(const vector< TriPlane > &thinPlanes, const vector< Plane > &dtPlanes)
Definition LatticeAlgs.cpp:99
checkMlfbs
void checkMlfbs(const vector< Mlfb > &mlfbs, const GrobLat &lat)
Definition LatticeAlgs.cpp:642
disjointSeqs
bool disjointSeqs(const vector< SeqPos > &a, const vector< SeqPos > &b)
Definition LatticeAlgs.cpp:738
computePivotSeqs
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.
Definition LatticeAlgs.cpp:881
checkSeqs
void checkSeqs(const vector< vector< SeqPos > > &left, const vector< vector< SeqPos > > &right, const Plane &plane, const vector< Mlfb > &mlfbs)
Definition LatticeAlgs.cpp:966
computeSeqs
void computeSeqs(vector< vector< SeqPos > > &left, vector< vector< SeqPos > > &right, const vector< Mlfb > &mlfbs, const Plane &plane)
Definition LatticeAlgs.cpp:769
pushOutFacetZero
size_t pushOutFacetZero(const vector< mpz_class > &rhs, const GrobLat &lat)
Definition LatticeAlgs.cpp:170
getPlaceCode
char getPlaceCode(NeighborPlace place)
Definition LatticeAlgs.cpp:135
computeMlfbs
void computeMlfbs(vector< Mlfb > &mlfbs, const GrobLat &lat)
Definition LatticeAlgs.cpp:239
computePivots
void computePivots(vector< const Mlfb * > &pivots, const vector< Mlfb > &mlfbs, const Plane &plane, const vector< SeqPos > &flatSeq)
Put all pivots into pivots.
Definition LatticeAlgs.cpp:746
checkGraph
void checkGraph(const vector< Mlfb > &mlfbs)
Definition LatticeAlgs.cpp:1060
checkMiddle
void checkMiddle(const Plane &plane, const vector< Mlfb > &mlfbs)
Definition LatticeAlgs.cpp:985
getIndexSum
mpq_class getIndexSum(const vector< Mlfb > &mlfbs)
Definition LatticeAlgs.cpp:1321
checkDoubleTriangle
void checkDoubleTriangle(const Plane &plane, const vector< Mlfb > &mlfbs)
Definition LatticeAlgs.cpp:1043
computePlanes
void computePlanes(vector< Plane > &planes, const GrobLat &lat, vector< Mlfb > &mlfbs)
Definition LatticeAlgs.cpp:511
getEdgePos
const char * getEdgePos(size_t index)
Definition LatticeAlgs.cpp:1310
checkDoubleTrianglePlanes
void checkDoubleTrianglePlanes(const vector< Plane > &planes, const GrobLat &lat, const vector< Mlfb > &mlfbs)
Definition LatticeAlgs.cpp:649
pushOutFacetPositive
size_t pushOutFacetPositive(size_t facetPushOut, const vector< mpz_class > &rhs, const GrobLat &lat)
Definition LatticeAlgs.cpp:145
getThinPlanes
void getThinPlanes(vector< TriPlane > &planes, const GrobLat &lat)
Definition LatticeAlgs.cpp:22
checkNonSums
void checkNonSums(const GrobLat &lat)
Definition LatticeAlgs.cpp:1157
checkPlane
void checkPlane(const Plane &plane, const vector< Mlfb > &mlfbs)
Definition LatticeAlgs.cpp:714
setupPlaneCountsAndOrder
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...
checkPlaneTri
void checkPlaneTri(const GrobLat &lat, const vector< Mlfb > &mlfbs, const vector< const Mlfb * > &pivots, const Plane &plane)
Definition LatticeAlgs.cpp:1259
checkPivotSeqs
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.
Definition LatticeAlgs.cpp:1092
nullSpace
void nullSpace(Matrix &basis, const Matrix &matParam)
Sets the columns of basis to a basis of the null space of mat.
Definition Matrix.cpp:296
transpose
void transpose(Matrix &trans, const Matrix &mat)
Sets trans to the transpose of mat.
Definition Matrix.cpp:129
Matrix.h
MsmStrategy.h
SatBinomIdeal.h
Scanner.h
SliceFacade.h
SliceParams.h
TermTranslator.h
TranslatingTermConsumer.h
BigIdeal
Definition BigIdeal.h:27
GrobLat
A lattice with associated Grobner basis/neighbors.
Definition LatticeAlgs.h:124
GrobLat::_h
Matrix _h
Definition LatticeAlgs.h:229
GrobLat::getNeighbor
Neighbor getNeighbor(size_t row) const
Definition LatticeAlgs.h:128
GrobLat::getYDim
size_t getYDim() const
Definition LatticeAlgs.h:174
GrobLat::getSum
Neighbor getSum(size_t a, size_t b) const
Definition LatticeAlgs.h:159
GrobLat::getHDim
size_t getHDim() const
Definition LatticeAlgs.h:179
GrobLat::_ideal
SatBinomIdeal _ideal
Definition LatticeAlgs.h:231
GrobLat::_zero
mpq_class _zero
Definition LatticeAlgs.h:232
GrobLat::_isSumRow
vector< bool > _isSumRow
Definition LatticeAlgs.h:225
GrobLat::_y
Matrix _y
Definition LatticeAlgs.h:228
GrobLat::getMatrix
const Matrix & getMatrix() const
Definition LatticeAlgs.h:140
GrobLat::GrobLat
GrobLat(const Matrix &matrix, const SatBinomIdeal &ideal)
Definition LatticeAlgs.cpp:1533
GrobLat::hasZeroEntryY
bool hasZeroEntryY() const
Definition LatticeAlgs.h:183
GrobLat::getSum
Neighbor getSum(Neighbor a, Neighbor b) const
Definition LatticeAlgs.h:144
GrobLat::getIdeal
const SatBinomIdeal & getIdeal() const
Definition LatticeAlgs.h:142
GrobLat::isPointFreeBody
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.
Definition LatticeAlgs.h:209
GrobLat::getNeighborCount
size_t getNeighborCount() const
Definition LatticeAlgs.h:133
GrobLat::getInitialIdeal
void getInitialIdeal(BigIdeal &ideal) const
Definition LatticeAlgs.h:187
GrobLat::isInterior
bool isInterior(Neighbor a, Neighbor b) const
Definition LatticeAlgs.h:215
GrobLat::_mat
Matrix _mat
Definition LatticeAlgs.h:230
GrobLat::getYMatrix
const Matrix & getYMatrix() const
Definition LatticeAlgs.h:138
GrobLat::getNonSums
const vector< Neighbor > & getNonSums() const
Definition LatticeAlgs.h:197
GrobLat::isSum
bool isSum(Neighbor n) const
Definition LatticeAlgs.h:191
GrobLat::getHMatrix
const Matrix & getHMatrix() const
Definition LatticeAlgs.h:139
GrobLat::_nonSums
vector< Neighbor > _nonSums
Definition LatticeAlgs.h:226
GrobLat::getZero
const mpq_class & getZero() const
Definition LatticeAlgs.h:198
GrobLat::isPointFreeBody
bool isPointFreeBody(Neighbor a, Neighbor b) const
Returns true if the smallest body containing zero, a and b has no neighbor in its interior.
Definition LatticeAlgs.h:202
Matrix
Definition Matrix.h:26
Mlfb
Definition LatticeAlgs.h:289
Mlfb::getName
string getName() const
Definition LatticeAlgs.h:323
Mlfb::getRhs
const vector< mpz_class > & getRhs() const
Definition LatticeAlgs.h:319
Mlfb::getPoint
Neighbor getPoint(size_t offset) const
Definition LatticeAlgs.h:302
Mlfb::_rhs
vector< mpz_class > _rhs
Definition LatticeAlgs.h:377
Mlfb::getName
string getName(const Plane &plane) const
Definition LatticeAlgs.h:329
Mlfb::operator==
bool operator==(const Mlfb &mlfb) const
Definition LatticeAlgs.h:311
Mlfb::_points
vector< Neighbor > _points
Definition LatticeAlgs.h:378
Mlfb::edges
vector< Mlfb * > edges
Definition LatticeAlgs.h:370
Mlfb::index
mpq_class index
Definition LatticeAlgs.h:368
Mlfb::getFacetOf
size_t getFacetOf(const Mlfb &adjacent) const
Definition LatticeAlgs.h:357
Mlfb::edgeHitsFacet
vector< size_t > edgeHitsFacet
Definition LatticeAlgs.h:371
Mlfb::getHitsNeighbor
Neighbor getHitsNeighbor(size_t indexParam) const
Definition LatticeAlgs.h:337
Mlfb::hasPoint
bool hasPoint(Neighbor n) const
Definition LatticeAlgs.h:295
Mlfb::_offset
size_t _offset
Definition LatticeAlgs.h:379
Mlfb::getEdge
Mlfb * getEdge(size_t indexParam)
Definition LatticeAlgs.h:352
Mlfb::reset
void reset(size_t offset, const vector< Neighbor > &points)
Definition LatticeAlgs.cpp:202
Mlfb::dotDegree
mpz_class dotDegree
Definition LatticeAlgs.h:369
Mlfb::minInitialFacet
size_t minInitialFacet
Definition LatticeAlgs.h:372
Mlfb::getOffset
size_t getOffset() const
Definition LatticeAlgs.h:315
Mlfb::getPointCount
size_t getPointCount() const
Definition LatticeAlgs.h:307
Mlfb::isParallelogram
bool isParallelogram() const
Definition LatticeAlgs.h:364
Mlfb::getEdge
const Mlfb * getEdge(size_t indexParam) const
Definition LatticeAlgs.h:347
Mlfb::getMinInitialFacet
size_t getMinInitialFacet() const
Definition LatticeAlgs.h:291
Mlfb::getHitsFacet
size_t getHitsFacet(size_t indexParam) const
Definition LatticeAlgs.h:342
Mlfb::_isParallelogram
bool _isParallelogram
Definition LatticeAlgs.h:380
Neighbor
Definition LatticeAlgs.h:86
Neighbor::_lat
const GrobLat * _lat
Definition LatticeAlgs.h:119
Neighbor::Neighbor
Neighbor()
Definition LatticeAlgs.cpp:1398
Neighbor::isSpecial
bool isSpecial() const
Definition LatticeAlgs.cpp:1496
Neighbor::_row
size_t _row
Definition LatticeAlgs.h:120
Neighbor::isGenerator
bool isGenerator() const
Definition LatticeAlgs.cpp:1504
Neighbor::getH
const mpq_class & getH(size_t i) const
Definition LatticeAlgs.cpp:1410
Neighbor::getName
string getName() const
Definition LatticeAlgs.cpp:1519
Neighbor::getRow
size_t getRow() const
Definition LatticeAlgs.h:108
Neighbor::getYDim
size_t getYDim() const
Definition LatticeAlgs.cpp:1433
Neighbor::getY
const mpq_class & getY(size_t i) const
Definition LatticeAlgs.cpp:1424
Neighbor::getHDim
size_t getHDim() const
Definition LatticeAlgs.cpp:1419
Neighbor::getGrobLat
const GrobLat & getGrobLat() const
Definition LatticeAlgs.h:116
Neighbor::isZero
bool isZero() const
Definition LatticeAlgs.cpp:1438
Neighbor::operator=
Neighbor & operator=(const Neighbor &neighbor)
Definition LatticeAlgs.h:92
Neighbor::operator==
bool operator==(const Neighbor &neighbor) const
Definition LatticeAlgs.h:98
Neighbor::isValid
bool isValid() const
Definition LatticeAlgs.cpp:1443
Plane
Definition LatticeAlgs.h:258
Plane::isFlat
bool isFlat(const Mlfb &mlfb) const
Definition LatticeAlgs.cpp:1492
Plane::neighborPlace
vector< NeighborPlace > neighborPlace
Definition LatticeAlgs.h:284
Plane::flatSeq
vector< SeqPos > flatSeq
Definition LatticeAlgs.h:285
Plane::tri
Tri tri
Definition LatticeAlgs.h:279
Plane::isPivot
bool isPivot(const Mlfb &mlfb) const
Definition LatticeAlgs.cpp:1473
Plane::flatIntervalCount
size_t flatIntervalCount
Definition LatticeAlgs.h:281
Plane::nullSpaceBasis
Matrix nullSpaceBasis
Definition LatticeAlgs.h:278
Plane::Plane
Plane(Neighbor a, Neighbor b, Neighbor sum, const vector< Mlfb > &mlfbs, const GrobLat &lat)
Definition LatticeAlgs.h:260
Plane::is22
bool is22(const Mlfb &mlfb) const
Definition LatticeAlgs.cpp:1487
Plane::getPlace
NeighborPlace getPlace(Neighbor neighbor) const
Definition LatticeAlgs.cpp:1462
Plane::hasFlat
bool hasFlat() const
Definition LatticeAlgs.h:274
Plane::typeCounts
map< size_t, size_t > typeCounts
Definition LatticeAlgs.h:283
Plane::pivots
vector< const Mlfb * > pivots
Definition LatticeAlgs.h:286
Plane::getTypeCount
size_t getTypeCount(size_t type) const
Definition LatticeAlgs.cpp:1447
Plane::isSidePivot
bool isSidePivot(const Mlfb &mlfb) const
Definition LatticeAlgs.cpp:1478
Plane::rowAB
Matrix rowAB
Definition LatticeAlgs.h:280
Plane::getMaxType
size_t getMaxType() const
Definition LatticeAlgs.cpp:1455
Plane::inPlane
bool inPlane(Neighbor neighbor) const
Definition LatticeAlgs.cpp:1469
Plane::getType
size_t getType(const Mlfb &mlfb) const
Definition LatticeAlgs.cpp:1511
SatBinomIdeal
Represents a saturated binomial ideal.
Definition SatBinomIdeal.h:28
TriPlane::dotNormal
mpz_class dotNormal(Neighbor a) const
Definition LatticeAlgs.h:413
TriPlane::inPlane
bool inPlane(Neighbor a) const
Definition LatticeAlgs.h:409
TriPlane::closeToPlane
bool closeToPlane(Neighbor a)
Definition LatticeAlgs.h:403
TriPlane::_normal
Matrix _normal
Definition LatticeAlgs.h:439
TriPlane::isParallel
bool isParallel(const TriPlane &plane) const
Definition LatticeAlgs.h:420
TriPlane::getNormal
const Matrix & getNormal() const
returns the normal of the plane as the row of a matrix.
Definition LatticeAlgs.h:433
TriPlane::_a
Neighbor _a
Definition LatticeAlgs.h:438
TriPlane::_line
bool _line
Definition LatticeAlgs.h:440
TriPlane::_b
Neighbor _b
Definition LatticeAlgs.h:438
TriPlane::TriPlane
TriPlane(Neighbor a, Neighbor b, Neighbor c)
Definition LatticeAlgs.h:385
TriPlane::isParallel
bool isParallel(const Plane &plane) const
Definition LatticeAlgs.h:427
TriPlane::_c
Neighbor _c
Definition LatticeAlgs.h:438
TriPlane::isLine
bool isLine() const
Definition LatticeAlgs.h:399
Tri
Definition LatticeAlgs.h:235
Tri::_a
Neighbor _a
Definition LatticeAlgs.h:249
Tri::_bSideMlfbs
vector< const Mlfb * > _bSideMlfbs
Definition LatticeAlgs.h:253
Tri::_b
Neighbor _b
Definition LatticeAlgs.h:250
Tri::getASideMlfbs
const vector< const Mlfb * > & getASideMlfbs() const
Definition LatticeAlgs.h:243
Tri::Tri
Tri(Neighbor a, Neighbor b, Neighbor sum, const vector< Mlfb > &mlfbs, const GrobLat &lat)
Definition LatticeAlgs.cpp:567
Tri::getNeighborsInInterior
const vector< Neighbor > & getNeighborsInInterior() const
Definition LatticeAlgs.h:246
Tri::getB
Neighbor getB() const
Definition LatticeAlgs.h:241
Tri::_interior
vector< Neighbor > _interior
Definition LatticeAlgs.h:254
Tri::getNeighborsOnBoundary
const vector< Neighbor > & getNeighborsOnBoundary() const
Definition LatticeAlgs.h:245
Tri::getBSideMlfbs
const vector< const Mlfb * > & getBSideMlfbs() const
Definition LatticeAlgs.h:244
Tri::getA
Neighbor getA() const
Definition LatticeAlgs.h:240
Tri::getSum
Neighbor getSum() const
Definition LatticeAlgs.h:242
Tri::_boundary
vector< Neighbor > _boundary
Definition LatticeAlgs.h:255
Tri::_sum
Neighbor _sum
Definition LatticeAlgs.h:251
Tri::_aSideMlfbs
vector< const Mlfb * > _aSideMlfbs
Definition LatticeAlgs.h:252
ASSERT
#define ASSERT(X)
Definition stdinc.h:86
SeqPos::order
void order()
Definition LatticeAlgs.cpp:1369
SeqPos::getReverse
SeqPos getReverse() const
Definition LatticeAlgs.cpp:1357
SeqPos::mlfb
const Mlfb * mlfb
Definition LatticeAlgs.h:78
SeqPos::SeqPos
SeqPos()
Definition LatticeAlgs.cpp:1328
SeqPos::comingFromFacet
size_t comingFromFacet
Definition LatticeAlgs.h:81
SeqPos::fixFacet1
size_t fixFacet1
Definition LatticeAlgs.h:79
SeqPos::operator<
bool operator<(const SeqPos &pos) const
Definition LatticeAlgs.cpp:1374
SeqPos::fixFacet2
size_t fixFacet2
Definition LatticeAlgs.h:80
SeqPos::getForwardFacet
size_t getForwardFacet() const
Definition LatticeAlgs.cpp:1345
SeqPos::getBackFacet
size_t getBackFacet() const
Definition LatticeAlgs.cpp:1353