#include <cpl.h>
Go to the source code of this file.
cpl_vector* clipm_priv_vector_differentiate |
( |
const cpl_vector * |
v | ) |
|
Differentiate a signal stored in a vector.
- Parameters
-
- Returns
- The minimum value, 0 in the case of error
- Error Handling:
- Possible error code set by this function:
- CPL_ERROR_NULL_INPUT: v is NULL
outdata = indata[0] - indata[-1];
cpl_vector* clipm_priv_vector_expand |
( |
const cpl_vector * |
v, |
|
|
cpl_size |
prepend_nr, |
|
|
cpl_size |
append_nr |
|
) |
| |
Prepend and append borderwidth 0-elements to v, respectively.
- Parameters
-
v | Input vector |
prepend_nr | Number of elements that are going to be prepended at the beginning of v |
append_nr | Number of elements that are going to be appended to the end of v |
- Returns
- Resulting vector, NULL in the case of error
- Error Handling:
- The following error codes can be set:
- CPL_ERROR_NULL_INPUT: v is NULL
- CPL_ERROR_ILLEGAL_INPUT: prepend_nr < 0 or append_nr < 0
double clipm_priv_vector_get_max |
( |
const cpl_vector * |
v, |
|
|
cpl_size * |
index |
|
) |
| |
Return maximum and corresponding index of a vector.
- Parameters
-
v | Input vector |
index | Output index, where the maximum has been found, can be NULL, returns -1 in the case of error |
- Returns
- The maximum value, 0 in the case of error
- Error Handling:
- Possible error code set by this function:
- CPL_ERROR_NULL_INPUT: v is NULL
double clipm_priv_vector_get_min |
( |
const cpl_vector * |
v, |
|
|
cpl_size * |
index |
|
) |
| |
Return minimum and corresponding index of a vector.
- Parameters
-
v | Input vector |
index | Output index, where the minimum has been found, can be NULL, returns -1 in the case of error |
- Returns
- The minimum value, 0 in the case of error
- Error Handling:
- Possible error code set by this function:
- CPL_ERROR_NULL_INPUT: v is NULL
cpl_vector* clipm_priv_vector_get_normal |
( |
const cpl_vector ** |
dv | ) |
|
Get the n-dimensional normal vector to n-1 direction vectors.
- Parameters
-
dv | Array of n-1 direction vectors |
- Returns
- Normal vector, NULL in the case of error
- Overview:
- The number of vectors in dv must be n-1, where n is the length of the vectors. All vectors must have the same length.
- The number of dimensions must be at least 2.
- The number of dimensions n is determined from the first vector in dv.
- Mathematical Meaning:
- The result vector is also referred to in literature as .
- The norm of the result vector equals the (n-1)-dimensional volume of the parallelepiped spanned by the input vectors. This means, parallel input vectors will cause a result vector of zero length.
- Note
- If the size of dv is less than n-1, the function will crash the application!
- Error Handling:
- The following error codes can be set by this function:
- CPL_ERROR_NULL_INPUT: dv == NULL, or any of the entries of dv is NULL
- CPL_ERROR_INCOMPATIBLE_INPUT: not all entries (vectors) of dv have the same size
- CPL_ERROR_ILLEGAL_INPUT: the number of dimensions is less than 2
cpl_vector* clipm_priv_vector_integrate |
( |
const cpl_vector * |
v | ) |
|
Integrate a signal stored in a vector.
- Parameters
-
- Returns
- The minimum value, 0 in the case of error
- Error Handling:
- Possible error code set by this function:
- CPL_ERROR_NULL_INPUT: v is NULL
void clipm_priv_vector_null |
( |
cpl_vector ** |
v | ) |
|
Delete a CPL vector object and set the pointer to NULL.
- Parameters
-
v | Pointer to vector pointer |
- Returns
- Nothing
The following code is executed:
if (v != NULL)
{
cpl_vector_delete(*v);
*v = NULL;
}
*
- Error Handling:
- No error can occur here.