spLib
Loading...
Searching...
No Matches
<sp/voperate.h>: Vector Operation

Vector Operation (<sp/voperate.h>)

void svoper (spSVector a, const char *op, spSVector b)
 
spSVector xsvoper (spSVector a, const char *op, spSVector b)
 
void svscoper (spSVector a, const char *op, double t)
 
spSVector xsvscoper (spSVector a, const char *op, double t)
 
void svcplxoper (spSVector a, const char *op, double tr, double ti)
 
spSVector xsvcplxoper (spSVector a, const char *op, double tr, double ti)
 
void lvoper (spLVector a, const char *op, spLVector b)
 
spLVector xlvoper (spLVector a, const char *op, spLVector b)
 
void lvscoper (spLVector a, const char *op, double t)
 
spLVector xlvscoper (spLVector a, const char *op, double t)
 
void lvcplxoper (spLVector a, const char *op, double tr, double ti)
 
spLVector xlvcplxoper (spLVector a, const char *op, double tr, double ti)
 
void fvoper (spFVector a, const char *op, spFVector b)
 
spFVector xfvoper (spFVector a, const char *op, spFVector b)
 
void fvscoper (spFVector a, const char *op, float t)
 
spFVector xfvscoper (spFVector a, const char *op, float t)
 
void fvcplxoper (spFVector a, const char *op, float tr, float ti)
 
spFVector xfvcplxoper (spFVector a, const char *op, float tr, float ti)
 
void dvoper (spDVector a, const char *op, spDVector b)
 
spDVector xdvoper (spDVector a, const char *op, spDVector b)
 
void dvscoper (spDVector a, const char *op, double t)
 
spDVector xdvscoper (spDVector a, const char *op, double t)
 
void dvcplxoper (spDVector a, const char *op, double tr, double ti)
 
spDVector xdvcplxoper (spDVector a, const char *op, double tr, double ti)
 

Element Comparison (<sp/voperate.h>)

void svsceval (spSVector x, const char *op, short t)
 
spSVector xsvsceval (spSVector x, const char *op, short t)
 
void lvsceval (spLVector x, const char *op, long t)
 
spLVector xlvsceval (spLVector x, const char *op, long t)
 
void fvsceval (spFVector x, const char *op, float t)
 
spFVector xfvsceval (spFVector x, const char *op, float t)
 
void dvsceval (spDVector x, const char *op, double t)
 
spDVector xdvsceval (spDVector x, const char *op, double t)
 
spLVector xsvscfind (spSVector x, const char *op, short t)
 
spLVector xlvscfind (spLVector x, const char *op, long t)
 
spLVector xfvscfind (spFVector x, const char *op, float t)
 
spLVector xdvscfind (spDVector x, const char *op, double t)
 
spSVector xsvscfindv (spSVector x, const char *op, short t)
 
spLVector xlvscfindv (spLVector x, const char *op, long t)
 
spFVector xfvscfindv (spFVector x, const char *op, float t)
 
spDVector xdvscfindv (spDVector x, const char *op, double t)
 

Element Reorder (<sp/voperate.h>)

spSVector xsvremap (spSVector x, spLVector map)
 
spLVector xlvremap (spLVector x, spLVector map)
 
spFVector xfvremap (spFVector x, spLVector map)
 
spDVector xdvremap (spDVector x, spLVector map)
 

Element Extraction (<sp/voperate.h>)

spLVector xsvfind (spSVector x)
 
spLVector xlvfind (spLVector x)
 
spLVector xfvfind (spFVector x)
 
spLVector xdvfind (spDVector x)
 
spSVector xsvfindv (spSVector x)
 
spLVector xlvfindv (spLVector x)
 
spFVector xfvfindv (spFVector x)
 
spDVector xdvfindv (spDVector x)
 

Detailed Description

Function Documentation

◆ svoper()

void svoper ( spSVector a,
const char * op,
spSVector b )

Executes an element-wise arithmetic operation of two input vectors.

Parameters
[in,out]aThe first input vector. The computed result for each element overwrites the input element of a.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the input vectors will be reversed if "!" is specified before the operator. For example, "!/" divides each element of b by the corresponding element of a .
[in]bThe second input vector.

◆ xsvoper()

spSVector xsvoper ( spSVector a,
const char * op,
spSVector b )

Executes an element-wise arithmetic operation of two input vectors. The memory of the returned vector must be deallocated.

Parameters
[in]aThe first input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the input vectors will be reversed if "!" is specified before the operator. For example, "!/" divides each element of b by the corresponding element of a .
[in]bThe second input vector.
Returns
The memory-allocated vector containing the operation results.

◆ svscoper()

void svscoper ( spSVector a,
const char * op,
double t )

Executes an arithmetic operation between each element of the input vector and the input scalar.

Parameters
[in,out]aThe input vector. The computed result for each element overwrites the input element of a.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar t by each element of a .
[in]tThe input scalar.

◆ xsvscoper()

spSVector xsvscoper ( spSVector a,
const char * op,
double t )

Executes an arithmetic operation between each element of the input vector and the input scalar. The memory of the returned vector must be deallocated.

Parameters
[in]aThe input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar t by each element of a .
[in]tThe input scalar.
Returns
The memory-allocated vector containing the operation results.

◆ svcplxoper()

void svcplxoper ( spSVector a,
const char * op,
double tr,
double ti )

Executes an arithmetic operation between each element of the input vector and the input complex scalar.

Parameters
[in,out]aThe input vector. The computed result for each element overwrites the input element of a. If this vector doesn't have the imaginary part, the memory of the imaginary part will be allocated automatically.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar tr + j * ti by each element of a .
[in]trThe real part of the input scalar.
[in]tiThe imaginary part of the input scalar.

◆ xsvcplxoper()

spSVector xsvcplxoper ( spSVector a,
const char * op,
double tr,
double ti )

Executes an arithmetic operation between each element of the input vector and the input complex scalar. The memory of the returned vector must be deallocated.

Parameters
[in]aThe input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar tr + j * ti by each element of a .
[in]trThe real part of the input scalar.
[in]tiThe imaginary part of the input scalar.
Returns
The memory-allocated vector containing the operation results.

◆ lvoper()

void lvoper ( spLVector a,
const char * op,
spLVector b )

Executes an element-wise arithmetic operation of two input vectors.

Parameters
[in,out]aThe first input vector. The computed result for each element overwrites the input element of a.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the input vectors will be reversed if "!" is specified before the operator. For example, "!/" divides each element of b by the corresponding element of a .
[in]bThe second input vector.

◆ xlvoper()

spLVector xlvoper ( spLVector a,
const char * op,
spLVector b )

Executes an element-wise arithmetic operation of two input vectors. The memory of the returned vector must be deallocated.

Parameters
[in]aThe first input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the input vectors will be reversed if "!" is specified before the operator. For example, "!/" divides each element of b by the corresponding element of a .
[in]bThe second input vector.
Returns
The memory-allocated vector containing the operation results.

◆ lvscoper()

void lvscoper ( spLVector a,
const char * op,
double t )

Executes an arithmetic operation between each element of the input vector and the input scalar.

Parameters
[in,out]aThe input vector. The computed result for each element overwrites the input element of a.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar t by each element of a .
[in]tThe input scalar.

◆ xlvscoper()

spLVector xlvscoper ( spLVector a,
const char * op,
double t )

Executes an arithmetic operation between each element of the input vector and the input scalar. The memory of the returned vector must be deallocated.

Parameters
[in]aThe input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar t by each element of a .
[in]tThe input scalar.
Returns
The memory-allocated vector containing the operation results.

◆ lvcplxoper()

void lvcplxoper ( spLVector a,
const char * op,
double tr,
double ti )

Executes an arithmetic operation between each element of the input vector and the input complex scalar.

Parameters
[in,out]aThe input vector. The computed result for each element overwrites the input element of a. If this vector doesn't have the imaginary part, the memory of the imaginary part will be allocated automatically.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar tr + j * ti by each element of a .
[in]trThe real part of the input scalar.
[in]tiThe imaginary part of the input scalar.

◆ xlvcplxoper()

spLVector xlvcplxoper ( spLVector a,
const char * op,
double tr,
double ti )

Executes an arithmetic operation between each element of the input vector and the input complex scalar. The memory of the returned vector must be deallocated.

Parameters
[in]aThe input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar tr + j * ti by each element of a .
[in]trThe real part of the input scalar.
[in]tiThe imaginary part of the input scalar.
Returns
The memory-allocated vector containing the operation results.

◆ fvoper()

void fvoper ( spFVector a,
const char * op,
spFVector b )

Executes an element-wise arithmetic operation of two input vectors.

Parameters
[in,out]aThe first input vector. The computed result for each element overwrites the input element of a.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the input vectors will be reversed if "!" is specified before the operator. For example, "!/" divides each element of b by the corresponding element of a .
[in]bThe second input vector.

◆ xfvoper()

spFVector xfvoper ( spFVector a,
const char * op,
spFVector b )

Executes an element-wise arithmetic operation of two input vectors. The memory of the returned vector must be deallocated.

Parameters
[in]aThe first input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the input vectors will be reversed if "!" is specified before the operator. For example, "!/" divides each element of b by the corresponding element of a .
[in]bThe second input vector.
Returns
The memory-allocated vector containing the operation results.

◆ fvscoper()

void fvscoper ( spFVector a,
const char * op,
float t )

Executes an arithmetic operation between each element of the input vector and the input scalar.

Parameters
[in,out]aThe input vector. The computed result for each element overwrites the input element of a.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar t by each element of a .
[in]tThe input scalar.

◆ xfvscoper()

spFVector xfvscoper ( spFVector a,
const char * op,
float t )

Executes an arithmetic operation between each element of the input vector and the input scalar. The memory of the returned vector must be deallocated.

Parameters
[in]aThe input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar t by each element of a .
[in]tThe input scalar.
Returns
The memory-allocated vector containing the operation results.

◆ fvcplxoper()

void fvcplxoper ( spFVector a,
const char * op,
float tr,
float ti )

Executes an arithmetic operation between each element of the input vector and the input complex scalar.

Parameters
[in,out]aThe input vector. The computed result for each element overwrites the input element of a. If this vector doesn't have the imaginary part, the memory of the imaginary part will be allocated automatically.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar tr + j * ti by each element of a .
[in]trThe real part of the input scalar.
[in]tiThe imaginary part of the input scalar.

◆ xfvcplxoper()

spFVector xfvcplxoper ( spFVector a,
const char * op,
float tr,
float ti )

Executes an arithmetic operation between each element of the input vector and the input complex scalar. The memory of the returned vector must be deallocated.

Parameters
[in]aThe input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar tr + j * ti by each element of a .
[in]trThe real part of the input scalar.
[in]tiThe imaginary part of the input scalar.
Returns
The memory-allocated vector containing the operation results.

◆ dvoper()

void dvoper ( spDVector a,
const char * op,
spDVector b )

Executes an element-wise arithmetic operation of two input vectors.

Parameters
[in,out]aThe first input vector. The computed result for each element overwrites the input element of a.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the input vectors will be reversed if "!" is specified before the operator. For example, "!/" divides each element of b by the corresponding element of a .
[in]bThe second input vector.

◆ xdvoper()

spDVector xdvoper ( spDVector a,
const char * op,
spDVector b )

Executes an element-wise arithmetic operation of two input vectors. The memory of the returned vector must be deallocated.

Parameters
[in]aThe first input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the input vectors will be reversed if "!" is specified before the operator. For example, "!/" divides each element of b by the corresponding element of a .
[in]bThe second input vector.
Returns
The memory-allocated vector containing the operation results.

◆ dvscoper()

void dvscoper ( spDVector a,
const char * op,
double t )

Executes an arithmetic operation between each element of the input vector and the input scalar.

Parameters
[in,out]aThe input vector. The computed result for each element overwrites the input element of a.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar t by each element of a .
[in]tThe input scalar.

◆ xdvscoper()

spDVector xdvscoper ( spDVector a,
const char * op,
double t )

Executes an arithmetic operation between each element of the input vector and the input scalar. The memory of the returned vector must be deallocated.

Parameters
[in]aThe input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar t by each element of a .
[in]tThe input scalar.
Returns
The memory-allocated vector containing the operation results.

◆ dvcplxoper()

void dvcplxoper ( spDVector a,
const char * op,
double tr,
double ti )

Executes an arithmetic operation between each element of the input vector and the input complex scalar.

Parameters
[in,out]aThe input vector. The computed result for each element overwrites the input element of a. If this vector doesn't have the imaginary part, the memory of the imaginary part will be allocated automatically.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar tr + j * ti by each element of a .
[in]trThe real part of the input scalar.
[in]tiThe imaginary part of the input scalar.

◆ xdvcplxoper()

spDVector xdvcplxoper ( spDVector a,
const char * op,
double tr,
double ti )

Executes an arithmetic operation between each element of the input vector and the input complex scalar. The memory of the returned vector must be deallocated.

Parameters
[in]aThe input vector.
[in]opA null-terminated string indicating the type of the operator. "+", "-", "*", "/" and "^" correspond to addition, subtraction, multiplication, division and power respectively. Moreover, the order of the inputs will be reversed if "!" is specified before the operator. For example, "!/" divides the scalar tr + j * ti by each element of a .
[in]trThe real part of the input scalar.
[in]tiThe imaginary part of the input scalar.
Returns
The memory-allocated vector containing the operation results.

◆ xsvremap()

spSVector xsvremap ( spSVector x,
spLVector map )

Reorders the elements of the input vector x according to map . The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]mapThe 0-based index vector indicating mapping from the index of the input vector to that of the generated vector.
Returns
The memory-allocated vector after reordering.

◆ xlvremap()

spLVector xlvremap ( spLVector x,
spLVector map )

Reorders the elements of the input vector x according to map . The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]mapThe 0-based index vector indicating mapping from the index of the input vector to that of the generated vector.
Returns
The memory-allocated vector after reordering.

◆ xfvremap()

spFVector xfvremap ( spFVector x,
spLVector map )

Reorders the elements of the input vector x according to map . The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]mapThe 0-based index vector indicating mapping from the index of the input vector to that of the generated vector.
Returns
The memory-allocated vector after reordering.

◆ xdvremap()

spDVector xdvremap ( spDVector x,
spLVector map )

Reorders the elements of the input vector x according to map . The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]mapThe 0-based index vector indicating mapping from the index of the input vector to that of the generated vector.
Returns
The memory-allocated vector after reordering.

◆ xsvfind()

spLVector xsvfind ( spSVector x)

Extracts the indices of nonzero elements of x . The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
Returns
The memory-allocated vector containing the indices.

◆ xlvfind()

spLVector xlvfind ( spLVector x)

Extracts the indices of nonzero elements of x . The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
Returns
The memory-allocated vector containing the indices.

◆ xfvfind()

spLVector xfvfind ( spFVector x)

Extracts the indices of nonzero elements of x . The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
Returns
The memory-allocated vector containing the indices.

◆ xdvfind()

spLVector xdvfind ( spDVector x)

Extracts the indices of nonzero elements of x . The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
Returns
The memory-allocated vector containing the indices.

◆ xsvfindv()

spSVector xsvfindv ( spSVector x)

Extracts the elements of x which have a nonzero value. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
Returns
The memory-allocated vector containing elements with a nonzero value.

◆ xlvfindv()

spLVector xlvfindv ( spLVector x)

Extracts the elements of x which have a nonzero value. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
Returns
The memory-allocated vector containing elements with a nonzero value.

◆ xfvfindv()

spFVector xfvfindv ( spFVector x)

Extracts the elements of x which have a nonzero value. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
Returns
The memory-allocated vector containing elements with a nonzero value.

◆ xdvfindv()

spDVector xdvfindv ( spDVector x)

Extracts the elements of x which have a nonzero value. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
Returns
The memory-allocated vector containing elements with a nonzero value.

◆ svsceval()

void svsceval ( spSVector x,
const char * op,
short t )

Executes a relational operation between each element of the input vector and the input scalar, and resets the value of the element to 1 if the relation is true, or 0 otherwise.

Parameters
[in,out]xThe input vector. The computed result for each element overwrites the input element of x.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.

◆ xsvsceval()

spSVector xsvsceval ( spSVector x,
const char * op,
short t )

Executes a relational operation between each element of the input vector and the input scalar, and resets the value of the element to 1 if the relation is true, or 0 otherwise. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated vector.

◆ lvsceval()

void lvsceval ( spLVector x,
const char * op,
long t )

Executes a relational operation between each element of the input vector and the input scalar, and resets the value of the element to 1 if the relation is true, or 0 otherwise.

Parameters
[in,out]xThe input vector. The computed result for each element overwrites the input element of x.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.

◆ xlvsceval()

spLVector xlvsceval ( spLVector x,
const char * op,
long t )

Executes a relational operation between each element of the input vector and the input scalar, and resets the value of the element to 1 if the relation is true, or 0 otherwise. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated vector.

◆ fvsceval()

void fvsceval ( spFVector x,
const char * op,
float t )

Executes a relational operation between each element of the input vector and the input scalar, and resets the value of the element to 1 if the relation is true, or 0 otherwise.

Parameters
[in,out]xThe input vector. The computed result for each element overwrites the input element of x.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.

◆ xfvsceval()

spFVector xfvsceval ( spFVector x,
const char * op,
float t )

Executes a relational operation between each element of the input vector and the input scalar, and resets the value of the element to 1 if the relation is true, or 0 otherwise. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated vector.

◆ dvsceval()

void dvsceval ( spDVector x,
const char * op,
double t )

Executes a relational operation between each element of the input vector and the input scalar, and resets the value of the element to 1 if the relation is true, or 0 otherwise.

Parameters
[in,out]xThe input vector. The computed result for each element overwrites the input element of x.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.

◆ xdvsceval()

spDVector xdvsceval ( spDVector x,
const char * op,
double t )

Executes a relational operation between each element of the input vector and the input scalar, and resets the value of the element to 1 if the relation is true, or 0 otherwise. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated vector.

◆ xsvscfind()

spLVector xsvscfind ( spSVector x,
const char * op,
short t )

Executes a relational operation between each element of the input vector and the input scalar, and extracts the indices where the relation is true. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated index vector.

◆ xlvscfind()

spLVector xlvscfind ( spLVector x,
const char * op,
long t )

Executes a relational operation between each element of the input vector and the input scalar, and extracts the indices where the relation is true. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated index vector.

◆ xfvscfind()

spLVector xfvscfind ( spFVector x,
const char * op,
float t )

Executes a relational operation between each element of the input vector and the input scalar, and extracts the indices where the relation is true. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated index vector.

◆ xdvscfind()

spLVector xdvscfind ( spDVector x,
const char * op,
double t )

Executes a relational operation between each element of the input vector and the input scalar, and extracts the indices where the relation is true. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated index vector.

◆ xsvscfindv()

spSVector xsvscfindv ( spSVector x,
const char * op,
short t )

Executes a relational operation between each element of the input vector and the input scalar, and extracts the elements where the relation is true. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated vector containing elements where the relation is true.

◆ xlvscfindv()

spLVector xlvscfindv ( spLVector x,
const char * op,
long t )

Executes a relational operation between each element of the input vector and the input scalar, and extracts the elements where the relation is true. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated vector containing elements where the relation is true.

◆ xfvscfindv()

spFVector xfvscfindv ( spFVector x,
const char * op,
float t )

Executes a relational operation between each element of the input vector and the input scalar, and extracts the elements where the relation is true. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated vector containing elements where the relation is true.

◆ xdvscfindv()

spDVector xdvscfindv ( spDVector x,
const char * op,
double t )

Executes a relational operation between each element of the input vector and the input scalar, and extracts the elements where the relation is true. The memory of the returned vector must be deallocated.

Parameters
[in]xThe input vector.
[in]opA null-terminated string indicating the type of the relational operator. "<=", "<", ">=", ">", "==" and "!=" correspond to "less than", "less than or equal to", "greater than", "greater than or equal to", "equal to" and "not equal to" power respectively.
[in]tThe input scalar.
Returns
The memory-allocated vector containing elements where the relation is true.