Main Page   Modules   Compound List   File List   Compound Members   File Members  

General Size Vectors
[General Size Matrices and Vectors]


Modules

Allocate/Free a General Size Vector
Access an Element of a General Size Vector
General Size Vector I/O
Fill a General Size Vector with Values
Copy a General Size Vector
Multiply/Divide a General Size Vector by a Scalar
Add General Size Vectors
Subtract General Size Vectors
Outer Product of General Size Vectors
General Size Vector Norms
Test Attributes of a General Size Vector
Return Size of General Size Vector
Set Attributes of a General Size Vector
Read Elements of a General Size Vector
Scalar Product of General Size Vectors
Insert Values into a General Size Vector

Compounds

struct  Gan_Vector
 Structure definition for double precision general size vector. More...

struct  Gan_Vector_f
 Structure definition for single precision general size vector. More...


Defines

#define GAN_VECTOR_STRUCT_DEFINED
#define Gan_Matrix   struct Gan_Matrix
#define Gan_SquMatrix   struct Gan_SquMatrix
#define GAN_VECTORF_STRUCT_DEFINED
#define Gan_Matrix_f   struct Gan_Matrix_f
#define Gan_SquMatrix_f   struct Gan_SquMatrix_f

Typedefs

typedef Gan_Vector Gan_Vector
 Structure definition for double precision general size vector.

typedef Gan_Vector_f Gan_Vector_f
 Structure definition for single precision general size vector.


Functions

void gan_vec_db (Gan_Vector *x)
Gan_Vectorgan_vec_form_gen (Gan_Vector *x, unsigned long rows, double *data, size_t data_size)
void gan_vec_free (Gan_Vector *x)
 Free a vector.

Gan_Vectorgan_vec_set_size (Gan_Vector *x, unsigned long rows)
 Set size of vector.

Gan_Vectorgan_vec_fill_va (Gan_Vector *x, unsigned long rows,...)
 Fill vector from variable argument list.

Gan_Vectorgan_vec_fill_vap (Gan_Vector *x, unsigned long rows, va_list *aptr)
 Fill vector from variable argument list.

Gan_Vectorgan_vec_fill_const_q (Gan_Vector *x, unsigned long rows, double value)
 Fill all elements of a vector with the same value.

Gan_Bool gan_vec_read_va (Gan_Vector *x, unsigned long rows,...)
 Read vector from variable argument list.

Gan_Vectorgan_vec_copy_q (Gan_Vector *x, Gan_Vector *y)
 Copy vector.

Gan_Vectorgan_vec_scale_q (Gan_Vector *x, double a, Gan_Vector *y)
 Multiply vector by scalar.

Gan_Vectorgan_vec_add_q (Gan_Vector *x, Gan_Vector *y, Gan_Vector *z)
 Add two vectors and write result into a third.

Gan_Vectorgan_vec_sub_q (Gan_Vector *x, Gan_Vector *y, Gan_Vector *z)
 Subtract two vectors and write result into a third.

double gan_vec_dot (Gan_Vector *x, Gan_Vector *y)
 Vector dot product.

Gan_Matrixgan_vec_outer_q (Gan_Vector *x, Gan_Vector *y, struct Gan_Matrix *A)
Gan_SquMatrixgan_vec_outer_sym_q (Gan_Vector *x, struct Gan_SquMatrix *A)
Gan_Vectorgan_vec_insert (Gan_Vector *x, unsigned long rx, Gan_Vector *y, unsigned long ry, unsigned long rows)
 Insert part of vector in another vector.

void gan_vec_free_va (Gan_Vector *x,...)
 Free a NULL-terminated variable argument list of vectors.

Gan_Vectorgan_vec_insert_mat (Gan_Vector *x, unsigned long rx, struct Gan_Matrix *A, unsigned long ra, unsigned long ca, unsigned long rows)
Gan_Vectorgan_vec_insert_matT (Gan_Vector *x, unsigned long rx, struct Gan_Matrix *A, unsigned long ra, unsigned long ca, unsigned long rows)
Gan_Bool gan_vec_fprint (FILE *fp, Gan_Vector *x, const char *prefix, int indent, const char *fmt)
 Print vector to file pointer.

Gan_Vectorgan_vec_fscanf_q (FILE *fp, Gan_Vector *x, char *prefix, int prefix_len)
 Read vector from file.

Gan_Bool gan_vec_fwrite (FILE *fp, Gan_Vector *x, gan_ui32 magic_number)
 Print vector to binary file pointer.

Gan_Vectorgan_vec_fread_q (FILE *fp, Gan_Vector *x, gan_ui32 *magic_number)
 Read vector from file.

Gan_Bool gan_vec_realloc (Gan_Vector *x, unsigned long rows)
void gan_vecf_db (Gan_Vector_f *x)
Gan_Vector_fgan_vecf_form_gen (Gan_Vector_f *x, unsigned long rows, float *data, size_t data_size)
void gan_vecf_free (Gan_Vector_f *x)
 Free a vector.

Gan_Vector_fgan_vecf_set_size (Gan_Vector_f *x, unsigned long rows)
 Set size of vector.

Gan_Vector_fgan_vecf_fill_va (Gan_Vector_f *x, unsigned long rows,...)
 Fill vector from variable argument list.

Gan_Vector_fgan_vecf_fill_vap (Gan_Vector_f *x, unsigned long rows, va_list *aptr)
 Fill vector from variable argument list.

Gan_Vector_fgan_vecf_fill_const_q (Gan_Vector_f *x, unsigned long rows, float value)
 Fill all elements of a vector with the same value.

Gan_Bool gan_vecf_read_va (Gan_Vector_f *x, unsigned long rows,...)
 Read vector from variable argument list.

Gan_Vector_fgan_vecf_copy_q (Gan_Vector_f *x, Gan_Vector_f *y)
 Copy vector.

Gan_Vector_fgan_vecf_scale_q (Gan_Vector_f *x, float a, Gan_Vector_f *y)
 Multiply vector by scalar.

Gan_Vector_fgan_vecf_add_q (Gan_Vector_f *x, Gan_Vector_f *y, Gan_Vector_f *z)
 Add two vectors and write result into a third.

Gan_Vector_fgan_vecf_sub_q (Gan_Vector_f *x, Gan_Vector_f *y, Gan_Vector_f *z)
 Subtract two vectors and write result into a third.

float gan_vecf_dot (Gan_Vector_f *x, Gan_Vector_f *y)
 Vector dot product.

Gan_Matrix_fgan_vecf_outer_q (Gan_Vector_f *x, Gan_Vector_f *y, struct Gan_Matrix_f *A)
Gan_SquMatrix_fgan_vecf_outer_sym_q (Gan_Vector_f *x, struct Gan_SquMatrix_f *A)
Gan_Vector_fgan_vecf_insert (Gan_Vector_f *x, unsigned long rx, Gan_Vector_f *y, unsigned long ry, unsigned long rows)
 Insert part of vector in another vector.

void gan_vecf_free_va (Gan_Vector_f *x,...)
 Free a NULL-terminated variable argument list of vectors.

Gan_Vector_fgan_vecf_insert_mat (Gan_Vector_f *x, unsigned long rx, struct Gan_Matrix_f *A, unsigned long ra, unsigned long ca, unsigned long rows)
Gan_Vector_fgan_vecf_insert_matT (Gan_Vector_f *x, unsigned long rx, struct Gan_Matrix_f *A, unsigned long ra, unsigned long ca, unsigned long rows)
Gan_Bool gan_vecf_fprint (FILE *fp, Gan_Vector_f *x, const char *prefix, int indent, const char *fmt)
 Print vector to file pointer.

Gan_Vector_fgan_vecf_fscanf_q (FILE *fp, Gan_Vector_f *x, char *prefix, int prefix_len)
 Read vector from file.

Gan_Bool gan_vecf_fwrite (FILE *fp, Gan_Vector_f *x, gan_ui32 magic_number)
 Print vector to binary file pointer.

Gan_Vector_fgan_vecf_fread_q (FILE *fp, Gan_Vector_f *x, gan_ui32 *magic_number)
 Read vector from file.

Gan_Bool gan_vecf_realloc (Gan_Vector_f *x, unsigned long rows)

Function Documentation

Gan_Vector* gan_vec_add_q Gan_Vector   x,
Gan_Vector   y,
Gan_Vector   z
 

Add two vectors and write result into a third.

Returns:
Result vector z.
Add two vectors x, y and write result into .

Gan_Vector* gan_vec_copy_q Gan_Vector   x,
Gan_Vector   y
 

Copy vector.

Copy vector x to vector y, and return y.

double gan_vec_dot Gan_Vector   x,
Gan_Vector   y
 

Vector dot product.

Returns the scalar product of the two vectors x and y.

Gan_Vector* gan_vec_fill_const_q Gan_Vector   x,
unsigned long    rows,
double    value
 

Fill all elements of a vector with the same value.

Parameters:
x The vector to be filled
rows The new size of the vector
value The value to set each element of the vector to
Returns:
Pointer to the result vector x, or NULL on failure..
Set the size of vector x to rows and fill each element with the provided value.

See also:
gan_vec_fill_const_s()

Gan_Vector* gan_vec_fill_va Gan_Vector   x,
unsigned long    rows,
...   
 

Fill vector from variable argument list.

Returns:
Pointer to the vector x.
Fill vector x with values from variable argument list, and set the size of x to rows.

Gan_Vector* gan_vec_fill_vap Gan_Vector   x,
unsigned long    rows,
va_list *    aptr
 

Fill vector from variable argument list.

Returns:
Pointer to the vector x.
Fill vector x with values from variable argument list aptr, and set the size of x to rows.

Gan_Bool gan_vec_fprint FILE *    fp,
Gan_Vector   x,
const char *    prefix,
int    indent,
const char *    fmt
 

Print vector to file pointer.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Print vector x to file pointer fp, with prefix string prefix, indentation indent and floating-point format fmt.

Gan_Vector* gan_vec_fread_q FILE *    fp,
Gan_Vector   x,
gan_ui32 *    magic_number
 

Read vector from file.

Returns:
Pointer to the read vector on success, NULL on failure.
Read vector x from file pointer fp in binary format. The magic number is read into the provided pointer. x should either be a pre-allocated vector pointer or NULL.

See also:
gan_vecf_fread_s()

void gan_vec_free Gan_Vector   x
 

Free a vector.

Free a generic vector.

void gan_vec_free_va Gan_Vector   x,
...   
 

Free a NULL-terminated variable argument list of vectors.

Returns:
No value.
Free a NULL-terminated variable argument list of vectors, starting with vector x.

Gan_Vector* gan_vec_fscanf_q FILE *    fp,
Gan_Vector   x,
char *    prefix,
int    prefix_len
 

Read vector from file.

Read vector x from file pointer fp. The prefix string for the matrix is read from the file into the prefix string, up to the maximum length prefix_len of the prefix string. Any remaining characters after prefix has been filled are ignored. Pass NULL for prefix and zero for prefix_len to ignore the prefix string. x should either be a pre-allocated vector pointer or NULL.

Returns:
Pointer to the read vector on success, NULL on failure.
See also:
gan_vec_fscanf_s().

Gan_Bool gan_vec_fwrite FILE *    fp,
Gan_Vector   x,
gan_ui32    magic_number
 

Print vector to binary file pointer.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Print vector x to file pointer fp in binary format, with 32-bit magic number printed first.

Gan_Vector* gan_vec_insert Gan_Vector   x,
unsigned long    rx,
Gan_Vector   y,
unsigned long    ry,
unsigned long    rows
 

Insert part of vector in another vector.

Returns:
Result vector x.
Fills the part of vector x starting at row position rx and of size rows with the section of vector y starting at position ry.

Gan_Bool gan_vec_read_va Gan_Vector   x,
unsigned long    rows,
...   
 

Read vector from variable argument list.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Read elements of vector x from variable argument list.

Gan_Vector* gan_vec_scale_q Gan_Vector   x,
double    a,
Gan_Vector   y
 

Multiply vector by scalar.

Returns:
Result vector y.
Multiply vector x by scalar a and write result into vector y.

Gan_Vector* gan_vec_set_size Gan_Vector   x,
unsigned long    rows
 

Set size of vector.

Returns:
Pointer to the vector x.
Set size of vector x to rows.

Gan_Vector* gan_vec_sub_q Gan_Vector   x,
Gan_Vector   y,
Gan_Vector   z
 

Subtract two vectors and write result into a third.

Returns:
Result vector z.
Subtract two vectors x, y and write result into .

Gan_Vector_f* gan_vecf_add_q Gan_Vector_f   x,
Gan_Vector_f   y,
Gan_Vector_f   z
 

Add two vectors and write result into a third.

Returns:
Result vector z.
Add two vectors x, y and write result into .

Gan_Vector_f* gan_vecf_copy_q Gan_Vector_f   x,
Gan_Vector_f   y
 

Copy vector.

Copy vector x to vector y, and return y.

float gan_vecf_dot Gan_Vector_f   x,
Gan_Vector_f   y
 

Vector dot product.

Returns the scalar product of the two vectors x and y.

Gan_Vector_f* gan_vecf_fill_const_q Gan_Vector_f   x,
unsigned long    rows,
float    value
 

Fill all elements of a vector with the same value.

Parameters:
x The vector to be filled
rows The new size of the vector
value The value to set each element of the vector to
Returns:
Pointer to the result vector x, or NULL on failure..
Set the size of vector x to rows and fill each element with the provided value.

See also:
gan_vecf_fill_const_s()

Gan_Vector_f* gan_vecf_fill_va Gan_Vector_f   x,
unsigned long    rows,
...   
 

Fill vector from variable argument list.

Returns:
Pointer to the vector x.
Fill vector x with values from variable argument list, and set the size of x to rows.

Gan_Vector_f* gan_vecf_fill_vap Gan_Vector_f   x,
unsigned long    rows,
va_list *    aptr
 

Fill vector from variable argument list.

Returns:
Pointer to the vector x.
Fill vector x with values from variable argument list aptr, and set the size of x to rows.

Gan_Bool gan_vecf_fprint FILE *    fp,
Gan_Vector_f   x,
const char *    prefix,
int    indent,
const char *    fmt
 

Print vector to file pointer.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Print vector x to file pointer fp, with prefix string prefix, indentation indent and floating-point format fmt.

Gan_Vector_f* gan_vecf_fread_q FILE *    fp,
Gan_Vector_f   x,
gan_ui32 *    magic_number
 

Read vector from file.

Returns:
Pointer to the read vector on success, NULL on failure.
Read vector x from file pointer fp in binary format. The magic number is read into the provided pointer. x should either be a pre-allocated vector pointer or NULL.

See also:
gan_vecf_fread_s()

void gan_vecf_free Gan_Vector_f   x
 

Free a vector.

Free a generic vector.

void gan_vecf_free_va Gan_Vector_f   x,
...   
 

Free a NULL-terminated variable argument list of vectors.

Returns:
No value.
Free a NULL-terminated variable argument list of vectors, starting with vector x.

Gan_Vector_f* gan_vecf_fscanf_q FILE *    fp,
Gan_Vector_f   x,
char *    prefix,
int    prefix_len
 

Read vector from file.

Read vector x from file pointer fp. The prefix string for the matrix is read from the file into the prefix string, up to the maximum length prefix_len of the prefix string. Any remaining characters after prefix has been filled are ignored. Pass NULL for prefix and zero for prefix_len to ignore the prefix string. x should either be a pre-allocated vector pointer or NULL.

Returns:
Pointer to the read vector on success, NULL on failure.
See also:
gan_vecf_fscanf_s().

Gan_Bool gan_vecf_fwrite FILE *    fp,
Gan_Vector_f   x,
gan_ui32    magic_number
 

Print vector to binary file pointer.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Print vector x to file pointer fp in binary format, with 32-bit magic number printed first.

Gan_Vector_f* gan_vecf_insert Gan_Vector_f   x,
unsigned long    rx,
Gan_Vector_f   y,
unsigned long    ry,
unsigned long    rows
 

Insert part of vector in another vector.

Returns:
Result vector x.
Fills the part of vector x starting at row position rx and of size rows with the section of vector y starting at position ry.

Gan_Bool gan_vecf_read_va Gan_Vector_f   x,
unsigned long    rows,
...   
 

Read vector from variable argument list.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Read elements of vector x from variable argument list.

Gan_Vector_f* gan_vecf_scale_q Gan_Vector_f   x,
float    a,
Gan_Vector_f   y
 

Multiply vector by scalar.

Returns:
Result vector y.
Multiply vector x by scalar a and write result into vector y.

Gan_Vector_f* gan_vecf_set_size Gan_Vector_f   x,
unsigned long    rows
 

Set size of vector.

Returns:
Pointer to the vector x.
Set size of vector x to rows.

Gan_Vector_f* gan_vecf_sub_q Gan_Vector_f   x,
Gan_Vector_f   y,
Gan_Vector_f   z
 

Subtract two vectors and write result into a third.

Returns:
Result vector z.
Subtract two vectors x, y and write result into .


Generated on Mon Oct 13 16:15:00 2003 by doxygen1.3-rc1