Skip to content
New issue

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

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

Already on GitHub? # to your account

BlasPermutation.resize() does not work #218

Open
Breush opened this issue Jun 4, 2019 · 0 comments
Open

BlasPermutation.resize() does not work #218

Breush opened this issue Jun 4, 2019 · 0 comments
Labels

Comments

@Breush
Copy link
Contributor

Breush commented Jun 4, 2019

See #90 for the clean-up discussion about permutations.

This code shows the problem:

#include <iostream>
#include <givaro/modular.h>
#include <linbox/matrix/dense-matrix.h>
#include <linbox/matrix/permutation-matrix.h>

int main(void) {
    using Field = Givaro::Modular<double>;
    using Matrix = LinBox::DenseMatrix<Field>;

    Field F(11);
    Matrix M(F, 2, 1);
    M.setEntry(0, 0, 0.0);
    M.setEntry(1, 0, 1.0);

#if 0
    LinBox::BlasPermutation<size_t> P(2);
    LinBox::BlasPermutation<size_t> Q(1);
#else
    LinBox::BlasPermutation<size_t> P;
    LinBox::BlasPermutation<size_t> Q;
    P.resize(2);
    Q.resize(1);
#endif

    LinBox::PLUQMatrix<Field>(M, P, Q);

    std::cout << P << std::endl;
    std::cout << Q << std::endl;
}

When the first (right) version is used:

[1,1](2)
[0](1)

When the second (failing) version is used:

[](2)
[](1)
@Breush Breush added the bug label Jun 4, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant