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 indexarray-manipulation (Changing single elements)


Functions

int meml_indexarray_element_set (INDEXARRAY *indexarray, const MEML_INT x, const MEML_INT value)
 indexarray[x] := value
MEML_INT meml_indexarray_element_max (const INDEXARRAY *indexarray)
INDEXARRAYmeml_indexarray_part_sort (INDEXARRAY *a, MEML_INT from, MEML_INT till)
 sorts a part of the indexarray a; a[from:till] ; ascending

Function Documentation

MEML_INT meml_indexarray_element_max const INDEXARRAY indexarray  ) 
 

Returns the position of the maximum element in indexarray

int meml_indexarray_element_set INDEXARRAY indexarray,
const MEML_INT  x,
const MEML_INT  value
 

indexarray[x] := value

INDEXARRAY* meml_indexarray_part_sort INDEXARRAY a,
MEML_INT  from,
MEML_INT  till
 

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

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

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

after calling meml_indexarray_part_sort_f it will look like this:

a = [1 2 3 4] ; INDEXARRAY = [ 3 1 0 2]

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


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