Functions | |
| void | cpl_bivector_delete (cpl_bivector *f) |
| Delete a cpl_bivector. | |
| void | cpl_bivector_dump (const cpl_bivector *f, FILE *stream) |
| Dump a cpl_bivector as ASCII to a stream. | |
| cpl_bivector * | cpl_bivector_duplicate (const cpl_bivector *in) |
| Duplicate a cpl_bivector. | |
| int | cpl_bivector_get_size (const cpl_bivector *in) |
| Get the size of the cpl_bivector. | |
| cpl_vector * | cpl_bivector_get_x (cpl_bivector *in) |
| Get a pointer to the x vector of the cpl_bivector. | |
| const cpl_vector * | cpl_bivector_get_x_const (const cpl_bivector *in) |
| Get a pointer to the x vector of the cpl_bivector. | |
| double * | cpl_bivector_get_x_data (cpl_bivector *in) |
| Get a pointer to the x data part of the cpl_bivector. | |
| const double * | cpl_bivector_get_x_data_const (const cpl_bivector *in) |
| Get a pointer to the x data part of the cpl_bivector. | |
| cpl_vector * | cpl_bivector_get_y (cpl_bivector *in) |
| Get a pointer to the y vector of the cpl_bivector. | |
| const cpl_vector * | cpl_bivector_get_y_const (const cpl_bivector *in) |
| Get a pointer to the y vector of the cpl_bivector. | |
| double * | cpl_bivector_get_y_data (cpl_bivector *in) |
| Get a pointer to the y data part of the cpl_bivector. | |
| const double * | cpl_bivector_get_y_data_const (const cpl_bivector *in) |
| Get a pointer to the y data part of the cpl_bivector. | |
| cpl_error_code | cpl_bivector_interpolate_linear (cpl_bivector *fout, const cpl_bivector *fref) |
| Linear interpolation of a 1d-function. | |
| cpl_bivector * | cpl_bivector_new (int n) |
| Create a new cpl_bivector. | |
| cpl_bivector * | cpl_bivector_read (const char *filename) |
| Read a list of values from an ASCII file and create a cpl_bivector. | |
| void | cpl_bivector_unwrap_vectors (cpl_bivector *f) |
| Free memory associated to a cpl_bivector, excluding the two vectors. | |
| cpl_bivector * | cpl_bivector_wrap_vectors (cpl_vector *x, cpl_vector *y) |
| Create a new cpl_bivector from two cpl_vectors. | |
A cpl_bivector is composed of two vectors of the same size. It can be used to store 1d functions, with the x and y positions of the samples, offsets in x and y or simply positions in an image.
This module provides the possibility to compute a local maximum, to cross-correlate two signals, etc...
#include "cpl_bivector.h"
| void cpl_bivector_delete | ( | cpl_bivector * | f | ) |
Delete a cpl_bivector.
| f | cpl_bivector to delete |
NULL, nothing is done, and no error is set.
| void cpl_bivector_dump | ( | const cpl_bivector * | f, | |
| FILE * | stream | |||
| ) |
Dump a cpl_bivector as ASCII to a stream.
| f | Input cpl_bivector to dump or NULL | |
| stream | Output stream, accepts stdout or stderr or NULL |
stream may be NULL in which case stdout is used.
| cpl_bivector* cpl_bivector_duplicate | ( | const cpl_bivector * | in | ) |
Duplicate a cpl_bivector.
| in | cpl_bivector to duplicate |
Possible _cpl_error_code_ set in this function:
| int cpl_bivector_get_size | ( | const cpl_bivector * | in | ) |
Get the size of the cpl_bivector.
| in | the input bivector |
| cpl_vector* cpl_bivector_get_x | ( | cpl_bivector * | in | ) |
Get a pointer to the x vector of the cpl_bivector.
| in | a cpl_bivector |
Possible _cpl_error_code_ set in this function:
| const cpl_vector* cpl_bivector_get_x_const | ( | const cpl_bivector * | in | ) |
Get a pointer to the x vector of the cpl_bivector.
| in | a cpl_bivector |
| double* cpl_bivector_get_x_data | ( | cpl_bivector * | in | ) |
Get a pointer to the x data part of the cpl_bivector.
| in | a cpl_bivector |
| const double* cpl_bivector_get_x_data_const | ( | const cpl_bivector * | in | ) |
Get a pointer to the x data part of the cpl_bivector.
| in | a cpl_bivector |
| cpl_vector* cpl_bivector_get_y | ( | cpl_bivector * | in | ) |
Get a pointer to the y vector of the cpl_bivector.
| in | a cpl_bivector |
Possible _cpl_error_code_ set in this function:
| const cpl_vector* cpl_bivector_get_y_const | ( | const cpl_bivector * | in | ) |
Get a pointer to the y vector of the cpl_bivector.
| in | a cpl_bivector |
| double* cpl_bivector_get_y_data | ( | cpl_bivector * | in | ) |
Get a pointer to the y data part of the cpl_bivector.
| in | a cpl_bivector |
| const double* cpl_bivector_get_y_data_const | ( | const cpl_bivector * | in | ) |
Get a pointer to the y data part of the cpl_bivector.
| in | a cpl_bivector |
| cpl_error_code cpl_bivector_interpolate_linear | ( | cpl_bivector * | fout, | |
| const cpl_bivector * | fref | |||
| ) |
Linear interpolation of a 1d-function.
| fref | Reference 1d-function | |
| fout | Preallocated 1d-function to contain result |
The linear interpolation will be done from the values in fref to the abscissa points in fout.
The abscissa points of both fref and fout must be growing, x_i < x_i+1.
The abscissa points of fout must be in range of those of fref (i.e. extrapolation is not allowed).
fref must be of at least length 2.
Possible _cpl_error_code_ set in this function:
| cpl_bivector* cpl_bivector_new | ( | int | n | ) |
Create a new cpl_bivector.
| n | Positive number of points |
Possible _cpl_error_code_ set in this function:
| cpl_bivector* cpl_bivector_read | ( | const char * | filename | ) |
Read a list of values from an ASCII file and create a cpl_bivector.
| filename | Name of the input ASCII file |
The returned object must be deallocated using cpl_bivector_delete() Two columns of numbers are expected in the input file.
In addition to normal files, FIFO (see man mknod) are also supported.
Possible _cpl_error_code_ set in this function:
| void cpl_bivector_unwrap_vectors | ( | cpl_bivector * | f | ) |
Free memory associated to a cpl_bivector, excluding the two vectors.
| f | cpl_bivector to delete |
| cpl_bivector* cpl_bivector_wrap_vectors | ( | cpl_vector * | x, | |
| cpl_vector * | y | |||
| ) |
Create a new cpl_bivector from two cpl_vectors.
| x | the x cpl_vector | |
| y | the y cpl_vector |
Possible _cpl_error_code_ set in this function:
1.4.7