#534 closed defect (fixed)
clarification of psVectorCreate()'s functionality requested by MHPCC
| Reported by: | jhoblitt | Owned by: | Paul Price |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | PSLib SDRS | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: | David.Robbins@… |
Description
Sorry, but one more thing...
psVectorCreate in the SDRS is:
psVector psVectorCreate(psVector *input, double lower, double upper,
double delta, psElemType type);
It doesn't state what the return psVector is supposed to be, nor why it
returns a psVector AND takes a psVector*. One of these seems
unnecessary. The prototype code has it as returning a psVector* without
the first argument.
How would you like this implemented?
-Dave
Note:
See TracTickets
for help on using tickets.

"This function creates a new vector, or reallocates the provided vector
if input is not NULL."
The prototype in the SDRS is missing a *. It should be:
psVector *psVectorCreate(psVector *input, double lower, double upper, double
delta, psElemType type);
It takes a psVector* because we want to be able to pass in a vector to be
"recycled". It must return a psVector* because the input may be NULL.
Please let me know if there's confusion, but I think this is quite clear.