-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Implementation of mutations for matrices #10349
Comments
This comment has been minimized.
This comment has been minimized.
comment:3
For the buildbot: Depends on #10347. |
Dependencies: 10347 |
This comment has been minimized.
This comment has been minimized.
Changed dependencies from 10347 to #10347 |
Reviewer: Hugh Thomas |
comment:6
Hi Christian-- What do you think about the idea of checking that 0 <= k < min(ncols,nrows)? Your code is very nicely written to be safe even if someone tries to mutate a 2x2 matrix at row 15, but they shouldn't be doing that. More importantly, they shouldn't be trying to mutate a 2n x n matrix at row j for n<= j < 2n -- for such a parameter, mutation is undefined. Returning what looks like meaningful output in such a case is potentially deceptive. (That's my view, at any rate, though if you disagree, I could be convinced otherwise.) It's also true that the principal part of B should be skew-symmetrizable, but I don't think it's necessary to check that -- though maybe it would be good to mention this in the documentation? (The legit range of k values should also go in the documentation, I guess.) And, Zelevinsky :) Otherwise, though, it looks good. cheers, Hugh |
comment:7
Oh, one more comment, in the doc-string, you have "b-matrix"; I'd prefer "B-matrix". cheers Hugh |
comment:8
Dear Hugh, I added the changes you suggested -- thanks a lot for looking at it! Christian |
comment:12
I'll take a look. cheers, Hugh |
comment:13
Hi Christian-- What's the point of declaring k to be of type Py_ssize_t? I thought the point was that this would allow k to be huge, but in that case, it seems that you would get overflows when you run into the fact that i and j are declared to be integers. cheers, Hugh |
comment:14
Otherwise, I am happy. The patchbot was happy with this patch before, right? So I assume that its present unhappiness (?) is unrelated to the patch itself, so I guess all that's left is the question in my previous comment. |
This comment has been minimized.
This comment has been minimized.
comment:15
Replying to @hughrthomas:
Hi Hugh,
|
This comment has been minimized.
This comment has been minimized.
comment:17
Replying to @stumpc5: Then why not declare i,j,_ also to be the same type? It seems to me that if it's ever useful to have chosen that type, you would also have needed i,j,_ to have been of that type. |
contains matrix method mutate |
comment:18
Attachment: trac_10349_matrix_mutation-cs.patch.gz Replying to @hughrthomas:
Done! |
comment:19
Okay, then, I think it's ready. cheers, Hugh |
Merged: sage-5.0.beta6 |
comment:21
Hi! This patch is merged in, and we want the cluster algebra material to get in. So this comment is for the future. The functionality implemented in this ticket is rather specific to the context of cluster algebras. The average matrix user will have no clue what this is about, and might get confused with the unrelated concept of mutability (as in set_immutable). So I would recommend, in a later ticket, to:
|
This patch implements a method to mutate matrices. This method is needed for the cluster algebra and quiver package, see Ticket #10298.
Depends on #10347
CC: @hughrthomas
Component: combinatorics
Keywords: matrix mutation
Author: Christian Stump
Reviewer: Hugh Thomas
Merged: sage-5.0.beta6
Issue created by migration from https://trac.sagemath.org/ticket/10349
The text was updated successfully, but these errors were encountered: