#include <iostream>
int main (
int argc,
char **argv)
{
if (argc < 2 || argc > 3) {
std::cerr << "Usage: valence <matrix-file-in-supported-format> [-ata|-aat]" << std::endl;
return -1;
}
std::ifstream input (argv[1]);
if (!input) { std::cerr << "Error opening matrix file " << argv[1] << std::endl; return -1; }
Givaro::ZRing<Integer> ZZ;
std::cout << "A is " << A.rowdim() << " by " << A.coldim() << std::endl;
Givaro::ZRing<Integer>::Element val_A;
if (argc == 3) {
if (strcmp(argv[2],"-aat")) {
std::cout <<
"A^T A is " << C.
rowdim() <<
" by " << C.
coldim() << std::endl;
}
else {
std::cout <<
"A A^T is " << C.
rowdim() <<
" by " << C.
coldim() << std::endl;
}
}
else {
if (A.rowdim() != A.coldim()) {
std::cerr << "Valence works only on square matrices, try either to change the dimension in the matrix file, or to compute the valence of A A^T or A^T A, via the -aat or -ata options." << std::endl;
exit(0);
}
else
}
std::cout << "Valence is " << val_A << std::endl;
return 0;
}
Blackbox of a product: , i.e .
Definition compose.h:67
size_t coldim(void) const
The number of columns.
Definition compose.h:207
size_t rowdim(void) const
The number of rows.
Definition compose.h:194
MatrixStream.
Definition matrix-stream.h:200
Definition sparse-matrix.h:47
transpose matrix without copying.
Definition transpose.h:56
linbox base configuration file
A Givaro::Modular ring is a representations of Z/mZ.
Namespace in which all linbox code resides.
Definition alt-blackbox-block-container.h:4
Blackbox::Field::Element & valence(typename Blackbox::Field::Element &V, const Blackbox &A, const DomainCategory &tag, const MyMethod &M)
A SparseMatrix<_Field, _Storage> ....
Commentator & commentator()
Definition commentator.h:998
int main()
Definition test-tutorial.C:54