-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Develop 328 #338
Develop 328 #338
Conversation
This PR replaces PR#328 which added some files in addition to changing POD documentation. This PR should only change POD documentation for matrix files. To test -- read through the documentation. You can request changes via the review mechanism if some portions of the documentation are incorrect or unclear. |
lib/Matrix.pm
Outdated
R($matrix) - return matrix R of the LR decomposition | ||
PL($matrix) return | ||
PR($matrix | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there something missing in the above two lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I'd also missed a =cut which would have wiped out the definition of the L and R
decomposition functions. Here is the whole segment in context:
=head3 Accessor functions
(these are deprecated for direct use. Use the covering Methods
provided by MathObject Matrices instead.)
L($matrix) - return matrix L of the LR decomposition
R($matrix) - return matrix R of the LR decomposition
PL($matrix) - return permutation matrix
PR($matrix) - return permutation matrix
Original matrix is PL * L * R *PR = M
Obtain the Left Right matrices of the decomposition
and the two pivot permutation matrices
the original is M = PLLR*PR
=cut
lib/Value/Matrix.pm
Outdated
kleene | ||
normalize | ||
solve_LR (also solve()) | ||
order_LR (also order() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a close paren. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I fixed these and added some clarifying remarks. For a more complete description one still needs to consult the MatrixReal1.pm documentation.
macros/MatrixReduce.pl
Outdated
=item Change the value of a matrix entry: C<change_matrix_entry($A,[2,3],50);> changes the [2,3] entry to the value 50. | ||
=item Change the value of a matrix entry: C<change_matrix_entry($A,[2,3],50);> | ||
|
||
changes the [2,3] entry to the value 50. | ||
|
||
=item Construct an n x n identity matrix: C<$E = identity_matrix(5);> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: there is already a MathObject method for that: Value::Matrix->I(5)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but I believe Value::Matrix->I(5) was added after MatrixReduce.pl was created. In any case MatrixReduce.pl identity_matrix is simply an alias for Value::Matrix->I(5) and is part of a family of functions creating elementary matrices.
macros/PGmatrixmacros.pl
Outdated
|
||
sub convert_to_array_ref { | ||
my $input = shift; | ||
if (ref($input) eq 'Value::Matrix' ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't catch subclasses of Value::Matrix
, so perhaps if (Value::classMatch($input,"Matrix") {
would be better (this will return false if $input
is not a MathObject at all, so should be safe).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accepted change. Thanks.
I made a few comments. Looks good otherwise. I haven't actually run anything, though. If you need me to do that level of testing, let me know, and I'll see if I can work on it next week. |
I don't think you need to do extensive testing -- other than making sure it compiles. I'm doing this to try to catalog all the matrix related commands that currently exist -- writing up at least partial documentation along the way. The next step will be to consolidate and refactor the overlapping commands so that they are easier to maintain and to use -- that step will require additional testing. Meantime I think the upgraded documentation can be pulled into develop so I don't forget what has been done so far. -:) |
Michael,
I haven't yet consolidated my linear algebra macros (and problem
collection) because the course is still ongoing. When the course is
finished, I am hoping to organize the macros in a more coherent way
and to add the problems to the library. At that time I'll ask you
about the best way of doing these things.
…-- Peter
Michael Gage wrote:
mgage commented on this pull request.
>
=item Get the reduced column echelon form: C<$Areduced = rcef($A);>
-=item Change the value of a matrix entry: C<change_matrix_entry($A,[2,3],50);> changes the [2,3] entry to the value 50.
+=item Change the value of a matrix entry: C<change_matrix_entry($A,[2,3],50);>
+
+changes the [2,3] entry to the value 50.
=item Construct an n x n identity matrix: C<$E = identity_matrix(5);>
True, but I believe it was added after MatrixReduce.pl was created. I've added a deprecated statement to this for now. Eventually I'd like to consolidate functions in MatrixReduce, and in Tableau and in Peter @selinger 's linear algebra macros. Some of them should go into Value::Matrix -- the others should be gathered into a small number of macro files.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#338 (comment)
|
# Conflicts: # macros/MatrixReduce.pl fixed.
Cleaned up the conflict with MatrixReduce.pl |
This pull requests is a cleaner version of pull request 328. Only the pod documents are modified.