My Project
|
Class PolyMinorProcessor is derived from class MinorProcessor. More...
#include <MinorProcessor.h>
Public Member Functions | |
PolyMinorProcessor () | |
A constructor for creating an instance. More... | |
~PolyMinorProcessor () | |
A destructor for deleting an instance. More... | |
void | defineMatrix (const int numberOfRows, const int numberOfColumns, const poly *polyMatrix) |
A method for defining a matrix with polynomial entries. More... | |
PolyMinorValue | getMinor (const int dimension, const int *rowIndices, const int *columnIndices, const char *algorithm, const ideal &iSB) |
A method for computing the value of a minor, without using a cache. More... | |
PolyMinorValue | getMinor (const int dimension, const int *rowIndices, const int *columnIndices, Cache< MinorKey, PolyMinorValue > &c, const ideal &iSB) |
A method for computing the value of a minor, using a cache. More... | |
PolyMinorValue | getNextMinor (const char *algorithm, const ideal &iSB) |
A method for obtaining the next minor when iterating through all minors of a given size within a pre-defined sub-matrix of an underlying matrix. More... | |
PolyMinorValue | getNextMinor (Cache< MinorKey, PolyMinorValue > &c, const ideal &iSB) |
A method for obtaining the next minor when iterating through all minors of a given size within a pre-defined sub-matrix of an underlying matrix. More... | |
std::string | toString () const |
A method for providing a printable version of the represented MinorProcessor. More... | |
Public Member Functions inherited from MinorProcessor | |
MinorProcessor () | |
The default constructor. More... | |
virtual | ~MinorProcessor () |
A destructor for deleting an instance. More... | |
void | defineSubMatrix (const int numberOfRows, const int *rowIndices, const int numberOfColumns, const int *columnIndices) |
A method for defining a sub-matrix within a pre-defined matrix. More... | |
void | setMinorSize (const int minorSize) |
Sets the size of the minor(s) of interest. More... | |
bool | hasNextMinor () |
A method for checking whether there is a next choice of rows and columns when iterating through all minors of a given size within a pre-defined sub-matrix of an underlying matrix. More... | |
void | getCurrentRowIndices (int *const target) const |
A method for obtaining the current set of rows corresponding to the current minor when iterating through all minors of a given size within a pre-defined sub-matrix of an underlying matrix. More... | |
void | getCurrentColumnIndices (int *const target) const |
A method for obtaining the current set of columns corresponding to the current minor when iterating through all minors of a given size within a pre-defined sub-matrix of an underlying matrix. More... | |
virtual std::string | toString () const |
A method for providing a printable version of the represented MinorProcessor. More... | |
void | print () const |
A method for printing a string representation of the given MinorProcessor to std::cout. More... | |
Protected Member Functions | |
bool | isEntryZero (const int absoluteRowIndex, const int absoluteColumnIndex) const |
A method for testing whether a matrix entry is zero. More... | |
Protected Member Functions inherited from MinorProcessor | |
bool | setNextKeys (const int k) |
A method for iterating through all possible subsets of k rows and k columns inside a pre-defined submatrix of a pre-defined matrix. More... | |
int | getBestLine (const int k, const MinorKey &mk) const |
A method for identifying the row or column with the most zeros. More... | |
virtual bool | isEntryZero (const int absoluteRowIndex, const int absoluteColumnIndex) const |
A method for testing whether a matrix entry is zero. More... | |
Private Member Functions | |
poly | getEntry (const int rowIndex, const int columnIndex) const |
A method for retrieving the matrix entry. More... | |
PolyMinorValue | getMinorPrivateLaplace (const int k, const MinorKey &mk, const bool multipleMinors, Cache< MinorKey, PolyMinorValue > &c, const ideal &iSB) |
A method for computing the value of a minor, using a cache. More... | |
PolyMinorValue | getMinorPrivateLaplace (const int k, const MinorKey &mk, const ideal &iSB) |
A method for computing the value of a minor, without using a cache. More... | |
PolyMinorValue | getMinorPrivateBareiss (const int k, const MinorKey &mk, const ideal &iSB) |
A method for computing the value of a minor, without using a cache. More... | |
Private Attributes | |
poly * | _polyMatrix |
private store for polynomial matrix entries More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from MinorProcessor | |
static int | NumberOfRetrievals (const int rows, const int columns, const int containerMinorSize, const int minorSize, const bool multipleMinors) |
A static method for computing the maximum number of retrievals of a minor. More... | |
static int | IOverJ (const int i, const int j) |
A static method for computing the binomial coefficient i over j. More... | |
static int | Faculty (const int i) |
A static method for computing the factorial of i. More... | |
Protected Attributes inherited from MinorProcessor | |
MinorKey | _container |
private store for the rows and columns of the container minor within the underlying matrix; _container will be used to fix a submatrix (e.g. More... | |
int | _containerRows |
private store for the number of rows in the container minor; This is set by MinorProcessor::defineSubMatrix (const int, const int*, const int, const int*). More... | |
int | _containerColumns |
private store for the number of columns in the container minor; This is set by MinorProcessor::defineSubMatrix (const int, const int*, const int, const int*). More... | |
MinorKey | _minor |
private store for the rows and columns of the minor of interest; Usually, this minor will encode subsets of the rows and columns in _container. More... | |
int | _minorSize |
private store for the dimension of the minor(s) of interest More... | |
int | _rows |
private store for the number of rows in the underlying matrix More... | |
int | _columns |
private store for the number of columns in the underlying matrix More... | |
Class PolyMinorProcessor is derived from class MinorProcessor.
This class implements the special case of polynomial matrices.
Definition at line 560 of file MinorProcessor.h.
PolyMinorProcessor::PolyMinorProcessor | ( | ) |
A constructor for creating an instance.
Definition at line 813 of file MinorProcessor.cc.
PolyMinorProcessor::~PolyMinorProcessor | ( | ) |
A destructor for deleting an instance.
Definition at line 863 of file MinorProcessor.cc.
void PolyMinorProcessor::defineMatrix | ( | const int | numberOfRows, |
const int | numberOfColumns, | ||
const poly * | polyMatrix | ||
) |
A method for defining a matrix with polynomial entries.
numberOfRows | the number of rows |
numberOfColumns | the number of columns |
polyMatrix | the matrix entries in a linear array, i.e., from left to right and top to bottom |
Definition at line 872 of file MinorProcessor.cc.
A method for retrieving the matrix entry.
rowIndex | the absolute (zero-based) row index |
columnIndex | the absolute (zero-based) column index |
Definition at line 818 of file MinorProcessor.cc.
PolyMinorValue PolyMinorProcessor::getMinor | ( | const int | dimension, |
const int * | rowIndices, | ||
const int * | columnIndices, | ||
Cache< MinorKey, PolyMinorValue > & | c, | ||
const ideal & | iSB | ||
) |
A method for computing the value of a minor, using a cache.
The sub-matrix is determined by rowIndices
and columnIndices
. Computation works recursively using Laplace's Theorem. We always develop along the row or column with most zeros; see MinorProcessor::getBestLine (const int, const int, const int). If an ideal is given, it is assumed to be a standard basis. In this case, all results will be reduced w.r.t. to this basis.
dimension | the size of the minor to be computed |
rowIndices | 0-based indices of the rows of the minor |
columnIndices | 0-based indices of the column of the minor |
c | a cache to be used for caching reusable sub-minors |
iSB | NULL or a standard basis |
Definition at line 895 of file MinorProcessor.cc.
PolyMinorValue PolyMinorProcessor::getMinor | ( | const int | dimension, |
const int * | rowIndices, | ||
const int * | columnIndices, | ||
const char * | algorithm, | ||
const ideal & | iSB | ||
) |
A method for computing the value of a minor, without using a cache.
The sub-matrix is determined by rowIndices
and columnIndices
. Computation works either by Laplace's algorithm or by Bareiss's algorithm.
If an ideal is given, it is assumed to be a standard basis. In this case, all results will be reduced w.r.t. to this basis.
dimension | the size of the minor to be computed |
rowIndices | 0-based indices of the rows of the minor |
columnIndices | 0-based indices of the column of the minor |
algorithm | either "Laplace" or "Bareiss" |
iSB | NULL or a standard basis |
Definition at line 908 of file MinorProcessor.cc.
|
private |
A method for computing the value of a minor, without using a cache.
The sub-matrix is specified by mk
. Computation works using Bareiss's algorithm. If an ideal is given, it is assumed to be a standard basis. In this case, all results will be reduced w.r.t. to this basis.
k | the number of rows and columns in the minor to be computed |
mk | the representation of rows and columns of the minor to be computed |
iSB | NULL or a standard basis |
Definition at line 1391 of file MinorProcessor.cc.
|
private |
A method for computing the value of a minor, using a cache.
The sub-matrix is specified by mk
. Computation works recursively using Laplace's Theorem. We always develop along the row or column with the most zeros; see MinorProcessor::getBestLine (const int k, const MinorKey& mk). If an ideal is given, it is assumed to be a standard basis. In this case, all results will be reduced w.r.t. to this basis.
k | the number of rows and columns in the minor to be computed |
mk | the representation of rows and columns of the minor to be computed |
multipleMinors | decides whether we compute just one or all minors of a specified size |
c | a cache to be used for caching reusable sub-minors |
iSB | NULL or a standard basis |
Definition at line 1086 of file MinorProcessor.cc.
|
private |
A method for computing the value of a minor, without using a cache.
The sub-matrix is specified by mk
. Computation works recursively using Laplace's Theorem. We always develop along the row or column with the most zeros; see MinorProcessor::getBestLine (const int k, const MinorKey& mk). If an ideal is given, it is assumed to be a standard basis. In this case, all results will be reduced w.r.t. to this basis.
k | the number of rows and columns in the minor to be computed |
mk | the representation of rows and columns of the minor to be computed |
iSB | NULL or a standard basis |
Definition at line 953 of file MinorProcessor.cc.
PolyMinorValue PolyMinorProcessor::getNextMinor | ( | Cache< MinorKey, PolyMinorValue > & | c, |
const ideal & | iSB | ||
) |
A method for obtaining the next minor when iterating through all minors of a given size within a pre-defined sub-matrix of an underlying matrix.
This method should only be called after MinorProcessor::hasNextMinor () had been called and yielded true
.
Computation works using Laplace's algorithm and a cache c which may already contain useful results from previous calls of PolyMinorValue::getNextMinor (Cache<MinorKey, PolyMinorValue>& c, const ideal& iSB). If an ideal is given, it is assumed to be a standard basis. In this case, all results will be reduced w.r.t. to this basis.
iSB | NULL or a standard basis |
Definition at line 944 of file MinorProcessor.cc.
PolyMinorValue PolyMinorProcessor::getNextMinor | ( | const char * | algorithm, |
const ideal & | iSB | ||
) |
A method for obtaining the next minor when iterating through all minors of a given size within a pre-defined sub-matrix of an underlying matrix.
This method should only be called after MinorProcessor::hasNextMinor () had been called and yielded true
.
Computation works either by Laplace's algorithm (without using a cache) or by Bareiss's algorithm.
If an ideal is given, it is assumed to be a standard basis. In this case, all results will be reduced w.r.t. to this basis.
algorithm | either "Laplace" or "Bareiss" |
iSB | NULL or a standard basis |
Definition at line 928 of file MinorProcessor.cc.
|
protectedvirtual |
A method for testing whether a matrix entry is zero.
absoluteRowIndex | the absolute (zero-based) row index |
absoluteColumnIndex | the absolute (zero-based) column index |
Reimplemented from MinorProcessor.
Definition at line 824 of file MinorProcessor.cc.
|
virtual |
A method for providing a printable version of the represented MinorProcessor.
Reimplemented from MinorProcessor.
Definition at line 830 of file MinorProcessor.cc.
|
private |
private store for polynomial matrix entries
Definition at line 566 of file MinorProcessor.h.