Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the Math-MatrixReal CPAN distribution.

Report information
The Basics
Id: 52282
Status: new
Priority: 0/
Queue: Math-MatrixReal

People
Owner: Nobody in particular
Requestors: ILLVILJA [...] cpan.org
Cc: jonathan [...] leto.net
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



CC: jonathan [...] leto.net
Subject: Better vector support: function for generating unit vector as well as creating column vectors.
Download (untitled) / with headers
text/plain 1.2k
Hello! The module Math::GSL::Vector contains a nice method, "normalize" which returns the unit vector for a specific vector. Could we have the same functionality to Math::MatrixReal, that is, given a (column) vector, return a matrix of the same dimensions (that is, an equally large column vector) with the unit vector for that vector? I know that we cannot call that function/method "normalize", because that name is already taken for another, quite different operation. One of the names "unitvector" or "unit" can be a nice choice. If you don't have time to create that functionality, would you accept a patch that implement it? Just curious. And if so, what name would you prefer for that added function/method? Also, to turn Math::MatrixReal into a "Math::VectorReal in disguise", would it be possible to create some sort of convenience method for make it easier to create matrix object denoting column vector? This is not critical, but it would be nice, as the syntax Math::MatrixReal->new([[$x],[$y],[$z]]) of course is useful and readable but still a bit cumbersome and inelegant. Something along the lines Math::MatrixReal->new_column_vector($x,$y,$z) would be easy to both code and read. Best regards /IllvilJa


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.