EMAN2
hybr.h
Go to the documentation of this file.
00001 /* This header file includes all the function delarations needed to run HyBR in C */
00002 
00003 #define integer int
00004 #define frand() ((float) rand() / (RAND_MAX+1.0))
00005 //#define max(a,b) a > b ? a : b
00006 //#define min(a,b) ((a) > (b) ? (a) : (b))
00007 
00008 #define max(a,b) a > b ? a : b
00009 #define min(a,b) a < b ? a : b
00010 
00011 /* from matrix.c */
00012 extern float **matrix(int m, int n);
00013 extern float **submatrix(float **A, int m, int n, int newm, int newn);
00014 extern void free_matrix(float **A);
00015 extern void fill_rand(float **A, int m, int n);
00016 extern void print_matrix(float **A, int m, int n);
00017 extern void transpose_matrix(float **A, int m, int n);
00018 extern void column_orient(float **A, int m, int n, float ** B);
00019 extern void row_sum(float **A, int m, int n, float *e);
00020 extern void copy_matrix(float **A, float **B, int m, int n);
00021 
00022 extern float *myvector(int n);
00023 extern float *subvector(float *x, int n, int newn);
00024 extern void free_vector(float * x);
00025 extern void print_vector(float *x, int n);
00026 extern void fill_ones(float *x, int n);
00027 extern float sum_vector(float *x, int n);
00028 extern void copy_vector(float *x, float *y, int n);
00029 extern void fillveczeros(float *x, int n);
00030 extern float norm(float *x, int n);
00031 extern void alphaxpy(float alpha, float *x, float *y, int n);
00032 
00033 extern void matvec_mult(float ** A, float *x, int m, int n, float *b);
00034 extern void matvec_multT(float **A, float *x, int m, int n, float *b);
00035 extern void get_col(float ** A, int m, int k, float * ak);
00036 extern void get_row(float ** A, int n, int k, float * ak);
00037 extern void put_col(float ** A, int m, float * v, int k);
00038 
00039 
00040 /* from direct_methods.c */
00041 extern void svd(float **A, int m, int n, float **U, float *x, float **V);
00042 extern void tsvd(float **U, float *s, float **V, float *b, int m, int n, float omega, float *x, float *tol);
00043 extern void gcv_tsvd(float *s, float *bhat, int m, int n, float omega, float * tol);
00044 extern void tikhonov(float **U, float *s, float **V, float *b, int m, int n, float omega, float *x, float * alpha);
00045 extern float GCVmin_Tik(float *s, float *bhat, int m, int n, int MaxIts, float omega);
00046 extern float GCVfun_Tik(float alpha, float *s, float * bhat, int m, int n, float omega);
00047 extern void generate_noise(double *E, int m, int n);
00048 
00049 
00050