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

I think matrix_sparce function : transpose_in_place() is wrong. #2

Open
xinlnix opened this issue Apr 10, 2021 · 3 comments
Open

I think matrix_sparce function : transpose_in_place() is wrong. #2

xinlnix opened this issue Apr 10, 2021 · 3 comments

Comments

@xinlnix
Copy link

xinlnix commented Apr 10, 2021

template<class T> matrix_sparse<T> matrix_sparse<T>::transpose_in_place() {
     orientation = other_orientation(orientation);
     std::swap(number_rows, number_columns);
     return *this;
  }

Why transpose in place just swap number rows and columns and change orientation?. I can't find where it has been transpose and thank for your reply in advance.

@xinlnix
Copy link
Author

xinlnix commented Apr 10, 2021

And in practice, CCS format calculate of ILU0 is wrong, hoping your reply.

@c-f-h
Copy link
Owner

c-f-h commented Apr 10, 2021

template<class T> matrix_sparse<T> matrix_sparse<T>::transpose_in_place() {
     orientation = other_orientation(orientation);
     std::swap(number_rows, number_columns);
     return *this;
  }

Why transpose in place just swap number rows and columns and change orientation?. I can't find where it has been transpose and thank for your reply in advance.

Turning a row-major into a column-major matrix in effect transposes it. I'm pretty sure it's correct. Have you tried it?

@c-f-h
Copy link
Owner

c-f-h commented Apr 10, 2021

And in practice, CCS format calculate of ILU0 is wrong, hoping your reply.

Can you give a reproducible test case where it's wrong?

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

2 participants