JWS C Library
C language utility library
vector.h File Reference

Declarations for a vector and associated functions. More...

#include <jwsc/config.h>
#include <stdlib.h>
#include <inttypes.h>
#include "jwsc/base/error.h"
#include "jwsc/math/complex.h"
Include dependency graph for vector.h:

Go to the source code of this file.

Data Structures

struct  Vector_i8
 Vector of signed 8-bit values. More...
struct  Vector_i16
 Vector of signed 16-bit values. More...
struct  Vector_i32
 Vector of signed 32-bit values. More...
struct  Vector_i64
 Vector of signed 64-bit values. More...
struct  Vector_u8
 Vector of unsigned 8-bit values. More...
struct  Vector_u16
 Vector of unsigned 16-bit values. More...
struct  Vector_u32
 Vector of unsigned 32-bit values. More...
struct  Vector_u64
 Vector of unsigned 64-bit values. More...
struct  Vector_f
 Vector of single precision floating point values. More...
struct  Vector_d
 Vector of double precision floating point values. More...
struct  Vector_cf
 Vector of single precision complex floating point values. More...
struct  Vector_cd
 Vector of double precision complex floating point values. More...

Functions

create_vector

Creates a vector of integer or floating point values.

void create_vector_u32 (Vector_u32 **v_out, uint32_t num_elts)
 32-bit unsigned integer.
void create_vector_i32 (Vector_i32 **v_out, uint32_t num_elts)
 32-bit signed integer.
void create_vector_i64 (Vector_i64 **v_out, uint32_t num_elts)
 64-bit signed integer.
void create_vector_f (Vector_f **v_out, uint32_t num_elts)
 Single precision floating point.
void create_vector_d (Vector_d **v_out, uint32_t num_elts)
 Double precision floating point.
void create_vector_cf (Vector_cf **v_out, uint32_t num_elts)
 Single precision complex floating point.
void create_vector_cd (Vector_cd **v_out, uint32_t num_elts)
 Double precision complex floating point.
create_init_vector

Creates and initializes a vector of integer or floating point values.

void create_init_vector_u32 (Vector_u32 **v_out, uint32_t num_elts, uint32_t val)
 32-bit unsigned integer.
void create_init_vector_i32 (Vector_i32 **v_out, uint32_t num_elts, int32_t val)
 32-bit signed integer.
void create_init_vector_i64 (Vector_i64 **v_out, uint32_t num_elts, int64_t val)
 64-bit signed integer.
void create_init_vector_f (Vector_f **v_out, uint32_t num_elts, float val)
 Single precision floating point.
void create_init_vector_d (Vector_d **v_out, uint32_t num_elts, double val)
 Double precision floating point.
void create_init_vector_cf (Vector_cf **v_out, uint32_t num_elts, Complex_f val)
 Single precision complex floating point.
void create_init_vector_cd (Vector_cd **v_out, uint32_t num_elts, Complex_d val)
 Double precision complex floating point.
create_zero_vector

Creates a vector of integer or floating point values and initializes it with zeros.

void create_zero_vector_u32 (Vector_u32 **v_out, uint32_t num_elts)
 32-bit unsigned integer.
void create_zero_vector_i32 (Vector_i32 **v_out, uint32_t num_elts)
 32-bit signed integer.
void create_zero_vector_i64 (Vector_i64 **v_out, uint32_t num_elts)
 64-bit signed integer.
void create_zero_vector_f (Vector_f **v_out, uint32_t num_elts)
 Single precision floating point.
void create_zero_vector_d (Vector_d **v_out, uint32_t num_elts)
 Double precision floating point.
void create_zero_vector_cf (Vector_cf **v_out, uint32_t num_elts)
 Single precision complex floating point.
void create_zero_vector_cd (Vector_cd **v_out, uint32_t num_elts)
 Double precision complex floating point.
create_random_vector

Creates a vector of integer or floating point values and initializes it with random values.

void create_random_vector_u32 (Vector_u32 **v_out, uint32_t num_elts, uint32_t min, uint32_t max)
 32-bit unsigned integer.
void create_random_vector_i32 (Vector_i32 **v_out, uint32_t num_elts, int32_t min, int32_t max)
 32-bit signed integer.
void create_random_vector_i64 (Vector_i64 **v_out, uint32_t num_elts, int64_t min, int64_t max)
 64-bit signed integer.
void create_random_vector_f (Vector_f **v_out, uint32_t num_elts, float min, float max)
 Single precision floating point.
void create_random_vector_d (Vector_d **v_out, uint32_t num_elts, double min, double max)
 Double precision floating point.
void create_random_vector_cf (Vector_cf **v_out, uint32_t num_elts, Complex_f min, Complex_f max)
 Single precision complex floating point.
void create_random_vector_cd (Vector_cd **v_out, uint32_t num_elts, Complex_d min, Complex_d max)
 Double precision complex floating point.
copy_vector

Copies a vector into another.

Errorcopy_vector_u32 (Vector_u32 **v_out, const Vector_u32 *v_in)
 32-bit unsigned integer.
Errorcopy_vector_i32 (Vector_i32 **v_out, const Vector_i32 *v_in)
 32-bit signed integer.
Errorcopy_vector_i64 (Vector_i64 **v_out, const Vector_i64 *v_in)
 64-bit signed integer.
Errorcopy_vector_f (Vector_f **v_out, const Vector_f *v_in)
 Single precision floating point.
Errorcopy_vector_d (Vector_d **v_out, const Vector_d *v_in)
 Double precision floating point.
Errorcopy_vector_cf (Vector_cf **v_out, const Vector_cf *v_in)
 Single precision complex floating point.
Errorcopy_vector_cd (Vector_cd **v_out, const Vector_cd *v_in)
 Double precision complex floating point.
copy_vector_section

Copies a section of a vector into another.

Errorcopy_vector_section_u32 (Vector_u32 **v_out, const Vector_u32 *v_in, uint32_t offset, uint32_t num_elts)
 32-bit unsigned integer.
Errorcopy_vector_section_i32 (Vector_i32 **v_out, const Vector_i32 *v_in, uint32_t offset, uint32_t num_elts)
 32-bit signed integer.
Errorcopy_vector_section_i64 (Vector_i64 **v_out, const Vector_i64 *v_in, uint32_t offset, uint32_t num_elts)
 64-bit signed integer.
Errorcopy_vector_section_f (Vector_f **v_out, const Vector_f *v_in, uint32_t offset, uint32_t num_elts)
 Single precision floating point.
Errorcopy_vector_section_d (Vector_d **v_out, const Vector_d *v_in, uint32_t offset, uint32_t num_elts)
 Double precision floating point.
Errorcopy_vector_section_cf (Vector_cf **v_out, const Vector_cf *v_in, uint32_t offset, uint32_t num_elts)
 Single precision complex floating point.
Errorcopy_vector_section_cd (Vector_cd **v_out, const Vector_cd *v_in, uint32_t offset, uint32_t num_elts)
 Double precision complex floating point.
copy_vector_section_into_vector

Copies a section of a vector.

Errorcopy_vector_section_into_vector_u32 (Vector_u32 *v_1, uint32_t offset_1, const Vector_u32 *v_2, uint32_t offset_2, uint32_t num_elts)
 Copies a section of a 32-bit unsigned integer vector into another.
Errorcopy_vector_section_into_vector_i32 (Vector_i32 *v_1, uint32_t offset_1, const Vector_i32 *v_2, uint32_t offset_2, uint32_t num_elts)
 Copies a section of a 32-bit signed integer vector into another.
Errorcopy_vector_section_into_vector_i64 (Vector_i64 *v_1, uint32_t offset_1, const Vector_i64 *v_2, uint32_t offset_2, uint32_t num_elts)
 Copies a section of a 64-bit signed integer vector into another.
Errorcopy_vector_section_into_vector_f (Vector_f *v_1, uint32_t offset_1, const Vector_f *v_2, uint32_t offset_2, uint32_t num_elts)
 Copies a section of a single precision floating point vector into another.
Errorcopy_vector_section_into_vector_d (Vector_d *v_1, uint32_t offset_1, const Vector_d *v_2, uint32_t offset_2, uint32_t num_elts)
 Copies a section of a double precision floating point vector into another.
Errorcopy_vector_section_into_vector_cf (Vector_cf *v_1, uint32_t offset_1, const Vector_cf *v_2, uint32_t offset_2, uint32_t num_elts)
 Copies a section of a single precision complex floating point vector into another.
Errorcopy_vector_section_into_vector_cd (Vector_cd *v_1, uint32_t offset_1, const Vector_cd *v_2, uint32_t offset_2, uint32_t num_elts)
 Copies a section of a double precision complex floating point vector into another.
cat_vectors

Concatenates two vectors.

void cat_vectors_u32 (Vector_u32 **v_out, const Vector_u32 *v_1, const Vector_u32 *v_2)
 Concatenates two 32-bit unsigned integer vectors.
void cat_vectors_i32 (Vector_i32 **v_out, const Vector_i32 *v_1, const Vector_i32 *v_2)
 Concatenates two 32-bit signed integer vectors.
void cat_vectors_i64 (Vector_i64 **v_out, const Vector_i64 *v_1, const Vector_i64 *v_2)
 Concatenates two 64-bit signed integer vectors.
void cat_vectors_f (Vector_f **v_out, const Vector_f *v_1, const Vector_f *v_2)
 Concatenates two single precision floating point vectors.
void cat_vectors_d (Vector_d **v_out, const Vector_d *v_1, const Vector_d *v_2)
 Concatenates two double precision floating point vectors.
void cat_vectors_cf (Vector_cf **v_out, const Vector_cf *v_1, const Vector_cf *v_2)
 Concatenates two single precision complex floating point vectors.
void cat_vectors_cd (Vector_cd **v_out, const Vector_cd *v_1, const Vector_cd *v_2)
 Concatenates two double precision complex floating point vectors.
free_vector

Frees a vector.

void free_vector_u32 (Vector_u32 *v)
 32-bit unsigned integer.
void free_vector_i32 (Vector_i32 *v)
 32-bit signed integer.
void free_vector_i64 (Vector_i64 *v)
 64-bit signed integer.
void free_vector_f (Vector_f *v)
 Single precision floating point.
void free_vector_d (Vector_d *v)
 Double precision floating point.
void free_vector_cf (Vector_cf *v)
 Single precision complex floating point.
void free_vector_cd (Vector_cd *v)
 Double precision complex floating point.

Detailed Description

Declarations for a vector and associated functions.

Author:
Joseph Schlecht
License:
Creative Commons BY-NC-SA 3.0

The vector holds integers and floating point real and complex numbers.

Definition in file vector.h.


Function Documentation

void create_vector_u32 ( Vector_u32 **  v_out,
uint32_t  num_elts 
)

32-bit unsigned integer.

Does not initialize the vector.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 86 of file vector.c.

void create_vector_i32 ( Vector_i32 **  v_out,
uint32_t  num_elts 
)

32-bit signed integer.

Does not initialize the vector.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 117 of file vector.c.

void create_vector_i64 ( Vector_i64 **  v_out,
uint32_t  num_elts 
)

64-bit signed integer.

Does not initialize the vector.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 148 of file vector.c.

void create_vector_f ( Vector_f **  v_out,
uint32_t  num_elts 
)

Single precision floating point.

Does not initialize the vector.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 179 of file vector.c.

void create_vector_d ( Vector_d **  v_out,
uint32_t  num_elts 
)

Double precision floating point.

Does not initialize the vector.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 210 of file vector.c.

void create_vector_cf ( Vector_cf **  v_out,
uint32_t  num_elts 
)

Single precision complex floating point.

Does not initialize the vector.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 241 of file vector.c.

void create_vector_cd ( Vector_cd **  v_out,
uint32_t  num_elts 
)

Double precision complex floating point.

Does not initialize the vector.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 272 of file vector.c.

void create_init_vector_u32 ( Vector_u32 **  v_out,
uint32_t  num_elts,
uint32_t  val 
)

32-bit unsigned integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
valValue to initialize all elements of the vector with.
Note:
Number of elements must be > 0.

Definition at line 314 of file vector.c.

void create_init_vector_i32 ( Vector_i32 **  v_out,
uint32_t  num_elts,
int32_t  val 
)

32-bit signed integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
valValue to initialize all elements of the vector with.
Note:
Number of elements must be > 0.

Definition at line 336 of file vector.c.

void create_init_vector_i64 ( Vector_i64 **  v_out,
uint32_t  num_elts,
int64_t  val 
)

64-bit signed integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
valValue to initialize all elements of the vector with.
Note:
Number of elements must be > 0.

Definition at line 358 of file vector.c.

void create_init_vector_f ( Vector_f **  v_out,
uint32_t  num_elts,
float  val 
)

Single precision floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
valValue to initialize all elements of the vector with.
Note:
Number of elements must be > 0.

Definition at line 380 of file vector.c.

void create_init_vector_d ( Vector_d **  v_out,
uint32_t  num_elts,
double  val 
)

Double precision floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
valValue to initialize all elements of the vector with.
Note:
Number of elements must be > 0.

Definition at line 402 of file vector.c.

void create_init_vector_cf ( Vector_cf **  v_out,
uint32_t  num_elts,
Complex_f  val 
)

Single precision complex floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
valValue to initialize all elements of the vector with.
Note:
Number of elements must be > 0.

Definition at line 424 of file vector.c.

void create_init_vector_cd ( Vector_cd **  v_out,
uint32_t  num_elts,
Complex_d  val 
)

Double precision complex floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
valValue to initialize all elements of the vector with.
Note:
Number of elements must be > 0.

Definition at line 446 of file vector.c.

void create_zero_vector_u32 ( Vector_u32 **  v_out,
uint32_t  num_elts 
)

32-bit unsigned integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 480 of file vector.c.

void create_zero_vector_i32 ( Vector_i32 **  v_out,
uint32_t  num_elts 
)

32-bit signed integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 493 of file vector.c.

void create_zero_vector_i64 ( Vector_i64 **  v_out,
uint32_t  num_elts 
)

64-bit signed integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 506 of file vector.c.

void create_zero_vector_f ( Vector_f **  v_out,
uint32_t  num_elts 
)

Single precision floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 519 of file vector.c.

void create_zero_vector_d ( Vector_d **  v_out,
uint32_t  num_elts 
)

Double precision floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 532 of file vector.c.

void create_zero_vector_cf ( Vector_cf **  v_out,
uint32_t  num_elts 
)

Single precision complex floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.

Definition at line 543 of file vector.c.

void create_zero_vector_cd ( Vector_cd **  v_out,
uint32_t  num_elts 
)

Double precision complex floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
Note:
Number of elements must be > 0.

Definition at line 557 of file vector.c.

void create_random_vector_u32 ( Vector_u32 **  v_out,
uint32_t  num_elts,
uint32_t  min,
uint32_t  max 
)

32-bit unsigned integer.

Calls rand() to generate the random numbers.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
minMinimum random value.
maxMaximum random value.
Note:
Number of elements must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 591 of file vector.c.

void create_random_vector_i32 ( Vector_i32 **  v_out,
uint32_t  num_elts,
int32_t  min,
int32_t  max 
)

32-bit signed integer.

Calls rand() to generate the random numbers.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
minMinimum random value.
maxMaximum random value.
Note:
Number of elements must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 627 of file vector.c.

void create_random_vector_i64 ( Vector_i64 **  v_out,
uint32_t  num_elts,
int64_t  min,
int64_t  max 
)

64-bit signed integer.

Calls rand() to generate the random numbers.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
minMinimum random value.
maxMaximum random value.
Note:
Number of elements must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 663 of file vector.c.

void create_random_vector_f ( Vector_f **  v_out,
uint32_t  num_elts,
float  min,
float  max 
)

Single precision floating point.

Calls rand() to generate the random numbers.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
minMinimum random value.
maxMaximum random value.
Note:
Number of elements must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 699 of file vector.c.

void create_random_vector_d ( Vector_d **  v_out,
uint32_t  num_elts,
double  min,
double  max 
)

Double precision floating point.

Calls rand() to generate the random numbers.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
minMinimum random value.
maxMaximum random value.
Note:
Number of elements must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 735 of file vector.c.

void create_random_vector_cf ( Vector_cf **  v_out,
uint32_t  num_elts,
Complex_f  min,
Complex_f  max 
)

Single precision complex floating point.

Calls rand() to generate the random numbers.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
minMinimum random value.
maxMaximum random value.
Note:
Number of elements must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 771 of file vector.c.

void create_random_vector_cd ( Vector_cd **  v_out,
uint32_t  num_elts,
Complex_d  min,
Complex_d  max 
)

Double precision complex floating point.

Calls rand() to generate the random numbers.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
num_eltsNumber of elements in the vector.
minMinimum random value.
maxMaximum random value.
Note:
Number of elements must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 809 of file vector.c.

Error* copy_vector_u32 ( Vector_u32 **  v_out,
const Vector_u32 v_in 
)

32-bit unsigned integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_inVector to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., *v_out == v_in.

Definition at line 856 of file vector.c.

Error* copy_vector_i32 ( Vector_i32 **  v_out,
const Vector_i32 v_in 
)

32-bit signed integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_inVector to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., *v_out == v_in.

Definition at line 890 of file vector.c.

Error* copy_vector_i64 ( Vector_i64 **  v_out,
const Vector_i64 v_in 
)

64-bit signed integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_inVector to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., *v_out == v_in.

Definition at line 924 of file vector.c.

Error* copy_vector_f ( Vector_f **  v_out,
const Vector_f v_in 
)

Single precision floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_inVector to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., *v_out == v_in.

Definition at line 958 of file vector.c.

Error* copy_vector_d ( Vector_d **  v_out,
const Vector_d v_in 
)

Double precision floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_inVector to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., *v_out == v_in.

Definition at line 1000 of file vector.c.

Error* copy_vector_cf ( Vector_cf **  v_out,
const Vector_cf v_in 
)

Single precision complex floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_inVector to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., *v_out == v_in.

Definition at line 1042 of file vector.c.

Error* copy_vector_cd ( Vector_cd **  v_out,
const Vector_cd v_in 
)

Double precision complex floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_inVector to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., *v_out == v_in.

Definition at line 1084 of file vector.c.

Error* copy_vector_section_u32 ( Vector_u32 **  v_out,
const Vector_u32 v_in,
uint32_t  offset,
uint32_t  num_elts 
)

32-bit unsigned integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_invector to copy a section from.
offsetPosition of first element to begin copying from.
num_eltsNumber of elements to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL (if it is not v_in).
Note:
Does not support copying a vector into itself, i.e., *m_out == m_in.

Definition at line 1144 of file vector.c.

Error* copy_vector_section_i32 ( Vector_i32 **  v_out,
const Vector_i32 v_in,
uint32_t  offset,
uint32_t  num_elts 
)

32-bit signed integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_invector to copy a section from.
offsetPosition of first element to begin copying from.
num_eltsNumber of elements to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL (if it is not v_in).
Note:
Does not support copying a vector into itself, i.e., *m_out == m_in.

Definition at line 1194 of file vector.c.

Error* copy_vector_section_i64 ( Vector_i64 **  v_out,
const Vector_i64 v_in,
uint32_t  offset,
uint32_t  num_elts 
)

64-bit signed integer.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_invector to copy a section from.
offsetPosition of first element to begin copying from.
num_eltsNumber of elements to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL (if it is not v_in).
Note:
Does not support copying a vector into itself, i.e., *m_out == m_in.

Definition at line 1244 of file vector.c.

Error* copy_vector_section_f ( Vector_f **  v_out,
const Vector_f v_in,
uint32_t  offset,
uint32_t  num_elts 
)

Single precision floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_invector to copy a section from.
offsetPosition of first element to begin copying from.
num_eltsNumber of elements to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL (if it is not v_in).
Note:
Does not support copying a vector into itself, i.e., *m_out == m_in.

Definition at line 1294 of file vector.c.

Error* copy_vector_section_d ( Vector_d **  v_out,
const Vector_d v_in,
uint32_t  offset,
uint32_t  num_elts 
)

Double precision floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_invector to copy a section from.
offsetPosition of first element to begin copying from.
num_eltsNumber of elements to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL (if it is not v_in).
Note:
Does not support copying a vector into itself, i.e., *m_out == m_in.

Definition at line 1351 of file vector.c.

Error* copy_vector_section_cf ( Vector_cf **  v_out,
const Vector_cf v_in,
uint32_t  offset,
uint32_t  num_elts 
)

Single precision complex floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_invector to copy a section from.
offsetPosition of first element to begin copying from.
num_eltsNumber of elements to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL (if it is not v_in).
Note:
Does not support copying a vector into itself, i.e., *m_out == m_in.

Definition at line 1408 of file vector.c.

Error* copy_vector_section_cd ( Vector_cd **  v_out,
const Vector_cd v_in,
uint32_t  offset,
uint32_t  num_elts 
)

Double precision complex floating point.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_invector to copy a section from.
offsetPosition of first element to begin copying from.
num_eltsNumber of elements to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL (if it is not v_in).
Note:
Does not support copying a vector into itself, i.e., *v_out == v_in.

Definition at line 1465 of file vector.c.

Error* copy_vector_section_into_vector_u32 ( Vector_u32 v_1,
uint32_t  offset_1,
const Vector_u32 v_2,
uint32_t  offset_2,
uint32_t  num_elts 
)

Copies a section of a 32-bit unsigned integer vector into another.

Parameters:
v_1Vector to copy the section into.
offset_1Position of first elt to copy into v_1.
v_2Vector to copy the section from.
offset_2Position of first elt to copy from v_2.
num_eltsNumber of elements in the section to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., v_1 == v_2.

Definition at line 1533 of file vector.c.

Error* copy_vector_section_into_vector_i32 ( Vector_i32 v_1,
uint32_t  offset_1,
const Vector_i32 v_2,
uint32_t  offset_2,
uint32_t  num_elts 
)

Copies a section of a 32-bit signed integer vector into another.

Parameters:
v_1Vector to copy the section into.
offset_1Position of first elt to copy into v_1.
v_2Vector to copy the section from.
offset_2Position of first elt to copy from v_2.
num_eltsNumber of elts to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., v_1 == v_2.

Definition at line 1581 of file vector.c.

Error* copy_vector_section_into_vector_i64 ( Vector_i64 v_1,
uint32_t  offset_1,
const Vector_i64 v_2,
uint32_t  offset_2,
uint32_t  num_elts 
)

Copies a section of a 64-bit signed integer vector into another.

Parameters:
v_1Vector to copy the section into.
offset_1Position of first elt to copy into v_1.
v_2Vector to copy the section from.
offset_2Position of first elt to copy from v_2.
num_eltsNumber of elts to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., v_1 == v_2.

Definition at line 1629 of file vector.c.

Error* copy_vector_section_into_vector_f ( Vector_f v_1,
uint32_t  offset_1,
const Vector_f v_2,
uint32_t  offset_2,
uint32_t  num_elts 
)

Copies a section of a single precision floating point vector into another.

Parameters:
v_1Vector to copy the section into.
offset_1Position of first elt to copy into v_1.
v_2Vector to copy the section from.
offset_2Position of first elt to copy from v_2.
num_eltsNumber of elts to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., v_1 == v_2.

Definition at line 1677 of file vector.c.

Error* copy_vector_section_into_vector_d ( Vector_d v_1,
uint32_t  offset_1,
const Vector_d v_2,
uint32_t  offset_2,
uint32_t  num_elts 
)

Copies a section of a double precision floating point vector into another.

Parameters:
v_1Vector to copy the section into.
offset_1Position of first elt to copy into v_1.
v_2Vector to copy the section from.
offset_2Position of first elt to copy from v_2.
num_eltsNumber of elts to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., v_1 == v_2.

Definition at line 1725 of file vector.c.

Error* copy_vector_section_into_vector_cf ( Vector_cf v_1,
uint32_t  offset_1,
const Vector_cf v_2,
uint32_t  offset_2,
uint32_t  num_elts 
)

Copies a section of a single precision complex floating point vector into another.

Parameters:
v_1Vector to copy the section into.
offset_1Position of first elt to copy into v_1.
v_2Vector to copy the section from.
offset_2Position of first elt to copy from v_2.
num_eltsNumber of elts to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a vector into itself, i.e., v_1 == v_2.

Definition at line 1773 of file vector.c.

Error* copy_vector_section_into_vector_cd ( Vector_cd v_1,
uint32_t  offset_1,
const Vector_cd v_2,
uint32_t  offset_2,
uint32_t  num_elts 
)

Copies a section of a double precision complex floating point vector into another.

Parameters:
v_1Vector to copy the section into.
offset_1Position of first elt to copy into v_1.
v_2Vector to copy the section from.
offset_2Position of first elt to copy from v_2.
num_eltsNumber of elts to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Dimensions must be > 0.
Does not support copying a vector into itself, i.e., v_1 == v_2.

Definition at line 1823 of file vector.c.

void cat_vectors_u32 ( Vector_u32 **  v_out,
const Vector_u32 v_1,
const Vector_u32 v_2 
)

Concatenates two 32-bit unsigned integer vectors.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_1First vector in the concatenation.
v_2Second vector in the concatenation.
Note:
If *v_out == v_in, v_in is overwritten.

Definition at line 1875 of file vector.c.

void cat_vectors_i32 ( Vector_i32 **  v_out,
const Vector_i32 v_1,
const Vector_i32 v_2 
)

Concatenates two 32-bit signed integer vectors.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_1First vector in the concatenation.
v_2Second vector in the concatenation.
Note:
If *v_out == v_in, v_in is overwritten.

Definition at line 1908 of file vector.c.

void cat_vectors_i64 ( Vector_i64 **  v_out,
const Vector_i64 v_1,
const Vector_i64 v_2 
)

Concatenates two 64-bit signed integer vectors.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_1First vector in the concatenation.
v_2Second vector in the concatenation.
Note:
If *v_out == v_in, v_in is overwritten.

Definition at line 1941 of file vector.c.

void cat_vectors_f ( Vector_f **  v_out,
const Vector_f v_1,
const Vector_f v_2 
)

Concatenates two single precision floating point vectors.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_1First vector in the concatenation.
v_2Second vector in the concatenation.
Note:
If *v_out == v_in, v_in is overwritten.

Definition at line 1974 of file vector.c.

void cat_vectors_d ( Vector_d **  v_out,
const Vector_d v_1,
const Vector_d v_2 
)

Concatenates two double precision floating point vectors.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_1First vector in the concatenation.
v_2Second vector in the concatenation.
Note:
If *v_out == v_in, v_in is overwritten.

Definition at line 2007 of file vector.c.

void cat_vectors_cf ( Vector_cf **  v_out,
const Vector_cf v_1,
const Vector_cf v_2 
)

Concatenates two single precision complex floating point vectors.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_1First vector in the concatenation.
v_2Second vector in the concatenation.
Note:
If *v_out == v_in, v_in is overwritten.

Definition at line 2040 of file vector.c.

void cat_vectors_cd ( Vector_cd **  v_out,
const Vector_cd v_1,
const Vector_cd v_2 
)

Concatenates two double precision complex floating point vectors.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
v_1First vector in the concatenation.
v_2Second vector in the concatenation.
Note:
If *v_out == v_in, v_in is overwritten.

Definition at line 2073 of file vector.c.

void free_vector_u32 ( Vector_u32 v)

32-bit unsigned integer.

Parameters:
vVector to free.

Definition at line 2112 of file vector.c.

void free_vector_i32 ( Vector_i32 v)

32-bit signed integer.

Parameters:
vVector to free.

Definition at line 2123 of file vector.c.

void free_vector_i64 ( Vector_i64 v)

64-bit signed integer.

Parameters:
vVector to free.

Definition at line 2134 of file vector.c.

void free_vector_f ( Vector_f v)

Single precision floating point.

Parameters:
vVector to free.

Definition at line 2145 of file vector.c.

void free_vector_d ( Vector_d v)

Double precision floating point.

Parameters:
vVector to free.

Definition at line 2156 of file vector.c.

void free_vector_cf ( Vector_cf v)

Single precision complex floating point.

Parameters:
vVector to free.

Definition at line 2167 of file vector.c.

void free_vector_cd ( Vector_cd v)

Double precision complex floating point.

Parameters:
vVector to free.

Definition at line 2178 of file vector.c.