Functions | |
| cpl_vector * | cpl_vector_new (const int n) |
| Create a new cpl_vector. More... | |
| void | cpl_vector_delete (cpl_vector *v) |
| Delete a cpl_vector. More... | |
| void | cpl_vector_dump (const cpl_vector *v, FILE *f) |
| Dump a cpl_vector in a file or stdout. More... | |
| cpl_vector * | cpl_vector_read (const char *filename) |
| Read a list of points from an ASCII file and create a cpl_vector. More... | |
| cpl_vector * | cpl_vector_duplicate (const cpl_vector *v) |
| This function duplicates an existing vector and allocates memory. More... | |
| cpl_error_code | cpl_vector_copy (cpl_vector *destination, const cpl_vector *source) |
| This function copies contents of a vector into another vector. More... | |
| int | cpl_vector_get_size (const cpl_vector *in) |
| Get the size of the vector. More... | |
| double * | cpl_vector_get_data (const cpl_vector *in) |
| Get a pointer to the data part of the vector. More... | |
| cpl_error_code | cpl_vector_add (cpl_vector *v1, const cpl_vector *v2) |
| Add a cpl_vector to another. More... | |
| cpl_error_code | cpl_vector_subtract (cpl_vector *v1, const cpl_vector *v2) |
| Subtract a cpl_vector from another. More... | |
| cpl_error_code | cpl_vector_multiply (cpl_vector *v1, const cpl_vector *v2) |
| Multiply two vectors component-wise. More... | |
| cpl_error_code | cpl_vector_divide (cpl_vector *v1, const cpl_vector *v2) |
| Divide two vectors component-wise. More... | |
| cpl_error_code | cpl_vector_sort (cpl_vector *v, const int c) |
| Sort a cpl_vector by increasing/decreasing data. More... | |
| cpl_error_code | cpl_vector_const_op (cpl_vector *v, const double value, const int operation) |
| Constant arithmetic on a vector. More... | |
| cpl_error_code | cpl_vector_fill (cpl_vector *v, const double val) |
| Fill a cpl_vector. More... | |
| cpl_error_code | cpl_vector_sqrt (cpl_vector *v) |
| Compute the sqrt of a cpl_vector. More... | |
| cpl_error_code | cpl_vector_threshold (cpl_vector *v, const int side, const double value) |
| Set to a value the elements above or under this value. More... | |
| int | cpl_vector_compare (const cpl_vector *v1, const cpl_vector *v2, const double tolerance) |
| Compare two vectors. More... | |
| int | cpl_vector_find_index (const cpl_vector *v, const double key, int *found_ptr) |
| Find the abscissa index just below a given value in a vector. More... | |
| double | cpl_vector_min (const cpl_vector *v) |
| Get the minimum of the cpl_vector. More... | |
| double | cpl_vector_max (const cpl_vector *v) |
| Get the maximum of the cpl_vector. More... | |
| double | cpl_vector_mean (const cpl_vector *v) |
| Compute the mean value of vector elements. More... | |
| double | cpl_vector_mean_reject (const cpl_vector *v, const int low, const int high) |
| Sorts the input vector, takes out highest and lowest values, and returns the average of the remaining data. More... | |
| cpl_vector * | cpl_vector_filter_lowpass (const cpl_vector *v, const int filter_type, const int hw) |
| Apply a low-pass filter to a cpl_vector. More... | |
| cpl_vector * | cpl_vector_filter_median (const cpl_vector *v, const int hw) |
| Apply a 1d median filter of given half-width to a cpl_vector. More... | |
A cpl_vector is an object containing a list of values (as doubles) and the number of values. The functionalities provided here are simple ones like sorting, statistics, or simple operations. The cpl_1dfunction object is composed of two of these vectors.
#include "cpl_vector.h"
|
||||||||||||
|
Add a cpl_vector to another.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||
|
Compare two vectors.
|
|
||||||||||||||||
|
Constant arithmetic on a vector.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
This function copies contents of a vector into another vector.
|
|
|
Delete a cpl_vector.
|
|
||||||||||||
|
Divide two vectors component-wise.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Dump a cpl_vector in a file or stdout.
stdout or stderr. |
|
|
This function duplicates an existing vector and allocates memory.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Fill a cpl_vector.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||
|
Apply a low-pass filter to a cpl_vector.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Apply a 1d median filter of given half-width to a cpl_vector.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||
|
Find the abscissa index just below a given value in a vector.
|
|
|
Get a pointer to the data part of the vector.
Possible _cpl_error_code_ set in this function:
|
|
|
Get the size of the vector.
|
|
|
Get the maximum of the cpl_vector.
|
|
|
Compute the mean value of vector elements.
|
|
||||||||||||||||
|
Sorts the input vector, takes out highest and lowest values, and returns the average of the remaining data.
Possible _cpl_error_code_ set in this function:
|
|
|
Get the minimum of the cpl_vector.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Multiply two vectors component-wise.
|
|
|
Create a new cpl_vector.
Possible _cpl_error_code_ set in this function:
|
|
|
Read a list of points from an ASCII file and create a cpl_vector.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Sort a cpl_vector by increasing/decreasing data.
|
|
|
Compute the sqrt of a cpl_vector.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Subtract a cpl_vector from another.
|
|
||||||||||||||||
|
Set to a value the elements above or under this value.
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002