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

Cache rational_diagonal_form() #18656

Closed
jdemeyer opened this issue Jun 9, 2015 · 9 comments
Closed

Cache rational_diagonal_form() #18656

jdemeyer opened this issue Jun 9, 2015 · 9 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Jun 9, 2015

The diagonalized form is an important starting point for computing invariants, so it should certainly be cached.

Component: quadratic forms

Author: Jeroen Demeyer

Branch/Commit: e995d5e

Reviewer: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/18656

@jdemeyer jdemeyer added this to the sage-6.8 milestone Jun 9, 2015
@jdemeyer
Copy link
Author

jdemeyer commented Jun 9, 2015

@jdemeyer
Copy link
Author

jdemeyer commented Jun 9, 2015

New commits:

2cfad03Cache rational_diagonal_form()

@jdemeyer
Copy link
Author

jdemeyer commented Jun 9, 2015

Commit: 2cfad03

@videlec
Copy link
Contributor

videlec commented Aug 10, 2015

comment:3

Since T is computed each time, why not returning it by default? If you use a cached_method you should minimize the number of arguments.

Also, make the output matrices immutable.

@videlec
Copy link
Contributor

videlec commented Aug 10, 2015

Reviewer: Vincent Delecroix

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 30, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

8447852Merge tag '6.9.beta4' into t/18656/cache_rational_diagonal_form__
e995d5eSolve mutability issues

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 30, 2015

Changed commit from 2cfad03 to e995d5e

@jdemeyer
Copy link
Author

comment:5

Replying to @videlec:

Since T is computed each time, why not returning it by default? If you use a cached_method you should minimize the number of arguments.

Also, make the output matrices immutable.

Done, I made rational_diagonal_form() a front-end for a cached function _rational_diagonal_form_and_transformation() which returns the form and matrix.

@vbraun
Copy link
Member

vbraun commented Sep 4, 2015

Changed branch from u/jdemeyer/cache_rational_diagonal_form__ to e995d5e

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

No branches or pull requests

3 participants