LatticeAnalyzeAction.cpp
Go to the documentation of this file.
/* Frobby: Software for monomial ideal computations.
Copyright (C) 2009 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/.
*/
#include "stdinc.h"
#include "LatticeAnalyzeAction.h"
#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 "ColumnPrinter.h"
#include "BigTermRecorder.h"
#include "SliceParams.h"
#include "SliceFacade.h"
#include <algorithm>
#include <set>
#include <sstream>
#include <limits>
#include <fstream>
#include <map>
#include "LatticeAlgs.h"
#include <iostream>
namespace {
void printIndentedMatrix(const Matrix& matrix) {
ColumnPrinter pr;
pr.setPrefix(" ");
print(pr, matrix);
fputc('\n', stdout);
print(stdout, pr);
fputc('\n', stdout);
}
void printNullSpace(const Matrix& matrix) {
Matrix nullSpaceBasis;
nullSpace(nullSpaceBasis, matrix);
transpose(nullSpaceBasis, nullSpaceBasis);
fputs("The right null space is spanned by the rows of\n",
stdout);
printIndentedMatrix(nullSpaceBasis);
}
class NeighborPrinter {
public:
NeighborPrinter(const GrobLat& lat):
_lat(lat) {
// "gXYZ:" label
_labelIndex = _pr.getColumnCount();
_pr.addColumn(false, " ");
// h space
_hHeader = _pr.getColumnCount();
_pr.addColumn(false, " ", "");
_hIndex = _pr.getColumnCount();
for (size_t i = 0; i < _lat.getHDim(); ++i)
_pr.addColumn(false, i == 0 ? " " : " ");
_comma = _pr.getColumnCount();
_pr.addColumn(false, "", " ");
// y space
_yHeader = _pr.getColumnCount();
_pr.addColumn(false, " ", "");
_yIndex = _pr.getColumnCount();
for (size_t i = 0; i < _lat.getYDim(); ++i)
_pr.addColumn(false, i == 0 ? " " : " ");
// hits
_hitsHeader = _pr.getColumnCount();
_pr.addColumn(false, " ", "");
_hits = _pr.getColumnCount();
_pr.addColumn(false, " ", "");
// edges
_edgeHeader = _pr.getColumnCount();
_pr.addColumn(false, " ", "");
_edge = _pr.getColumnCount();
_pr.addColumn(false, " ", "");
}
void addNeighbor(Neighbor neighbor) {
printNeighborOnly(neighbor);
_pr[_hitsHeader] << '\n';
_pr[_hits] << '\n';
_pr[_edgeHeader] << '\n';
_pr[_edge] << '\n';
}
void addMlfbPoint(Neighbor neighbor,
const Plane& plane,
Neighbor hits,
Mlfb& edge) {
printNeighborOnly(neighbor, plane.getPlace(neighbor));
_pr[_hitsHeader] << "hits\n";
_pr[_hits] << hits.getName() << '\n';
_pr[_edgeHeader] << "push to\n";
_pr[_edge] << edge.getName(plane) << '\n';
}
void addEmptyLine() {
for (size_t i = 0; i < _pr.getColumnCount(); ++i)
_pr[i] << '\n';
}
void print(FILE* out) {
::print(out, _pr);
}
void print(ostream& out) {
out << _pr;
}
private:
void printNeighborOnly(Neighbor neighbor, NeighborPlace place = NoPlace) {
_pr[_labelIndex] << neighbor.getName() << ':';
if (place != NoPlace)
_pr[_labelIndex] << ' ' << getPlaceCode(place);
_pr[_labelIndex] << '\n';
_pr[_yHeader] << "y=\n";
for (size_t i = 0; i < neighbor.getYDim(); ++i)
_pr[_yIndex + i] << neighbor.getY(i) << '\n';
_pr[_comma] << ",\n";
_pr[_hHeader] << "h=\n";
for (size_t i = 0; i < neighbor.getHDim(); ++i)
_pr[_hIndex + i] << neighbor.getH(i) << '\n';
}
const GrobLat& _lat;
ColumnPrinter _pr;
size_t _labelIndex;
size_t _comma;
size_t _yHeader;
size_t _yIndex;
size_t _hHeader;
size_t _hIndex;
size_t _hitsHeader;
size_t _hits;
size_t _edgeHeader;
size_t _edge;
};
void printMinDotDegreeMlfb(vector<Mlfb>& mlfbs) {
Mlfb* min = &(mlfbs[0]);
for (size_t i = 1; i < mlfbs.size(); ++i) {
Mlfb& mlfb = mlfbs[i];
if (mlfb.dotDegree < min->dotDegree)
min = &mlfb;
}
cout << "The MLFB " << min->getName() << " has minimal rhs dot product.\n";
}
void printNeighbors(const GrobLat& lat) {
NeighborPrinter pr(lat);
pr.addNeighbor(Neighbor(lat));
for (size_t n = 0; n < lat.getNeighborCount(); ++n)
pr.addNeighbor(lat.getNeighbor(n));
fprintf(stdout, "\nThe %u neighbors in y-space and h-space are\n",
(unsigned int)lat.getNeighborCount());
pr.print(stdout);
fputc('\n', stdout);
}
class MlfbPtrCmp {
public:
MlfbPtrCmp(const Plane& plane): _plane(plane) {}
bool operator()(const Mlfb* a, const Mlfb* b) {
size_t ta = _plane.getType(*a);
size_t tb = _plane.getType(*b);
if (ta == 1) ta = 3;
if (tb == 1) tb = 3;
if (ta != tb)
return ta > tb;
else
return a->getOffset() < b->getOffset();
}
private:
const Plane& _plane;
};
void printMlfbs(vector<Mlfb>& mlfbs, const Plane& plane, const GrobLat& lat) {
vector<Mlfb*> order;
for (size_t i = 0; i < mlfbs.size(); ++i)
order.push_back(&(mlfbs[i]));
sort(order.begin(), order.end(), MlfbPtrCmp(plane));
cout << "\n\n";
for (size_t i = 0; i < order.size(); ++i) {
Mlfb& mlfb = *(order[i]);
cout << "*** MLFB " << mlfb.getName(plane) << " with rhs";
for (size_t var = 0; var < lat.getYDim(); ++var)
cout << ' ' << mlfb.getRhs()[var];
cout << " contains the neighbors\n";
NeighborPrinter pr(lat);
for (size_t j = 0; j < mlfb.getPointCount(); ++j) {
pr.addMlfbPoint(mlfb.getPoint(j),
plane,
mlfb.getHitsNeighbor(j),
*mlfb.getEdge(j));
}
pr.print(cout);
cout << "Its index is " << mlfb.index << ", its rhs dot product is " <<
mlfb.dotDegree << " and it has "
<< plane.getType(mlfb) << " plane neighbors.\n\n";
}
}
void prSeq(const vector<SeqPos>& seq, const Plane& plane) {
cout << " Seq: ";
for (size_t i = 0; i < seq.size(); ++i)
cout << (i > 0 ? "->" : "") << seq[i].mlfb->getName(plane);
cout << endl;
}
void printPlane(vector<Mlfb>& mlfbs, const Plane& plane, const GrobLat& lat) {
cout << "The plane's null space is spanned by the rows of\n";
printIndentedMatrix(plane.nullSpaceBasis);
cout << '\n';
const vector<SeqPos>& flatSeq = plane.flatSeq;
cout << "The flat sequence has " << plane.flatIntervalCount
<< (plane.flatIntervalCount == 1 ? " interval.\n" : " intervals.\n");
for (size_t i = plane.getMaxType(); i > 0; --i)
cout << "There are " << plane.getTypeCount(i)
<< " MLFBs with " << i << " plane neighbors.\n";
cout << '\n';
const Tri& tri = plane.tri;
cout << "The non-flat triangle of the plane is "
<< "{zero,"
<< tri.getA().getName() << ',' << tri.getSum().getName() << "},"
<< "{zero,"
<< tri.getB().getName() << ',' << tri.getSum().getName() << "}.";
cout << "\nThe MLFBs containing {zero,"
<< tri.getA().getName() << ',' << tri.getSum().getName() << "} are:";
for (size_t i = 0; i < tri.getASideMlfbs().size(); ++i)
cout << ' ' << tri.getASideMlfbs()[i]->getName(plane);
cout << "\nThe MLFBs containing {zero,"
<< tri.getB().getName() << ',' << tri.getSum().getName() << "} are:";
for (size_t i = 0; i < tri.getBSideMlfbs().size(); ++i)
cout << ' ' << tri.getBSideMlfbs()[i]->getName(plane);
cout << "\nThe neighbors on the boundary of the body defined by {zero,"
<< tri.getA().getName() << ','
<< tri.getB().getName() << ','
<< tri.getSum().getName() << "} are\n";
{
NeighborPrinter pr(lat);
for (size_t i = 0; i < tri.getNeighborsOnBoundary().size(); ++i)
pr.addNeighbor(tri.getNeighborsOnBoundary()[i]);
pr.print(stdout);
}
cout << "and those in the interior are\n";
{
NeighborPrinter pr(lat);
for (size_t i = 0; i < tri.getNeighborsInInterior().size(); ++i)
pr.addNeighbor(tri.getNeighborsInInterior()[i]);
pr.print(stdout);
}
printMlfbs(mlfbs, plane, lat);
const vector<const Mlfb*>& pivots = plane.pivots;
CHECK((pivots.size() % 2) == 0);
CHECK(!(tri.getASideMlfbs().size() == 2 &&
tri.getBSideMlfbs().size() == 2 &&
pivots.size() == 4 &&
flatSeq.size() > 0));
if (flatSeq.size() == 0 || pivots.size() != 4) {
cout << "(Falling back to general framework as no flats or more than 4 pivots)\n\n";
vector<vector<SeqPos> > left;
vector<vector<SeqPos> > right;
computeSeqs(left, right, mlfbs, plane);
cout << "The left sequences are:\n";
for (size_t j = 0; j < left.size(); ++j)
prSeq(left[j], plane);
cout << "The right sequences are:\n";
for (size_t j = 0; j < right.size(); ++j)
prSeq(right[j], plane);
checkSeqs(left, right, plane, mlfbs);
checkMiddle(plane, mlfbs);
checkGraphOnPlane(plane, mlfbs);
checkDoubleTriangle(plane, mlfbs);
} else {
cout << endl;
vector<vector<SeqPos> > leftSeqs;
vector<vector<SeqPos> > rightSeqs;
computePivotSeqs(leftSeqs, *(pivots[0]), plane);
computePivotSeqs(rightSeqs, *(pivots[2]), plane);
cout << "The left sequences are:\n";
for (size_t j = 0; j < leftSeqs.size(); ++j)
prSeq(leftSeqs[j], plane);
cout << "The flat sequence is:\n";
prSeq(flatSeq, plane);
cout << "The right sequences are:\n";
for (size_t j = 0; j < rightSeqs.size(); ++j)
prSeq(rightSeqs[j], plane);
checkPivotSeqs(leftSeqs, plane, mlfbs, flatSeq);
checkPivotSeqs(rightSeqs, plane, mlfbs, flatSeq);
checkPlaneTri(lat, mlfbs, pivots, plane);
checkFlatSeq(flatSeq, lat, plane);
}
}
void printInteriorNeighborGraph(const GrobLat& lat,
const vector<Mlfb>& mlfbs,
const vector<Plane>& planes) {
ofstream out("interior.dot");
out << "digraph G {\n" << flush;
for (size_t gen1 = 0; gen1 < lat.getNeighborCount(); ++gen1) {
Neighbor from = lat.getNeighbor(gen1);
out << ' ' << from.getName() << ";\n";
for (size_t gen2 = 0; gen2 < lat.getNeighborCount(); ++gen2) {
if (gen1 == gen2)
continue;
Neighbor to = lat.getNeighbor(gen2);
Neighbor sum = lat.getSum(from, to);
if (!sum.isValid() || !lat.isInterior(to, sum))
continue;
out << " " << from.getName() << " -> " << sum.getName()
<< " [label=\"" << to.getName();
for (size_t m = 0; m < mlfbs.size(); ++m) {
const Mlfb& mlfb = mlfbs[m];
if (mlfb.hasPoint(to) && mlfb.hasPoint(sum)) {
out << ' ' << mlfb.getName();
}
}
if (lat.isPointFreeBody(from, sum)) {
for (size_t p = 0; p < planes.size(); ++p) {
const Plane& plane = planes[p];
if (plane.inPlane(sum) && plane.inPlane(to) && plane.inPlane(from))
out << " p" << (p + 1);
}
out << "\",style=dotted,arrowhead=empty";
} else
out << "\"";
out << "];\n";
}
}
out << "}\n";
}
void printScarfGraph(const vector<Mlfb>& mlfbs) {
ofstream out("graph.dot");
out << "graph G {\n";
for (size_t m = 0; m < mlfbs.size(); ++m) {
const Mlfb& mlfb = mlfbs[m];
out << " " << mlfb.getName() << "[label=\"";
out << mlfb.getName() << "\\nindex " << mlfb.index;
out << "\", shape=box];\n";
for (size_t e = 0; e < mlfb.edges.size(); ++e) {
size_t hits = mlfb.edgeHitsFacet[e];
if (mlfb.getOffset() < mlfb.edges[e]->getOffset())
continue;
out << " " << mlfb.getName()
<< " -- " << mlfb.edges[e]->getName() << " [";
out << "headport=" << getEdgePos(hits) << ", ";
out << "tailport=" << getEdgePos(e) << "];\n";
}
}
out << "}\n";
}
void printMathematica3D(vector<Mlfb>& mlfbs, const GrobLat& lat) {
ofstream out("ma3d");
out << "a={\n";
for (size_t m = 0; m < mlfbs.size(); ++m) {
out << " Graphics3D[{RGBColor[";
for (size_t i = 0; i < 3; ++i) {
if (i > 0)
out << ',';
out << "0." << (rand() % 10000);
}
out << "],Polygon[{";
Mlfb& mlfb = mlfbs[m];
for (size_t p = 1; p < mlfb.getPointCount(); ++p) {
if (p > 1)
out << ',';
out << '{';
for (size_t i = 0; i < lat.getHDim(); ++i) {
if (i > 1)
out << ',';
out << mlfb.getPoint(p).getH(i);
}
out << '}';
}
out << "}]}],\n";
}
out << " Graphics3D[Point[{0,0,0}]]\n};\ng=Show[{a},Boxed->False];\n";
}
void printThinPlanes(const vector<TriPlane>& thinPlanes) {
Matrix matrix(thinPlanes.size(), 3);
for (size_t p = 0; p < thinPlanes.size(); ++p)
copyRow(matrix, p, thinPlanes[p].getNormal(), 0);
cout << "The " << thinPlanes.size() << " thin planes' normals are the rows of" << endl;
cout << matrix;
}
}
LatticeAnalyzeAction::LatticeAnalyzeAction():
Action
(staticGetName(),
"Display information about the input ideal.",
"This action is not ready for general use.\n\n"
"Display information about input Grobner basis of lattice.",
false),
_io(DataType::getSatBinomIdealType(), DataType::getMonomialIdealType()) {
}
void LatticeAnalyzeAction::obtainParameters(vector<Parameter*>& parameters) {
_io.obtainParameters(parameters);
Action::obtainParameters(parameters);
}
bool LatticeAnalyzeAction::displayAction() const {
return false;
}
void LatticeAnalyzeAction::perform() {
cerr << "** Reading input " << endl;
Scanner in(_io.getInputFormat(), stdin);
_io.autoDetectInputFormat(in);
_io.validateFormats();
IOFacade ioFacade(_printActions);
SatBinomIdeal ideal;
ioFacade.readSatBinomIdeal(in, ideal);
Matrix matrix;
{
SatBinomIdeal matrixIdeal;
ioFacade.readSatBinomIdeal(in, matrixIdeal);
matrixIdeal.getMatrix(matrix);
}
cerr << "** Computing matrix and its nullspace" << endl;
cout << "Analysis of the "
<< matrix.getRowCount() << " by " << matrix.getColCount()
<< " matrix\n";
printIndentedMatrix(matrix);
printNullSpace(matrix);
cerr << "** Computing h-space vectors" << endl;
GrobLat lat(matrix, ideal);
if (lat.hasZeroEntryY()) {
cout << "matrix not generic." << endl;
exit(2);
}
cerr << "** Computing MLFBs" << endl;
vector<Mlfb> mlfbs;
computeMlfbs(mlfbs, lat);
cerr << "** Computing thin planes" << endl;
vector<TriPlane> thinPlanes;
getThinPlanes(thinPlanes, lat);
cerr << "** Computing double triangle planes and associated structures" << endl;
vector<Plane> planes;
computePlanes(planes, lat, mlfbs);
size_t paraMlfbCount = 0;
for (size_t mlfb = 0; mlfb < mlfbs.size(); ++mlfb) {
if (mlfbs[mlfb].index == 0)
++paraMlfbCount;
}
cerr << "** Producing output" << endl;
if (lat.hasZeroEntryY())
cout << "A neighbor has a zero entry.\n";
else
cout << "No neighbor has a zero entry.\n";
mpq_class indexSum = getIndexSum(mlfbs);
cout << "There are " << lat.getNeighborCount() << " neighbors excluding zero.\n";
cout << "There are " << mlfbs.size() << " MLFBs.\n";
cout << "There are " << paraMlfbCount << " parallelogram MLFBs.\n";
cout << "There are " << planes.size()
<< " distinct double triangle planes.\n";
cout << "The sum of MLFB indexes is " << indexSum << ".\n";
CHECK(indexSum == 6 || indexSum == -6);
printMinDotDegreeMlfb(mlfbs);
printNeighbors(lat);
const vector<Neighbor>& nonSums = lat.getNonSums();
cout << "The " << nonSums.size() << " non-sum neighbors are:";
for (size_t i = 0; i < nonSums.size(); ++i)
cout << ' ' << nonSums[i].getName();
cout << endl;
printThinPlanes(thinPlanes);
for (size_t plane = 0; plane < planes.size(); ++plane) {
cout << "\n\n*** Plane " << (plane + 1)
<< " of " << planes.size() << "\n\n";
printPlane(mlfbs, planes[plane], lat);
checkPlane(planes[plane], mlfbs);
}
checkMlfbs(mlfbs, lat);
checkDoubleTrianglePlanes(planes, lat, mlfbs);
checkPlanes(thinPlanes, planes);
printInteriorNeighborGraph(lat, mlfbs, planes);
printScarfGraph(mlfbs);
printMathematica3D(mlfbs, lat);
checkNonSums(lat);
checkGraph(mlfbs);
}
const char* LatticeAnalyzeAction::staticGetName() {
return "latanal";
}
BigIdeal.h
BigTermRecorder.h
print
void print(FILE *out, const ColumnPrinter &pr)
Definition ColumnPrinter.cpp:145
ColumnPrinter.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
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
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
getPlaceCode
char getPlaceCode(NeighborPlace place)
Definition LatticeAlgs.cpp:135
computeMlfbs
void computeMlfbs(vector< Mlfb > &mlfbs, const GrobLat &lat)
Definition LatticeAlgs.cpp:239
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
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
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
LatticeAlgs.h
NeighborPlace
NeighborPlace
Definition LatticeAlgs.h:58
NoPlace
@ NoPlace
Definition LatticeAlgs.h:62
CHECK
#define CHECK(X)
Definition LatticeAlgs.h:48
LatticeAnalyzeAction.h
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
copyRow
void copyRow(Matrix &target, size_t targetRow, const Matrix &source, size_t sourceRow)
Copies row sourceRow from source to row targetRow of target.
Definition Matrix.cpp:246
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
Action::getName
const char * getName() const
Definition Action.cpp:113
Action::_printActions
BoolParameter _printActions
Definition Action.h:68
Action::Action
Action(const char *name, const char *shortDescription, const char *description, bool acceptsNonParameter)
Definition Action.cpp:46
Action::obtainParameters
virtual void obtainParameters(vector< Parameter * > &parameters)
Definition Action.cpp:133
ColumnPrinter
Definition ColumnPrinter.h:27
ColumnPrinter::print
void print(ostream &out) const
Definition ColumnPrinter.cpp:70
ColumnPrinter::setPrefix
void setPrefix(const string &prefix)
Definition ColumnPrinter.cpp:47
DataType
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
Definition DataType.h:29
GrobLat
A lattice with associated Grobner basis/neighbors.
Definition LatticeAlgs.h:124
GrobLat::getNeighbor
Neighbor getNeighbor(size_t row) const
Definition LatticeAlgs.h:128
GrobLat::getYDim
size_t getYDim() const
Definition LatticeAlgs.h:174
GrobLat::getHDim
size_t getHDim() const
Definition LatticeAlgs.h:179
GrobLat::hasZeroEntryY
bool hasZeroEntryY() const
Definition LatticeAlgs.h:183
GrobLat::getSum
Neighbor getSum(Neighbor a, Neighbor b) const
Definition LatticeAlgs.h:144
GrobLat::getNeighborCount
size_t getNeighborCount() const
Definition LatticeAlgs.h:133
GrobLat::isInterior
bool isInterior(Neighbor a, Neighbor b) const
Definition LatticeAlgs.h:215
GrobLat::getNonSums
const vector< Neighbor > & getNonSums() const
Definition LatticeAlgs.h:197
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
IOFacade
A facade for input and output of mathematical objects.
Definition IOFacade.h:39
IOFacade::readSatBinomIdeal
void readSatBinomIdeal(Scanner &in, SatBinomConsumer &consumer)
Read a saturated binomial ideal from in and feed it to consumer.
Definition IOFacade.cpp:57
LatticeAnalyzeAction::staticGetName
static const char * staticGetName()
Definition LatticeAnalyzeAction.cpp:580
LatticeAnalyzeAction::obtainParameters
virtual void obtainParameters(vector< Parameter * > &parameters)
Definition LatticeAnalyzeAction.cpp:471
LatticeAnalyzeAction::LatticeAnalyzeAction
LatticeAnalyzeAction()
Definition LatticeAnalyzeAction.cpp:460
LatticeAnalyzeAction::displayAction
virtual bool displayAction() const
This action isn't done yet, so it should not be displayed by the help action.
Definition LatticeAnalyzeAction.cpp:476
LatticeAnalyzeAction::perform
virtual void perform()
Definition LatticeAnalyzeAction.cpp:480
LatticeAnalyzeAction::_io
IOParameters _io
Definition LatticeAnalyzeAction.h:40
Matrix
Definition Matrix.h:26
Matrix::getColCount
size_t getColCount() const
Definition Matrix.h:31
Matrix::getRowCount
size_t getRowCount() const
Definition Matrix.h:30
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::edges
vector< Mlfb * > edges
Definition LatticeAlgs.h:370
Mlfb::index
mpq_class index
Definition LatticeAlgs.h:368
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::dotDegree
mpz_class dotDegree
Definition LatticeAlgs.h:369
Mlfb::getOffset
size_t getOffset() const
Definition LatticeAlgs.h:315
Mlfb::getPointCount
size_t getPointCount() const
Definition LatticeAlgs.h:307
Mlfb::getEdge
const Mlfb * getEdge(size_t indexParam) const
Definition LatticeAlgs.h:347
Neighbor
Definition LatticeAlgs.h:86
Neighbor::getH
const mpq_class & getH(size_t i) const
Definition LatticeAlgs.cpp:1410
Neighbor::getName
string getName() const
Definition LatticeAlgs.cpp:1519
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::isValid
bool isValid() const
Definition LatticeAlgs.cpp:1443
Plane
Definition LatticeAlgs.h:258
Plane::flatSeq
vector< SeqPos > flatSeq
Definition LatticeAlgs.h:285
Plane::tri
Tri tri
Definition LatticeAlgs.h:279
Plane::flatIntervalCount
size_t flatIntervalCount
Definition LatticeAlgs.h:281
Plane::nullSpaceBasis
Matrix nullSpaceBasis
Definition LatticeAlgs.h:278
Plane::getPlace
NeighborPlace getPlace(Neighbor neighbor) const
Definition LatticeAlgs.cpp:1462
Plane::pivots
vector< const Mlfb * > pivots
Definition LatticeAlgs.h:286
Plane::getTypeCount
size_t getTypeCount(size_t type) const
Definition LatticeAlgs.cpp:1447
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
SatBinomIdeal::getMatrix
void getMatrix(Matrix &matrix) const
Definition SatBinomIdeal.cpp:368
Scanner
This class offers an input interface which is more convenient and for some purposes more efficient th...
Definition Scanner.h:50
Tri
Definition LatticeAlgs.h:235
Tri::getASideMlfbs
const vector< const Mlfb * > & getASideMlfbs() const
Definition LatticeAlgs.h:243
Tri::getNeighborsInInterior
const vector< Neighbor > & getNeighborsInInterior() const
Definition LatticeAlgs.h:246
Tri::getB
Neighbor getB() const
Definition LatticeAlgs.h:241
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
stdinc.h
This header file includes common definitions and is included as the first line of code in every imple...