#30 closed defect (fixed)
Questions for psMatrix functions
| Reported by: | Owned by: | Paul Price | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | PSLib SDRS | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Question 1:
In the April 1 version of the SDR, NULL pointer arguments are allowed for many
of the matrix functions. The May 15 version does not mention these. Which of
the below listed is the desired functionality?
- NULL pointers not allowed. The function should report an error.
- The function allocates memory for NULL pointers.
- The function performs in-place substitution of another pointer argument for
the result. If so please indicate which argument receives new data.
Question 2:
In the May 15 version of the SDR, only psF32 and psF64 data types are required.
What should be done if the user accidentally supplies two different types to a
function?
- The function should report an error and return immediately.
- The function should automatically adjust the data to the larger type.
Question 3:
The GSL equivalent matrix manipulation functions for psMatrixLUD() and
psMatrixLUSolve() both have an extra argument in their function calls for a
permutation vector to assist in algorithm performance. I'd like to include this
argument in psMatrixLUD() and psMatrixLUSolve() to take advantage of this
feature. Is this ok?
Question 4:
The functions psMatrixToVector and psVectorToMatrix convert vectors to/from
matrices. Is the format of the resulting matrix or vector from these functions
simply a 1-d column of numbers?
Question 5:
The SDR matrix section on the psMatrixOp has an open question still in the
documentation about matrix addition. What is the decision for matrix addition
with psMartixOp...keep it or remove it?
Change History (5)
comment:1 by , 22 years ago
| Owner: | changed from to |
|---|
comment:2 by , 22 years ago
| Status: | new → assigned |
|---|
comment:3 by , 22 years ago
Concerning Question 4: A 1-D column (1xn) matrix requires significantly more
storage than a 1-D row (nx1) matrix (the array of row pointers would be length 1
instead of n). Don't know if you can avoid this given the operations you might
want to perform, but I thought I'd point that out anyway.
comment:4 by , 22 years ago
The dimension would depend whether the psVector is a "vector" or a "transposed
vector".
comment:5 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |

Q1: I think you are referring to the "psImage *out" variables passed into most
functions. This hasn't changed, despite the more succinct listing in the v01
SDRS (May 15). So the 2nd option is the one: The function allocates memory for
the output if out == NULL.
Q2: I'm inclined to have the function generate an error if the type is not
correct. This could be updated later if we find that we want to do matrix ops
on, e.g., integers, but for now, generate an error.
Q3: Let me think about it.
Q4: Yes.
Q5: I think Gene and I decided that psMatrixOp would become a psMatrixMultiply
(or similar), since the only unique operation it provides is matrix
multiplication. So, yes, addition will go.
I haven't updated the SDRS to clarify these yet, but hope to some time in the
future.