egsl.h
Go to the documentation of this file.
00001 #ifndef H_EASY_GSL
00002 #define H_EASY_GSL
00003 
00004 #include <gsl/gsl_vector.h>
00005 #include <gsl/gsl_matrix.h>
00006 
00007 
00008 #ifdef __cplusplus
00009 extern "C" {
00010 #endif
00011 
00012 struct egsl_val {
00013         gsl_matrix * gslm;
00014         int cid : 16;
00015         int index : 16;
00016 };
00017 
00018 typedef struct egsl_val val;
00019 
00020 /* Core functions */
00021 
00022 /* Push a new context. */
00023 void egsl_push();
00024 void egsl_push_named(const char*name);
00025 /* Pops a context */
00026 void egsl_pop();
00027 void egsl_pop_named(const char*name);
00028 void egsl_free(void);
00029 
00030 double* egsl_atmp(val v, size_t i, size_t j);
00031 val egsl_alloc(size_t rows, size_t columns);
00032 val egsl_alloc_in_context(int cid, size_t rows, size_t cols);
00033 gsl_matrix * egsl_gslm(val v);
00035 val egsl_promote(val v);
00036 
00038 val egsl_scale(double, val);
00039 val egsl_sum(val, val);
00040 val egsl_sum3(val, val, val);
00041 val egsl_mult(val, val);
00042 val egsl_transpose(val);
00043 val egsl_inverse(val);
00044 val egsl_sub(val,val);
00045 val egsl_sum(val v1,val v2);
00046 val egsl_compose_col(val v1, val v2);
00047 val egsl_compose_row(val v1, val v2);
00048 void egsl_add_to(val v1, val v2);
00049 void egsl_add_to_col(val v1, size_t j, val v2);
00050 
00051 double egsl_norm(val);
00052 
00053 void egsl_symm_eig(val v, double* eigenvalues, val* eigenvectors);
00054 
00055 double egsl_atv(val, size_t i);
00056 double egsl_atm(val, size_t i, size_t j);
00057 
00058 /* File: egsl_conversions.c
00059   Conversions */
00060 
00061 val egsl_vFa(size_t rows, const double*);
00062 val egsl_vFda(size_t rows, size_t columns, const double*);
00063 
00065 void egsl_v2a(val, double*);
00067 void egsl_v2da(val, double*);
00069 void egsl_v2vec(val, gsl_vector*);
00070 
00071 val egsl_vFgslv(const gsl_vector*);
00072 val egsl_vFgslm(const gsl_matrix*);
00073 
00074 gsl_matrix* egsl_v2gslm(val);
00075 
00076 /*/ File: egsl_misc.c
00077     Miscellaneous useful matrixes. */
00078 val egsl_zeros(size_t rows, size_t columns);
00079 val egsl_ones(size_t rows, size_t columns);
00080 val egsl_vers(double theta);
00081 val egsl_rot(double theta);
00082 
00083 
00084 /* Misc */
00085 void egsl_print(const char*str, val);   
00087 void egsl_print_spectrum(const char*s, val v);
00088 void egsl_print_stats(void);
00089 
00090 
00091         
00093 void egsl_expect_size(val v, size_t rows, size_t cols);
00094 void egsl_error(void);
00095 
00096 
00097 #ifdef __cplusplus
00098 }
00099 #endif
00100 
00101 #endif


csm
Author(s): Andrea Censi
autogenerated on Mon Jan 16 2017 03:48:29