Zephyr Scientific Library (zscilib)
Functions
Data Selection

Functions used to access subsets of the vector. More...

Functions

int zsl_vec_get_subset (struct zsl_vec *v, size_t offset, size_t len, struct zsl_vec *vsub)
 Returns a subset of source vector 'v' in 'vsub'.. More...
 

Detailed Description

Functions used to access subsets of the vector.

Function Documentation

◆ zsl_vec_get_subset()

int zsl_vec_get_subset ( struct zsl_vec v,
size_t  offset,
size_t  len,
struct zsl_vec vsub 
)

Returns a subset of source vector 'v' in 'vsub'..

Parameters
vThe parent vector to read a subset of.
offsetThe starting index (zero-based) foor the data subset.
lenThe number of values to read, starting at offset.
vsubThe subset vector, which must have a buffer of at least size 'len'. If the data buffer isn't sufficiently large, this function will return -EINVAL.
Returns
0 on success, -EINVAL on a size of index error.

Definition at line 42 of file vectors.c.

Referenced by zsl_mtx_householder(), and zsl_sta_trim_mean().