Meta Matrix Library
Home About FAQ Install Documentation To Do Download Related Links


Tutorial   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages (e.g. ToDo)  

Functions for vector-manipulation (Changing single elements)


Functions

VECTORmeml_vector_scaling (const MEML_FLOAT alpha, const VECTOR *x)
 $ y := \alpha x $
void meml_vector_clear (VECTOR *x)
 $ x :=0 $
INDEXARRAYmeml_vector_part_sort (VECTOR *v, MEML_INT from, MEML_INT till)
 sorts a part of the vector v; v[from:till] ; ascending
INDEXARRAYmeml_vector_sort (VECTOR *v)
 sorts a vector v ascending
INLINE MEML_FLOAT meml_vector_element_get (const VECTOR *x, const MEML_INT i)
 alpha := x[i]
INLINE MEML_FLOAT meml_vector_element_get_f (const VECTOR *x, const MEML_INT i)
 alpha := x[i]
INLINE int meml_vector_element_set (VECTOR *x, const MEML_INT i, const MEML_FLOAT value)
 x[i] := value
INLINE void meml_vector_element_set_f (VECTOR *x, const MEML_INT i, const MEML_FLOAT value)
 x[i] := value
INLINE int meml_vector_element_add (VECTOR *x, const MEML_INT i, const MEML_FLOAT value)
 x[i] := x[i] + value
INLINE void meml_vector_element_add_f (VECTOR *x, const MEML_INT i, const MEML_FLOAT value)
 x[i] := x[i] + value

Function Documentation

void meml_vector_clear VECTOR x  ) 
 

$ x :=0 $

INLINE int meml_vector_element_add VECTOR x,
const MEML_INT  i,
const MEML_FLOAT  value
 

x[i] := x[i] + value

INLINE void meml_vector_element_add_f VECTOR x,
const MEML_INT  i,
const MEML_FLOAT  value
 

x[i] := x[i] + value

INLINE MEML_FLOAT meml_vector_element_get const VECTOR x,
const MEML_INT  i
 

alpha := x[i]

INLINE MEML_FLOAT meml_vector_element_get_f const VECTOR x,
const MEML_INT  i
 

alpha := x[i]

INLINE int meml_vector_element_set VECTOR x,
const MEML_INT  i,
const MEML_FLOAT  value
 

x[i] := value

INLINE void meml_vector_element_set_f VECTOR x,
const MEML_INT  i,
const MEML_FLOAT  value
 

x[i] := value

INDEXARRAY* meml_vector_part_sort VECTOR v,
MEML_INT  from,
MEML_INT  till
 

sorts a part of the vector v; v[from:till] ; ascending

The INDEXARRAY which the function returns shows where the single element has been moved.

e.g. v = [ 4 2 1 3] ; form = 0 ; till = 3

after calling meml_vector_part_sort_f it will look like this:

v = [1 2 3 4] ; indexarray = [ 3 1 0 2]

so you see, v[0] has been moved to v[3] etc.

VECTOR* meml_vector_scaling const MEML_FLOAT  alpha,
const VECTOR x
 

$ y := \alpha x $

INDEXARRAY* meml_vector_sort VECTOR v  ) 
 

sorts a vector v ascending

The INDEXARRAY which the function returns shows where the single element has been moved.

e.g. v = [ 5.10e+00 2.21e+00 4.54e+00 1.00e-01 8.10e+00 ]

after calling meml_vector_part_sort it will look like this:

v = [ 1.00e-01 2.21e+00 4.54e+00 5.10e+00 8.10e+00 ] indexarray = [ 3 1 2 0 4 ]

so you see, v[0] has been moved to v[3] etc.


Generated on Tue Mar 28 14:10:38 2006 by  doxygen 1.4.1