Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't make a row reduction with rationals #318

Open
IvanRenison opened this issue Oct 18, 2024 · 0 comments
Open

Can't make a row reduction with rationals #318

IvanRenison opened this issue Oct 18, 2024 · 0 comments

Comments

@IvanRenison
Copy link

Hi, I'm trying to use reducedRowEchelonize with rationals with this code:

#include <bits/stdc++.h>
#include <linbox/matrix/dense-matrix.h>
#include <linbox/solutions/echelon.h>

typedef Givaro::QField<Givaro::Rational> Field;

int main() {
  Field F;

  LinBox::DenseMatrix<Field> A(F);
  A.resize(3, 3);

  A.refEntry(0, 0) = 1;
  A.refEntry(0, 1) = 1;
  A.refEntry(1, 1) = 1;

  reducedRowEchelonize(A);

  for (size_t i = 0; i < 3; i++) {
    for (size_t j = 0; j < 3; j++) {
      std::cout << A.getEntry(i, j) << " ";
    }
    std::cout << std::endl;
  }
}

But when I run it get this error:


 *** ERROR *** : reducedRowEchelonize<RingCategories::RationalTag, Method::Elimination> does not exists.
(at  in )
terminate called after throwing an instance of 'LinBox::LinBoxError'
fish: Job 1, './a.out' terminated by signal SIGABRT (Abort)

I'm also not able to do it with an integer matrix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant