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

Declarations for a matrix 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 "jwsc/vector/vector.h"
Include dependency graph for matrix.h:

Go to the source code of this file.

Data Structures

struct  Matrix_i8
 Matrix of signed 8-bit values. More...
struct  Matrix_i16
 Matrix of signed 16-bit values. More...
struct  Matrix_i32
 Matrix of signed 32-bit values. More...
struct  Matrix_i64
 Matrix of signed 64-bit values. More...
struct  Matrix_u8
 Matrix of unsigned 8-bit values. More...
struct  Matrix_u16
 Matrix of unsigned 16-bit values. More...
struct  Matrix_u32
 Matrix of unsigned 32-bit values. More...
struct  Matrix_u64
 Matrix of unsigned 64-bit values. More...
struct  Matrix_f
 Matrix of single precision floating point values. More...
struct  Matrix_d
 Matrix of double precision floating point values. More...
struct  Matrix_cf
 Matrix of single precision complex floating point values. More...
struct  Matrix_cd
 Matrix of double precision complex floating point values. More...

Enumerations

enum  Matrix_vector
 Orientation of a vector in a matrix. More...

Functions

create_matrix

Creates a matrix of integer or floating point values.

void create_matrix_u32 (Matrix_u32 **m_out, uint32_t num_rows, uint32_t num_cols)
 32-bit unsigned integer.
void create_matrix_i32 (Matrix_i32 **m_out, uint32_t num_rows, uint32_t num_cols)
 32-bit signed integer.
void create_matrix_i64 (Matrix_i64 **m_out, uint32_t num_rows, uint32_t num_cols)
 64-bit signed integer.
void create_matrix_f (Matrix_f **m_out, uint32_t num_rows, uint32_t num_cols)
 Single precision floating point.
void create_matrix_d (Matrix_d **m_out, uint32_t num_rows, uint32_t num_cols)
 Double precision floating point.
void create_matrix_cf (Matrix_cf **m_out, uint32_t num_rows, uint32_t num_cols)
 Single precision complex floating point.
void create_matrix_cd (Matrix_cd **m_out, uint32_t num_rows, uint32_t num_cols)
 Double precision complexfloating point.
create_init_matrix

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

void create_init_matrix_u32 (Matrix_u32 **m_out, uint32_t num_rows, uint32_t num_cols, uint32_t val)
 32-bit unsigned integer.
void create_init_matrix_i32 (Matrix_i32 **m_out, uint32_t num_rows, uint32_t num_cols, int32_t val)
 32-bit signed integer.
void create_init_matrix_i64 (Matrix_i64 **m_out, uint32_t num_rows, uint32_t num_cols, int64_t val)
 64-bit signed integer.
void create_init_matrix_f (Matrix_f **m_out, uint32_t num_rows, uint32_t num_cols, float val)
 Single precision floating point.
void create_init_matrix_d (Matrix_d **m_out, uint32_t num_rows, uint32_t num_cols, double val)
 Double precision floating point.
void create_init_matrix_cf (Matrix_cf **m_out, uint32_t num_rows, uint32_t num_cols, Complex_f val)
 Single precision complex floating point.
void create_init_matrix_cd (Matrix_cd **m_out, uint32_t num_rows, uint32_t num_cols, Complex_d val)
 Double precision complexfloating point.
create_identity_matrix

Creates a matrix of integer or floating point values and initializes it with zeros and a diagonal of ones.

void create_identity_matrix_u32 (Matrix_u32 **m_out, uint32_t size)
 32-bit unsigned integer.
void create_identity_matrix_i32 (Matrix_i32 **m_out, uint32_t size)
 32-bit signed integer.
void create_identity_matrix_i64 (Matrix_i64 **m_out, uint32_t size)
 64-bit signed integer.
void create_identity_matrix_f (Matrix_f **m_out, uint32_t size)
 Single precision floating point.
void create_identity_matrix_d (Matrix_d **m_out, uint32_t size)
 Double precision floating point.
create_zero_matrix

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

void create_zero_matrix_u32 (Matrix_u32 **m_out, uint32_t num_rows, uint32_t num_cols)
 32-bit unsigned integer.
void create_zero_matrix_i32 (Matrix_i32 **m_out, uint32_t num_rows, uint32_t num_cols)
 32-bit signed integer.
void create_zero_matrix_i64 (Matrix_i64 **m_out, uint32_t num_rows, uint32_t num_cols)
 64-bit signed integer.
void create_zero_matrix_f (Matrix_f **m_out, uint32_t num_rows, uint32_t num_cols)
 Single precision floating point.
void create_zero_matrix_d (Matrix_d **m_out, uint32_t num_rows, uint32_t num_cols)
 Double precision floating point.
void create_zero_matrix_cf (Matrix_cf **m_out, uint32_t num_rows, uint32_t num_cols)
 Single precision complex floating point.
void create_zero_matrix_cd (Matrix_cd **m_out, uint32_t num_rows, uint32_t num_cols)
 Double precision complexfloating point.
create_diagonal_matrix

Creates a square matrix of integer or floating point values and initializes its diagonal using values from a vector.

void create_diagnonal_matrix_u32 (Matrix_u32 **m_out, const Vector_u32 *v)
 32-bit unsigned integer.
void create_diagonal_matrix_i32 (Matrix_i32 **m_out, const Vector_i32 *v)
 32-bit signed integer.
void create_diagonal_matrix_i64 (Matrix_i64 **m_out, const Vector_i64 *v)
 64-bit signed integer.
void create_diagonal_matrix_f (Matrix_f **m_out, const Vector_f *v)
 Single precision floating point.
void create_diagonal_matrix_d (Matrix_d **m_out, const Vector_d *v)
 Double precision floating point.
void create_diagonal_matrix_cf (Matrix_cf **m_out, const Vector_cf *v)
 Single precision complex floating point.
void create_diagonal_matrix_cd (Matrix_cd **m_out, const Vector_cd *v)
 Double precision complexfloating point.
create_random_matrix

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

void create_random_matrix_u32 (Matrix_u32 **m_out, uint32_t num_rows, uint32_t num_cols, uint32_t min, uint32_t max)
 32-bit unsigned integer.
void create_random_matrix_i32 (Matrix_i32 **m_out, uint32_t num_rows, uint32_t num_cols, int32_t min, int32_t max)
 32-bit signed integer.
void create_random_matrix_i64 (Matrix_i64 **m_out, uint32_t num_rows, uint32_t num_cols, int64_t min, int64_t max)
 64-bit signed integer.
void create_random_matrix_f (Matrix_f **m_out, uint32_t num_rows, uint32_t num_cols, float min, float max)
 Single precision floating point.
void create_random_matrix_d (Matrix_d **m_out, uint32_t num_rows, uint32_t num_cols, double min, double max)
 Double precision floating point.
void create_random_matrix_cf (Matrix_cf **m_out, uint32_t num_rows, uint32_t num_cols, Complex_f min, Complex_f max)
 Single precision complex floating point.
void create_random_matrix_cd (Matrix_cd **m_out, uint32_t num_rows, uint32_t num_cols, Complex_d min, Complex_d max)
 Double precision complexfloating point.
copy_matrix

Copies a matrix into another.

Errorcopy_matrix_u32 (Matrix_u32 **m_out, const Matrix_u32 *m_in)
 32-bit unsigned integer.
Errorcopy_matrix_i32 (Matrix_i32 **m_out, const Matrix_i32 *m_in)
 32-bit signed integer.
Errorcopy_matrix_i64 (Matrix_i64 **m_out, const Matrix_i64 *m_in)
 64-bit signed integer.
Errorcopy_matrix_f (Matrix_f **m_out, const Matrix_f *m_in)
 Single precision floating point.
Errorcopy_matrix_d (Matrix_d **m_out, const Matrix_d *m_in)
 Double precision floating point.
Errorcopy_matrix_cf (Matrix_cf **m_out, const Matrix_cf *m_in)
 Single precision complex floating point.
Errorcopy_matrix_cd (Matrix_cd **m_out, const Matrix_cd *m_in)
 Double precision complex floating point.
copy_matrix_block

Copies a block of a matrix.

Errorcopy_matrix_block_u32 (Matrix_u32 **m_out, const Matrix_u32 *m_in, uint32_t row_offset, uint32_t col_offset, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 32-bit unsigned integer matrix.
Errorcopy_matrix_block_i32 (Matrix_i32 **m_out, const Matrix_i32 *m_in, uint32_t row_offset, uint32_t col_offset, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 32-bit signed integer matrix.
Errorcopy_matrix_block_i64 (Matrix_i64 **m_out, const Matrix_i64 *m_in, uint32_t row_offset, uint32_t col_offset, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 64-bit signed integer matrix.
Errorcopy_matrix_block_f (Matrix_f **m_out, const Matrix_f *m_in, uint32_t row_offset, uint32_t col_offset, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a single precision floating point matrix.
Errorcopy_matrix_block_d (Matrix_d **m_out, const Matrix_d *m_in, uint32_t row_offset, uint32_t col_offset, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a double precision floating point matrix.
Errorcopy_matrix_block_cf (Matrix_cf **m_out, const Matrix_cf *m_in, uint32_t row_offset, uint32_t col_offset, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a single precision complex floating point matrix.
Errorcopy_matrix_block_cd (Matrix_cd **m_out, const Matrix_cd *m_in, uint32_t row_offset, uint32_t col_offset, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a double precision complex floating point matrix.
copy_matrix_block_into_matrix

Copies a block of a matrix.

Errorcopy_matrix_block_into_matrix_u32 (Matrix_u32 *m_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matrix_u32 *m_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 32-bit unsigned integer matrix into another.
Errorcopy_matrix_block_into_matrix_i32 (Matrix_i32 *m_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matrix_i32 *m_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 32-bit signed integer matrix into another.
Errorcopy_matrix_block_into_matrix_i64 (Matrix_i64 *m_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matrix_i64 *m_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a 64-bit signed integer matrix into another.
Errorcopy_matrix_block_into_matrix_f (Matrix_f *m_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matrix_f *m_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a single precision floating point matrix into another.
Errorcopy_matrix_block_into_matrix_d (Matrix_d *m_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matrix_d *m_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a double precision floating point matrix into another.
Errorcopy_matrix_block_into_matrix_cf (Matrix_cf *m_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matrix_cf *m_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a single precision complex floating point matrix into another.
Errorcopy_matrix_block_into_matrix_cd (Matrix_cd *m_1, uint32_t row_offset_1, uint32_t col_offset_1, const Matrix_cd *m_2, uint32_t row_offset_2, uint32_t col_offset_2, uint32_t num_rows, uint32_t num_cols)
 Copies a block of a double precision complex floating point matrix into another.
copy_vector_into_matrix

Copies a vector into a matrix.

Errorcopy_vector_into_matrix_u32 (Matrix_u32 **m_out, const Matrix_u32 *m_in, const Vector_u32 *v, Matrix_vector orient, uint32_t index)
 Copies a 32-bit unsigned integer vector into a matrix.
Errorcopy_vector_into_matrix_i32 (Matrix_i32 **m_out, const Matrix_i32 *m_in, const Vector_i32 *v, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector into a matrix.
Errorcopy_vector_into_matrix_i64 (Matrix_i64 **m_out, const Matrix_i64 *m_in, const Vector_i64 *v, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector into a matrix.
Errorcopy_vector_into_matrix_f (Matrix_f **m_out, const Matrix_f *m_in, const Vector_f *v, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector into a matrix.
Errorcopy_vector_into_matrix_d (Matrix_d **m_out, const Matrix_d *m_in, const Vector_d *v, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector into a matrix.
Errorcopy_vector_into_matrix_cf (Matrix_cf **m_out, const Matrix_cf *m_in, const Vector_cf *v, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector into a matrix.
Errorcopy_vector_into_matrix_cd (Matrix_cd **m_out, const Matrix_cd *m_in, const Vector_cd *v, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector into a matrix.
copy_vector_from_matrix

Copies a vector from a matrix.

Errorcopy_vector_from_matrix_u32 (Vector_u32 **v_out, const Matrix_u32 *m, Matrix_vector orient, uint32_t index)
 Copies a 32-bit unsigned integer vector from a matrix.
Errorcopy_vector_from_matrix_i32 (Vector_i32 **v_out, const Matrix_i32 *m, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector from a matrix.
Errorcopy_vector_from_matrix_i64 (Vector_i64 **v_out, const Matrix_i64 *m, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector from a matrix.
Errorcopy_vector_from_matrix_f (Vector_f **v_out, const Matrix_f *m, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector from a matrix.
Errorcopy_vector_from_matrix_d (Vector_d **v_out, const Matrix_d *m, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector from a matrix.
Errorcopy_vector_from_matrix_cf (Vector_cf **v_out, const Matrix_cf *m, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector from a matrix.
Errorcopy_vector_from_matrix_cd (Vector_cd **v_out, const Matrix_cd *m, Matrix_vector orient, uint32_t index)
 Copies a 32-bit signed integer vector from a matrix.
free_matrix

Frees a matrix.

void free_matrix_u32 (Matrix_u32 *m)
 Frees a 32-bit unsigned integer matrix.
void free_matrix_i32 (Matrix_i32 *m)
 Frees a 32-bit signed integer matrix.
void free_matrix_i64 (Matrix_i64 *m)
 Frees a 64-bit signed integer matrix.
void free_matrix_f (Matrix_f *m)
 Frees a single precision floating point matrix.
void free_matrix_d (Matrix_d *m)
 Frees a double precision floating point matrix.
void free_matrix_cf (Matrix_cf *m)
 Frees a single precision complex floating point matrix.
void free_matrix_cd (Matrix_cd *m)
 Frees a double precision complex floating point matrix.

Detailed Description

Declarations for a matrix and associated functions.

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

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

Although the matrix is indexed by row and column, the elements are allocated as a 1D array in row-major order. So iterating over the elements can be done inside a single loop.

Definition in file matrix.h.


Enumeration Type Documentation

Orientation of a vector in a matrix.

Definition at line 243 of file matrix.h.


Function Documentation

void create_matrix_u32 ( Matrix_u32 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

32-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 89 of file matrix.c.

void create_matrix_i32 ( Matrix_i32 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

32-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 137 of file matrix.c.

void create_matrix_i64 ( Matrix_i64 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

64-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 185 of file matrix.c.

void create_matrix_f ( Matrix_f **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

Single precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 233 of file matrix.c.

void create_matrix_d ( Matrix_d **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

Double precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 281 of file matrix.c.

void create_matrix_cf ( Matrix_cf **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

Single precision complex floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 329 of file matrix.c.

void create_matrix_cd ( Matrix_cd **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

Double precision complexfloating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 377 of file matrix.c.

void create_init_matrix_u32 ( Matrix_u32 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
uint32_t  val 
)

32-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
valValue to initialize all elements of the matrix with.
Note:
Dimensions must be > 0.

Definition at line 438 of file matrix.c.

void create_init_matrix_i32 ( Matrix_i32 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
int32_t  val 
)

32-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
valValue to initialize all elements of the matrix with.
Note:
Dimensions must be > 0.

Definition at line 469 of file matrix.c.

void create_init_matrix_i64 ( Matrix_i64 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
int64_t  val 
)

64-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
valValue to initialize all elements of the matrix with.
Note:
Dimensions must be > 0.

Definition at line 500 of file matrix.c.

void create_init_matrix_f ( Matrix_f **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
float  val 
)

Single precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
valValue to initialize all elements of the matrix with.
Note:
Dimensions must be > 0.

Definition at line 531 of file matrix.c.

void create_init_matrix_d ( Matrix_d **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
double  val 
)

Double precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
valValue to initialize all elements of the matrix with.
Note:
Dimensions must be > 0.

Definition at line 562 of file matrix.c.

void create_init_matrix_cf ( Matrix_cf **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
Complex_f  val 
)

Single precision complex floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
valValue to initialize all elements of the matrix with.
Note:
Dimensions must be > 0.

Definition at line 593 of file matrix.c.

void create_init_matrix_cd ( Matrix_cd **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
Complex_d  val 
)

Double precision complexfloating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
valValue to initialize all elements of the matrix with.
Note:
Dimensions must be > 0.

Definition at line 624 of file matrix.c.

void create_identity_matrix_u32 ( Matrix_u32 **  m_out,
uint32_t  size 
)

32-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
sizeNumber of rows and columns.

Definition at line 663 of file matrix.c.

void create_identity_matrix_i32 ( Matrix_i32 **  m_out,
uint32_t  size 
)

32-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
sizeNumber of rows and columns.

Definition at line 680 of file matrix.c.

void create_identity_matrix_i64 ( Matrix_i64 **  m_out,
uint32_t  size 
)

64-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
sizeNumber of rows and columns.

Definition at line 697 of file matrix.c.

void create_identity_matrix_f ( Matrix_f **  m_out,
uint32_t  size 
)

Single precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
sizeNumber of rows and columns.

Definition at line 714 of file matrix.c.

void create_identity_matrix_d ( Matrix_d **  m_out,
uint32_t  size 
)

Double precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
sizeNumber of rows and columns.

Definition at line 731 of file matrix.c.

void create_zero_matrix_u32 ( Matrix_u32 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

32-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 765 of file matrix.c.

void create_zero_matrix_i32 ( Matrix_i32 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

32-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 783 of file matrix.c.

void create_zero_matrix_i64 ( Matrix_i64 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

64-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.

Definition at line 799 of file matrix.c.

void create_zero_matrix_f ( Matrix_f **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

Single precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 817 of file matrix.c.

void create_zero_matrix_d ( Matrix_d **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

Double precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 835 of file matrix.c.

void create_zero_matrix_cf ( Matrix_cf **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

Single precision complex floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 853 of file matrix.c.

void create_zero_matrix_cd ( Matrix_cd **  m_out,
uint32_t  num_rows,
uint32_t  num_cols 
)

Double precision complexfloating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
Note:
Dimensions must be > 0.

Definition at line 872 of file matrix.c.

void create_diagnonal_matrix_u32 ( Matrix_u32 **  m_out,
const Vector_u32 v 
)

32-bit unsigned integer.

Definition at line 897 of file matrix.c.

void create_diagonal_matrix_i32 ( Matrix_i32 **  m_out,
const Vector_i32 v 
)

32-bit signed integer.

Definition at line 918 of file matrix.c.

void create_diagonal_matrix_i64 ( Matrix_i64 **  m_out,
const Vector_i64 v 
)

64-bit signed integer.

Definition at line 939 of file matrix.c.

void create_diagonal_matrix_f ( Matrix_f **  m_out,
const Vector_f v 
)

Single precision floating point.

Definition at line 960 of file matrix.c.

void create_diagonal_matrix_d ( Matrix_d **  m_out,
const Vector_d v 
)

Double precision floating point.

Definition at line 981 of file matrix.c.

void create_diagonal_matrix_cf ( Matrix_cf **  m_out,
const Vector_cf v 
)

Single precision complex floating point.

Definition at line 1002 of file matrix.c.

void create_diagonal_matrix_cd ( Matrix_cd **  m_out,
const Vector_cd v 
)

Double precision complexfloating point.

Definition at line 1023 of file matrix.c.

void create_random_matrix_u32 ( Matrix_u32 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
uint32_t  min,
uint32_t  max 
)

32-bit unsigned integer.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1071 of file matrix.c.

void create_random_matrix_i32 ( Matrix_i32 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
int32_t  min,
int32_t  max 
)

32-bit signed integer.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1111 of file matrix.c.

void create_random_matrix_i64 ( Matrix_i64 **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
int64_t  min,
int64_t  max 
)

64-bit signed integer.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1151 of file matrix.c.

void create_random_matrix_f ( Matrix_f **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
float  min,
float  max 
)

Single precision floating point.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1191 of file matrix.c.

void create_random_matrix_d ( Matrix_d **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
double  min,
double  max 
)

Double precision floating point.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1231 of file matrix.c.

void create_random_matrix_cf ( Matrix_cf **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
Complex_f  min,
Complex_f  max 
)

Single precision complex floating point.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1271 of file matrix.c.

void create_random_matrix_cd ( Matrix_cd **  m_out,
uint32_t  num_rows,
uint32_t  num_cols,
Complex_d  min,
Complex_d  max 
)

Double precision complexfloating point.

Calls rand() to generate the random numbers.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
num_rowsNumber of rows in the matrix.
num_colsNumber of columns in the matrix.
minMinimum random value.
maxMaximum random value.
Note:
Dimensions must be > 0.
Warning:
Does not check min and max to see if they would cause overflow.

Definition at line 1313 of file matrix.c.

Error* copy_matrix_u32 ( Matrix_u32 **  m_out,
const Matrix_u32 m_in 
)

32-bit unsigned integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.

Definition at line 1363 of file matrix.c.

Error* copy_matrix_i32 ( Matrix_i32 **  m_out,
const Matrix_i32 m_in 
)

32-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.

Definition at line 1401 of file matrix.c.

Error* copy_matrix_i64 ( Matrix_i64 **  m_out,
const Matrix_i64 m_in 
)

64-bit signed integer.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.

Definition at line 1439 of file matrix.c.

Error* copy_matrix_f ( Matrix_f **  m_out,
const Matrix_f m_in 
)

Single precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.
Accelerated if linked against an optimized BLAS.

Definition at line 1479 of file matrix.c.

Error* copy_matrix_d ( Matrix_d **  m_out,
const Matrix_d m_in 
)

Double precision floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.

Definition at line 1524 of file matrix.c.

Error* copy_matrix_cf ( Matrix_cf **  m_out,
const Matrix_cf m_in 
)

Single precision complex floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.

Definition at line 1569 of file matrix.c.

Error* copy_matrix_cd ( Matrix_cd **  m_out,
const Matrix_cd m_in 
)

Double precision complex floating point.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.

Definition at line 1614 of file matrix.c.

Error* copy_matrix_block_u32 ( Matrix_u32 **  m_out,
const Matrix_u32 m_in,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 32-bit unsigned integer matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy a section from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.
Dimensions must be > 0.

Definition at line 1681 of file matrix.c.

Error* copy_matrix_block_i32 ( Matrix_i32 **  m_out,
const Matrix_i32 m_in,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 32-bit signed integer matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy a section from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.
Dimensions must be > 0.

Definition at line 1742 of file matrix.c.

Error* copy_matrix_block_i64 ( Matrix_i64 **  m_out,
const Matrix_i64 m_in,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 64-bit signed integer matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy a section from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.
Dimensions must be > 0.

Definition at line 1803 of file matrix.c.

Error* copy_matrix_block_f ( Matrix_f **  m_out,
const Matrix_f m_in,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a single precision floating point matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy a section from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.
Dimensions must be > 0.

Definition at line 1864 of file matrix.c.

Error* copy_matrix_block_d ( Matrix_d **  m_out,
const Matrix_d m_in,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a double precision floating point matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy a section from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.
Dimensions must be > 0.

Definition at line 1925 of file matrix.c.

Error* copy_matrix_block_cf ( Matrix_cf **  m_out,
const Matrix_cf m_in,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a single precision complex floating point matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy a section from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.
Dimensions must be > 0.

Definition at line 1986 of file matrix.c.

Error* copy_matrix_block_cd ( Matrix_cd **  m_out,
const Matrix_cd m_in,
uint32_t  row_offset,
uint32_t  col_offset,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a double precision complex floating point matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inmatrix to copy a section from.
row_offsetPosition of first row to begin copying from.
col_offsetPosition of first column to begin copying from.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
Note:
Does not support copying a matrix into itself, i.e., *m_out == m_in.
Dimensions must be > 0.

Definition at line 2047 of file matrix.c.

Error* copy_matrix_block_into_matrix_u32 ( Matrix_u32 m_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matrix_u32 m_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 32-bit unsigned integer matrix into another.

Parameters:
m_1Matrix to copy the block into.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix to copy the block from.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., m_1 == m_2.

Definition at line 2118 of file matrix.c.

Error* copy_matrix_block_into_matrix_i32 ( Matrix_i32 m_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matrix_i32 m_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 32-bit signed integer matrix into another.

Parameters:
m_1Matrix to copy the block into.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix to copy the block from.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., m_1 == m_2.

Definition at line 2178 of file matrix.c.

Error* copy_matrix_block_into_matrix_i64 ( Matrix_i64 m_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matrix_i64 m_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a 64-bit signed integer matrix into another.

Parameters:
m_1Matrix to copy the block into.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix to copy the block from.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., m_1 == m_2.

Definition at line 2238 of file matrix.c.

Error* copy_matrix_block_into_matrix_f ( Matrix_f m_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matrix_f m_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a single precision floating point matrix into another.

Parameters:
m_1Matrix to copy the block into.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix to copy the block from.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., m_1 == m_2.

Definition at line 2298 of file matrix.c.

Error* copy_matrix_block_into_matrix_d ( Matrix_d m_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matrix_d m_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a double precision floating point matrix into another.

Parameters:
m_1Matrix to copy the block into.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix to copy the block from.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., m_1 == m_2.

Definition at line 2358 of file matrix.c.

Error* copy_matrix_block_into_matrix_cf ( Matrix_cf m_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matrix_cf m_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a single precision complex floating point matrix into another.

Parameters:
m_1Matrix to copy the block into.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix to copy the block from.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Does not support copying a matrix into itself, i.e., m_1 == m_2.

Definition at line 2418 of file matrix.c.

Error* copy_matrix_block_into_matrix_cd ( Matrix_cd m_1,
uint32_t  row_offset_1,
uint32_t  col_offset_1,
const Matrix_cd m_2,
uint32_t  row_offset_2,
uint32_t  col_offset_2,
uint32_t  num_rows,
uint32_t  num_cols 
)

Copies a block of a double precision complex floating point matrix into another.

Parameters:
m_1Matrix to copy the block into.
row_offset_1Position of first row to copy into m_1.
col_offset_1Position of first column to copy into m_1.
m_2Matrix to copy the block from.
row_offset_2Position of first row to copy from m_2.
col_offset_2Position of first column to copy from m_2.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
Returns:
On success, NULL is returned. On error, an Error is returned.
Note:
Dimensions must be > 0.
Does not support copying a matrix into itself, i.e., m_1 == m_2.

Definition at line 2480 of file matrix.c.

Error* copy_vector_into_matrix_u32 ( Matrix_u32 **  m_out,
const Matrix_u32 m_in,
const Vector_u32 v,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit unsigned integer vector into a matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inMatrix to copy a vector into.
vVector to copy into the matrix.
orientOrientation of the vector to copy into the matrix.
indexIndex along the orientation dimension to copy the vector into the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *m_out == m_in, then m_in is overwritten.

Definition at line 2549 of file matrix.c.

Error* copy_vector_into_matrix_i32 ( Matrix_i32 **  m_out,
const Matrix_i32 m_in,
const Vector_i32 v,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector into a matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inMatrix to copy a vector into.
vVector to copy into the matrix.
orientOrientation of the vector to copy into the matrix.
indexIndex along the orientation dimension to copy the vector into the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *m_out == m_in, then m_in is overwritten.

Definition at line 2628 of file matrix.c.

Error* copy_vector_into_matrix_i64 ( Matrix_i64 **  m_out,
const Matrix_i64 m_in,
const Vector_i64 v,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector into a matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inMatrix to copy a vector into.
vVector to copy into the matrix.
orientOrientation of the vector to copy into the matrix.
indexIndex along the orientation dimension to copy the vector into the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *m_out == m_in, then m_in is overwritten.

Definition at line 2707 of file matrix.c.

Error* copy_vector_into_matrix_f ( Matrix_f **  m_out,
const Matrix_f m_in,
const Vector_f v,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector into a matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inMatrix to copy a vector into.
vVector to copy into the matrix.
orientOrientation of the vector to copy into the matrix.
indexIndex along the orientation dimension to copy the vector into the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *m_out == m_in, then m_in is overwritten.

Definition at line 2786 of file matrix.c.

Error* copy_vector_into_matrix_d ( Matrix_d **  m_out,
const Matrix_d m_in,
const Vector_d v,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector into a matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inMatrix to copy a vector into.
vVector to copy into the matrix.
orientOrientation of the vector to copy into the matrix.
indexIndex along the orientation dimension to copy the vector into the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *m_out == m_in, then m_in is overwritten.

Definition at line 2865 of file matrix.c.

Error* copy_vector_into_matrix_cf ( Matrix_cf **  m_out,
const Matrix_cf m_in,
const Vector_cf v,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector into a matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inMatrix to copy a vector into.
vVector to copy into the matrix.
orientOrientation of the vector to copy into the matrix.
indexIndex along the orientation dimension to copy the vector into the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *m_out == m_in, then m_in is overwritten.

Definition at line 2944 of file matrix.c.

Error* copy_vector_into_matrix_cd ( Matrix_cd **  m_out,
const Matrix_cd m_in,
const Vector_cd v,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector into a matrix.

Parameters:
m_outResult parameter. If *m_out is NULL, a matrix is allocated; otherwise its space is re-used.
m_inMatrix to copy a vector into.
vVector to copy into the matrix.
orientOrientation of the vector to copy into the matrix.
indexIndex along the orientation dimension to copy the vector into the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *m_out is freed and set to NULL (if it is not m_in).
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.
Note:
If *m_out == m_in, then m_in is overwritten.

Definition at line 3023 of file matrix.c.

Error* copy_vector_from_matrix_u32 ( Vector_u32 **  v_out,
const Matrix_u32 m,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit unsigned integer vector from a matrix.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
mMatrix to copy a vector from.
orientOrientation of the vector to copy from the matrix.
indexIndex along the orientation dimension to copy the vector from the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL.
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3111 of file matrix.c.

Error* copy_vector_from_matrix_i32 ( Vector_i32 **  v_out,
const Matrix_i32 m,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector from a matrix.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
mMatrix to copy a vector from.
orientOrientation of the vector to copy from the matrix.
indexIndex along the orientation dimension to copy the vector from the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL.
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3176 of file matrix.c.

Error* copy_vector_from_matrix_i64 ( Vector_i64 **  v_out,
const Matrix_i64 m,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector from a matrix.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
mMatrix to copy a vector from.
orientOrientation of the vector to copy from the matrix.
indexIndex along the orientation dimension to copy the vector from the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL.
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3241 of file matrix.c.

Error* copy_vector_from_matrix_f ( Vector_f **  v_out,
const Matrix_f m,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector from a matrix.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
mMatrix to copy a vector from.
orientOrientation of the vector to copy from the matrix.
indexIndex along the orientation dimension to copy the vector from the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL.
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3306 of file matrix.c.

Error* copy_vector_from_matrix_d ( Vector_d **  v_out,
const Matrix_d m,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector from a matrix.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
mMatrix to copy a vector from.
orientOrientation of the vector to copy from the matrix.
indexIndex along the orientation dimension to copy the vector from the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL.
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3371 of file matrix.c.

Error* copy_vector_from_matrix_cf ( Vector_cf **  v_out,
const Matrix_cf m,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector from a matrix.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
mMatrix to copy a vector from.
orientOrientation of the vector to copy from the matrix.
indexIndex along the orientation dimension to copy the vector from the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL.
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3436 of file matrix.c.

Error* copy_vector_from_matrix_cd ( Vector_cd **  v_out,
const Matrix_cd m,
Matrix_vector  orient,
uint32_t  index 
)

Copies a 32-bit signed integer vector from a matrix.

Parameters:
v_outResult parameter. If *v_out is NULL, a vector is allocated; otherwise its space is re-used.
mMatrix to copy a vector from.
orientOrientation of the vector to copy from the matrix.
indexIndex along the orientation dimension to copy the vector from the matrix.
Returns:
On success, NULL is returned. On error, an Error is returned and *v_out is freed and set to NULL.
  • ERROR_INV_ARG index is not a valid for the specified orientation dimension.

Definition at line 3501 of file matrix.c.

void free_matrix_u32 ( Matrix_u32 m)

Frees a 32-bit unsigned integer matrix.

Parameters:
mMatrix to free.

Definition at line 3565 of file matrix.c.

void free_matrix_i32 ( Matrix_i32 m)

Frees a 32-bit signed integer matrix.

Parameters:
mMatrix to free.

Definition at line 3575 of file matrix.c.

void free_matrix_i64 ( Matrix_i64 m)

Frees a 64-bit signed integer matrix.

Parameters:
mMatrix to free.

Definition at line 3585 of file matrix.c.

void free_matrix_f ( Matrix_f m)

Frees a single precision floating point matrix.

Parameters:
mMatrix to free.

Definition at line 3595 of file matrix.c.

void free_matrix_d ( Matrix_d m)

Frees a double precision floating point matrix.

Parameters:
mMatrix to free.

Definition at line 3605 of file matrix.c.

void free_matrix_cf ( Matrix_cf m)

Frees a single precision complex floating point matrix.

Parameters:
mMatrix to free.

Definition at line 3615 of file matrix.c.

void free_matrix_cd ( Matrix_cd m)

Frees a double precision complex floating point matrix.

Parameters:
mMatrix to free.

Definition at line 3625 of file matrix.c.