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)  

meml.c File Reference

Implementation of the Meta Matrix Library,. More...

#include "meml.h"

Functions

VECTORmeml_vector_new_diag (const ME_MATRIX *M)
ME_MATRIXmeml_matrix_new_diag (const M_TYPE type, const VECTOR *v)
ME_MATRIXmeml_sparse (const INDEXARRAY *rows, const INDEXARRAY *cols, const VECTOR *values)
 creates a new sparse matrix
ME_MATRIXmeml_matrix_new (const M_TYPE type, const MEML_INT row, const MEML_INT col)
ME_MATRIXmeml_matrix_new_form_carray (const M_TYPE type, const MEML_INT row, const MEML_INT col, const MEML_FLOAT data[])
 The function creates a new matrix based on a C-array.
ME_MATRIXmeml_matrix_new_eye (const M_TYPE type, const MEML_INT row, const MEML_INT col)
ME_MATRIXmeml_matrix_new_zeros (const M_TYPE type, const MEML_INT row, const MEML_INT col)
ME_MATRIXmeml_matrix_new_ones (const M_TYPE type, const MEML_INT row, const MEML_INT col)
VECTORmeml_vector_new_eye (const MEML_INT dim, const MEML_INT i)
VECTORmeml_vector_new_zeros (const MEML_INT dim)
VECTORmeml_vector_new_ones (const MEML_INT dim)
 v:= [1, 1, ... ,1]'
INDEXARRAYmeml_indexarray_new (const MEML_INT dim)
INDEXARRAYmeml_indexarray_copy (const INDEXARRAY *index)
void meml_matrix_free (ME_MATRIX *M)
void meml_matrix_ceil (ME_MATRIX *M)
int meml_matrix_col_set (ME_MATRIX *M, const VECTOR *v, const MEML_INT col)
 $ M(:,col) := v $
MEML_FLOAT meml_matrix_element_get_f (const ME_MATRIX *A, const MEML_INT x, const MEML_INT y)
void meml_matrix_element_set_f (ME_MATRIX *A, const MEML_INT x, const MEML_INT y, const MEML_FLOAT value)
int meml_matrix_row_set (ME_MATRIX *M, const VECTOR *v, const MEML_INT row)
 $ M(row,;) := v $
VECTORmeml_matrix_row_get (const ME_MATRIX *M, const MEML_INT row)
 $ v := M(row , :) $
VECTORmeml_matrix_col_get (const ME_MATRIX *M, const MEML_INT col)
 $ v := M(: , col) $
void meml_matrix_row_get_f (const ME_MATRIX *M, VECTOR *v, const MEML_INT row)
 $ v := M(row , :) $
void meml_matrix_col_get_f (const ME_MATRIX *M, VECTOR *v, const MEML_INT col)
 $ v := M(: , col) $
void meml_matrix_set_row_2_unit_vector (ME_MATRIX *M, const MEML_INT row)
void meml_matrix_set_col_2_unit_vector (ME_MATRIX *M, const MEML_INT col)
void meml_matrix_element_set (ME_MATRIX *A, const MEML_INT x, const MEML_INT y, const MEML_FLOAT value)
 A(x,y) := value.
void meml_matrix_element_add (ME_MATRIX *A, const MEML_INT x, const MEML_INT y, const MEML_FLOAT value)
 A(x,y) := A(x,y) + value.
void meml_matrix_element_add_f (ME_MATRIX *A, MEML_INT x, MEML_INT y, MEML_FLOAT value)
 A(x,y) := A(x,y) + value.
void meml_matrix_element_mul (ME_MATRIX *A, const MEML_INT x, const MEML_INT y, const MEML_FLOAT alpha)
 A(x,y) := A(x,y) * alpha.
void meml_matrix_element_mul_f (ME_MATRIX *A, MEML_INT x, MEML_INT y, MEML_FLOAT alpha)
 A(x,y) := A(x,y) * alpha.
MEML_FLOAT meml_matrix_element_get (const ME_MATRIX *A, const MEML_INT x, const MEML_INT y)
 alpha := A(x,y)
INDEXARRAYmeml_indexarray_part_sort (INDEXARRAY *a, MEML_INT from, MEML_INT till)
 sorts a part of the indexarray a; a[from:till] ; ascending
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_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
MEML_FLOAT meml_vector_element_max (const VECTOR *a)
 $ \alpha := \max a $
MEML_FLOAT meml_vector_element_max_f (const VECTOR *a, MEML_INT *which)
 $ \alpha := \max a := a[which] $
VECTORmeml_vector_abs (const VECTOR *a)
 $ b := abs( a ) $
void meml_vector_abs_f (VECTOR *a)
 $ a := abs( a ) $
VECTORmeml_vector_scaling (const MEML_FLOAT alpha, const VECTOR *x)
 $ y := \alpha x $
VECTORmeml_vector_multiadd (const MEML_FLOAT *alpha, const VECTOR **x, MEML_INT n)
 $ y := \sum_{i=0}^{n-1} \alpha_i x_i $
VECTORmeml_vector_add (const VECTOR *x, const VECTOR *y)
 $ y := x + y$
VECTORmeml_vector_min (const VECTOR *x, const VECTOR *y)
 $ z := x - y$
void meml_vector_min_f (const VECTOR *x, VECTOR *y)
 $ y := - x + y = y - x$
MEML_FLOAT meml_vector_norm (const VECTOR *x)
 $ \alpha := \|x\|_{2} $
MEML_FLOAT meml_vector_norm_max (const VECTOR *x)
 $ \alpha := \|x\|_{max} $
int meml_vector_equal (const VECTOR *x, const VECTOR *y)
 returns 1 if x=y and 0 if x $ \not= $ y
void meml_vector_clear (VECTOR *x)
 $ x :=0 $
ME_MATRIXmeml_matrix_copy (const ME_MATRIX *A)
int meml_matrix_part_copy_f (const ME_MATRIX *M, const MEML_INT xm1, const MEML_INT ym1, const MEML_INT xm2, const MEML_INT ym2, ME_MATRIX *D, const MEML_INT xd1, const MEML_INT yd1)
 $ D(xd1 : xd1+(xm2-xm1),yd1 : yd1+(ym2-ym1) ) := M(xm1:xm2 , ym1:ym2) $
ME_MATRIXmeml_matrix_add (const ME_MATRIX *A, const ME_MATRIX *B)
 $ C := A + B $
void meml_matrix_add_f (const ME_MATRIX *A, ME_MATRIX *B)
 $ B := A + B $
ME_MATRIXmeml_matrix_trans (ME_MATRIX *M)
 A : = M'.
void meml_matrix_trans_f (ME_MATRIX **M)
 M : = M'.
void meml_matrix_erase (ME_MATRIX *M, const MEML_FLOAT border)
void meml_matrix_resize (ME_MATRIX **M, const MEML_INT row, const MEML_INT col)
ME_MATRIXmeml_matrix_convert (const M_TYPE type, const ME_MATRIX *A)
 B := A.
int meml_matrix_equal (const ME_MATRIX *A, const ME_MATRIX *B)
 returns 1 if A=B and 0 if A $ \not= $ B
void meml_matrix_clear (ME_MATRIX *M)
 $ M :=0 $
ME_MATRIXmeml_matrix_mul (const ME_MATRIX *A, const ME_MATRIX *B)
 $ C := A * B $
void meml_matrix_mul_f (const ME_MATRIX *A, const ME_MATRIX *B, ME_MATRIX **C)
 $ C := A * B $
void meml_matrix_mul_ff (const MEML_FLOAT alpha, const ME_MATRIX *A, const ME_MATRIX *B, const MEML_FLOAT beta, ME_MATRIX **C)
 $ C := alpha A * B + beta C $
ME_MATRIXmeml_matrix_scaling (const MEML_FLOAT alpha, const ME_MATRIX *M)
 $ B := alpha * A $
void meml_matrix_scaling_f (const MEML_FLOAT alpha, ME_MATRIX *M)
 $ A := alpha * A $
MEML_INT meml_matrix_rank (const ME_MATRIX *M)
 rank of a matrix
MEML_FLOAT meml_matrix_norm (const ME_MATRIX *M)
 $ \alpha := \|A\|_2 $
MEML_FLOAT meml_matrix_norm_inf (const ME_MATRIX *M)
 $ \alpha := \|A\|_{inf} $
MEML_FLOAT meml_matrix_norm_1 (const ME_MATRIX *M)
 $ \alpha := \|A\|_{1} $
MEML_FLOAT meml_matrix_norm_frobenius (const ME_MATRIX *M)
 $ \alpha := \|A\|_{fro} = \sqrt{\sum_{i=1}^m \sum_{j=1}^m a_{ij}^2}$
ME_MATRIXmeml_matrix_rank_one_update (const MEML_FLOAT alpha, const VECTOR *x, const VECTOR *y, const ME_MATRIX *M)
 $ B := \alpha xy^T + A $
void meml_matrix_rank_one_update_f (const MEML_FLOAT alpha, const VECTOR *x, const VECTOR *y, ME_MATRIX *M)
 $ A := \alpha xy^T + A $
void meml_matrix_eig (const ME_MATRIX *M, VECTOR *wr, VECTOR *wi)
VECTORmeml_matrix_svd (const ME_MATRIX *A)
int meml_matrix_svd_f (const ME_MATRIX *A, VECTOR *s)
ME_MATRIXmeml_matrix_eig_f (const ME_MATRIX *M, VECTOR *wr, VECTOR *wi)
ME_MATRIXmeml_matrix_lu (const ME_MATRIX *M, ME_MATRIX *L, ME_MATRIX *U)
 M = P * L * U.
int meml_matrix_qr (const ME_MATRIX *M, ME_MATRIX **Q, ME_MATRIX **R)
 QR = M.
void meml_matrix_t_vector_mul_f (const ME_MATRIX *matrix, const VECTOR *vector, VECTOR *result)
VECTORmeml_matrix_t_vector_mul (const ME_MATRIX *matrix, const VECTOR *vector)
void meml_matrix_vector_mul_ff (const ME_MATRIX *M, VECTOR *y)
 $ y := M*y $
void meml_matrix_vector_mul_f (const ME_MATRIX *matrix, const VECTOR *vector, VECTOR *result)
 result := matrix*vector
VECTORmeml_matrix_vector_mul (const ME_MATRIX *matrix, const VECTOR *vector)
 result := matrix * vector
void meml_matrix_print (const ME_MATRIX *M)
void meml_vector_print (const VECTOR *x)
void meml_indexarray_print (const INDEXARRAY *a)
int meml_vector_import_from_dat (const char filename[], const int number_of_vectors,...)
ME_MATRIXmeml_matrix_import_from_dat (const M_TYPE type, const MEML_INT row, const MEML_INT col, const char filename[])
int meml_vector_export2dat (const char dateiname[], const int number_of_vectors,...)
void meml_init (MEML_FLOAT eps, char plot, char verbose)
void meml_matrix_property_get (const ME_MATRIX *A, MEML_INT *col, MEML_INT *row, M_TYPE *type)

Variables

double MEML_EPS = 1e-16
int MEML_VERBOSE = 1
char MEML_PLOT = 'n'


Detailed Description

Implementation of the Meta Matrix Library,.

Author:
Joerg Frochte
, based on ssml, sdml, ATLAS and LaPack

Variable Documentation

double MEML_EPS = 1e-16
 

char MEML_PLOT = 'n'
 

int MEML_VERBOSE = 1
 


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