Skip to content

Can't make a row reduction with rationals #318

@IvanRenison

Description

@IvanRenison

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions