Main Page | Modules | Class List | File List | Class Members | File Members

vecf_gen.h File Reference

#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <gandalf/common/misc_defs.h>
#include <gandalf/common/misc_error.h>
#include <gandalf/linalg/matf_gen.h>
#include <gandalf/linalg/matf_square.h>

Go to the source code of this file.

Classes

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

Defines

#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_f Gan_Vector_f
 Structure definition for single precision general size vector.

Functions

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 (const Gan_Vector_f *x, unsigned long rows,...)
 Read vector from variable argument list.
Gan_Vector_fgan_vecf_copy_q (const 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 (const Gan_Vector_f *x, const Gan_Vector_f *y)
 Vector dot product.
Gan_Matrix_fgan_vecf_outer_q (const Gan_Vector_f *x, const Gan_Vector_f *y, struct Gan_Matrix_f *A)
Gan_SquMatrix_fgan_vecf_outer_sym_q (const Gan_Vector_f *x, struct Gan_SquMatrix_f *A)
Gan_Vector_fgan_vecf_insert (Gan_Vector_f *x, unsigned long rx, const 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, const 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, const struct Gan_Matrix_f *A, unsigned long ra, unsigned long ca, unsigned long rows)
Gan_Bool gan_vecf_fprint (FILE *fp, const 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, const Gan_Vector_f *x, gan_uint32 magic_number)
 Print vector to binary file pointer.
Gan_Vector_fgan_vecf_fread_q (FILE *fp, Gan_Vector_f *x, gan_uint32 *magic_number)
 Read vector from file.
Gan_Vector_fgan_vecf_alloc (unsigned long rows)
 Macro: Allocate and return a generic vector.
Gan_Vector_fgan_vecf_form (Gan_Vector_f *x, unsigned long rows)
 Macro: Form and return a generic vector.
Gan_Vector_fgan_vecf_form_data (Gan_Vector_f *x, unsigned long rows, void *data, size_t data_size)
 Macro: Form and return a generic vector.
Gan_Bool gan_vecf_set_el (Gan_Vector_f *x, unsigned i, float value)
 Macro: Set specific element of vector.
float gan_vecf_get_el (const Gan_Vector_f *x, unsigned i)
 Macro: Get specific element of vector.
Gan_Bool gan_vecf_inc_el (Gan_Vector_f *x, unsigned i, float value)
 Macro: Increment specific element of vector by given value.
Gan_Bool gan_vecf_dec_el (Gan_Vector_f *x, unsigned i, float value)
 Macro: Decrement specific element of vector by given value.
Gan_Bool gan_vecf_print (const Gan_Vector_f *x, const char *prefix, int indent, const char *fmt)
 Macro: Print vector to standard output.
Gan_Vector_fgan_vecf_fill_const_s (unsigned long rows, float value)
 Macro: Allocate and fill all elements of a vector with the same value.
Gan_Vector_fgan_vecf_fill_zero_q (Gan_Vector_f *x, unsigned long rows)
 Macro: Fill vector with zeros.
Gan_Vector_fgan_vecf_fill_zero_s (unsigned long rows)
 Macro: Allocate and fill vector with zeros.
Gan_Vector_fgan_vecf_copy_s (const Gan_Vector_f *x)
 Macro: Copy vector.
Gan_Vector_fgan_vecf_scale_s (Gan_Vector_f *x, float a)
 Macro: Multiply vector by scalar.
Gan_Vector_fgan_vecf_scale_i (Gan_Vector_f *x, float a)
 Macro: Multiply vector by scalar.
Gan_Vector_fgan_vecf_divide_q (Gan_Vector_f *x, float a, Gan_Vector_f *y)
 Macro: Divide vector by scalar.
Gan_Vector_fgan_vecf_divide_s (Gan_Vector_f *x, float a)
 Macro: Divide vector by scalar.
Gan_Vector_fgan_vecf_divide_i (Gan_Vector_f *x, float a)
 Macro: Divide vector by scalar.
Gan_Vector_fgan_vecf_negate_q (Gan_Vector_f *x, Gan_Vector_f *y)
 Macro: Negate vector.
Gan_Vector_fgan_vecf_negate_s (Gan_Vector_f *x)
 Macro: Negate vector.
Gan_Vector_fgan_vecf_negate_i (Gan_Vector_f *x)
 Macro: Negate vector.
Gan_Vector_fgan_vecf_add_s (Gan_Vector_f *x, Gan_Vector_f *y)
 Macro: Add two vectors.
Gan_Vector_fgan_vecf_add_i1 (Gan_Vector_f *x, Gan_Vector_f *y)
 Macro: Add two vectors and overwrite the first with the result.
Gan_Vector_fgan_vecf_add_i2 (Gan_Vector_f *x, Gan_Vector_f *y)
 Macro: Add two vectors and overwrite the second with the result.
Gan_Vector_fgan_vecf_increment (Gan_Vector_f *x, Gan_Vector_f *y)
 Macro: Increment a vector with another vector.
Gan_Vector_fgan_vecf_sub_s (Gan_Vector_f *x, Gan_Vector_f *y)
 Macro: Subtract two vectors.
Gan_Vector_fgan_vecf_sub_i1 (Gan_Vector_f *x, Gan_Vector_f *y)
 Macro: Subtract two vectors and overwrite the first with the result.
Gan_Vector_fgan_vecf_sub_i2 (Gan_Vector_f *x, Gan_Vector_f *y)
 Macro: Subtract two vectors and overwrite the second with the result.
Gan_Vector_fgan_vecf_decrement (Gan_Vector_f *x, Gan_Vector_f *y)
 Macro: Decrement a vector with another vector.
Gan_Matrix_fgan_vecf_outer_s (const Gan_Vector_f *x, Gan_Vector_f *y)
 Macro: vector outer product.
Gan_SquMatrix_fgan_vecf_outer_sym_s (const Gan_Vector_f *x)
 Macro: vector outer product with self.
float gan_vecf_sqrlen (const Gan_Vector_f *x)
 Macro: Vector squared length.
Gan_Bool gan_vecf_same_size (const Gan_Vector_f *x, const Gan_Vector_f *y)
 Macro: Checks that two vectors have the same number of rows.
size_t gan_vecf_data_size (unsigned long rows)
 Macro: Returns size of data array in bytes needed to hold vector data.
Gan_Vector_fgan_vecf_fscanf_s (FILE *fp, const char *prefix, int prefix_len)
 Macro: Read vector from file.
Gan_Vector_fgan_vecf_fread_s (FILE *fp, gan_uint32 *magic_number)
 Macro: Read vector from file in binary format.
Gan_Bool gan_vecf_realloc (Gan_Vector_f *x, unsigned long rows)


Detailed Description

Module: Generic column vectors (single precision)

Part of: Gandalf Library

Version:
1.12
Date:
2005/08/22 08:52:18
Author:
jps
Copyright: (c) 2000 Imagineer Software Limited
Generated on Fri Mar 17 12:44:53 2006 by  doxygen 1.3.9.1