00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021
00022
00023 #ifndef _MATRIX_OPS_H_
00024 #define _MATRIX_OPS_H_
00025
00026 #include "defs.h"
00027
00028 extern void cpvec(double *, int, int, double *);
00029 extern double dot(double *, int, int, double *);
00030 extern void scadd(double *, int, int, double, double *);
00031 extern void vecscale(double *, int, int, double, double *);
00032 extern double norm(double *, int, int);
00033
00034 extern void orthog1(int n, double *vec);
00035 extern void init_vec_orth1(int n, double *vec);
00036 extern void right_mult_with_vector(vtx_data *, int, double *,
00037 double *);
00038 extern void right_mult_with_vector_f(float **, int, double *,
00039 double *);
00040 extern void vectors_subtraction(int, double *, double *, double *);
00041 extern void vectors_addition(int, double *, double *, double *);
00042 extern void vectors_scalar_mult(int, double *, double, double *);
00043 extern void copy_vector(int n, double *source, double *dest);
00044 extern double vectors_inner_product(int n, double *vector1,
00045 double *vector2);
00046 extern double max_abs(int n, double *vector);
00047 #ifdef UNUSED
00048 extern void vectors_mult_addition(int, double *, double, double *);
00049 extern void orthogvec(int, double *, double *);
00050 #endif
00051
00052
00053
00054 #ifdef UNUSED
00055 extern void mat_mult_vec(vtx_data * L, int n, double *vec,
00056 double *result);
00057 #endif
00058 extern void right_mult_with_vector_transpose
00059 (double **, int, int, double *, double *);
00060 extern void right_mult_with_vector_d(double **, int, int, double *,
00061 double *);
00062 extern void mult_dense_mat(double **, float **, int, int, int,
00063 float ***C);
00064 extern void mult_dense_mat_d(double **, float **, int, int, int,
00065 double ***CC);
00066 extern void mult_sparse_dense_mat_transpose(vtx_data *, double **, int,
00067 int, float ***);
00068 extern boolean power_iteration(double **, int, int, double **, double *,
00069 boolean);
00070
00071
00072
00073
00074
00075
00076
00077 extern void orthog1f(int n, float *vec);
00078 #ifdef UNUSED
00079 extern void right_mult_with_vectorf(vtx_data *, int, float *, float *);
00080 extern void right_mult_with_vector_fd(float **, int, float *,
00081 double *);
00082 #endif
00083 extern void right_mult_with_vector_ff(float *, int, float *, float *);
00084 extern void vectors_substractionf(int, float *, float *, float *);
00085 extern void vectors_additionf(int n, float *vector1, float *vector2,
00086 float *result);
00087 extern void vectors_mult_additionf(int n, float *vector1, float alpha,
00088 float *vector2);
00089 extern void vectors_scalar_multf(int n, float *vector, float alpha,
00090 float *result);
00091 extern void copy_vectorf(int n, float *source, float *dest);
00092 extern double vectors_inner_productf(int n, float *vector1,
00093 float *vector2);
00094 extern void set_vector_val(int n, double val, double *result);
00095 extern void set_vector_valf(int n, float val, float * result);
00096 extern double max_absf(int n, float *vector);
00097 extern void square_vec(int n, float *vec);
00098 extern void invert_vec(int n, float *vec);
00099 extern void sqrt_vec(int n, float *vec);
00100 extern void sqrt_vecf(int n, float *source, float *target);
00101 extern void invert_sqrt_vec(int n, float *vec);
00102 #ifdef UNUSED
00103 extern void init_vec_orth1f(int n, float *vec);
00104 extern void mat_mult_vecf(vtx_data * L, int n, float *vec,
00105 float *result);
00106 #endif
00107
00108 #endif
00109
00110 #ifdef __cplusplus
00111 }
00112 #endif