GraphAlignment/src/GA_vector.h

Go to the documentation of this file.
00001 #ifndef GA_VECTOR
00002 #define GA_VECTOR
00003 /* ----------------------------------------------------------------------------
00004  * R package for graph alignment
00005  * ----------------------------------------------------------------------------
00006  *
00007  * Author: Joern P. Meier <mail@ionflux.org>
00008  * 
00009  * The package can be used freely for non-commercial purposes. If you use this 
00010  * package, the appropriate paper to cite is J. Berg and M. Lässig, 
00011  * "Cross-species analysis of biological networks by Bayesian alignment", 
00012  * PNAS 103 (29), 10967-10972 (2006)
00013  * 
00014  * This software is made available in the hope that it will be useful, but 
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
00016  * or FITNESS FOR A PARTICULAR PURPOSE.
00017  * 
00018  * This software contains code for solving linear assignment problems which was 
00019  * written by Roy Jonker, MagicLogic Optimization Inc.. Please note that this 
00020  * code is copyrighted, &copy; 2003 MagicLogic Systems Inc., Canada and may be 
00021  * used for non-commercial purposes only. See 
00022  * https://www.magiclogic.com/assignment.html for the latest version of the LAP 
00023  * code and details on licensing.
00024  *
00025  * ----------------------------------------------------------------------------
00026  * Vector types.
00027  * ----------------------------------------------------------------------------
00028  */
00029 
00040 #ifdef __cplusplus
00041 extern "C"
00042 {
00043 #endif
00044 
00065 struct GAVectorInt_Impl
00066 {
00069         int* elts;
00072         int size;
00075         int refs;
00076 };
00077 
00080 typedef struct GAVectorInt_Impl GAVectorInt;
00081 
00094 GAVectorInt* GA_vector_create_int(int size);
00095 
00107 GAVectorInt* GA_vector_ref_int(GAVectorInt* vec);
00108 
00117 void GA_vector_destroy_int(GAVectorInt* vec);
00118 
00129 int* GA_vector_get_elt_int(GAVectorInt* vec, int index);
00130 
00141 GAVectorInt* GA_vector_init_from_array_int(GAVectorInt* vec, int* source, 
00142         int srcSize);
00143 
00155 GAVectorInt* GA_vector_create_from_array_int(int* source, int srcSize);
00156 
00165 GAVectorInt* GA_vector_init_zero_int(GAVectorInt* vec);
00166 
00175 GAVectorInt* GA_vector_print_int(GAVectorInt* vec);
00176 
00187 GAVectorInt* GA_invert_permutation_int(GAVectorInt* vec);
00188 
00209 struct GAVectorReal_Impl
00210 {
00213         double* elts;
00216         int size;
00219         int refs;
00220 };
00221 
00224 typedef struct GAVectorReal_Impl GAVectorReal;
00225 
00238 GAVectorReal* GA_vector_create_real(int size);
00239 
00251 GAVectorReal* GA_vector_ref_real(GAVectorReal* vec);
00252 
00261 void GA_vector_destroy_real(GAVectorReal* vec);
00262 
00273 double* GA_vector_get_elt_real(GAVectorReal* vec, int index);
00274 
00285 GAVectorReal* GA_vector_init_from_array_real(GAVectorReal* vec, 
00286         double* source, int srcSize);
00287 
00299 GAVectorReal* GA_vector_create_from_array_real(double* source, int srcSize);
00300 
00309 GAVectorReal* GA_vector_init_zero_real(GAVectorReal* vec);
00310 
00316 enum GAClampMode_Impl
00317 {
00320         GA_CLAMP_ENABLED = 1,
00323         GA_CLAMP_DISABLED = 0,
00324 };
00325 
00328 typedef enum GAClampMode_Impl GAClampMode;
00329 
00344 int GA_get_bin_number(double x, GAVectorReal* lookup, GAClampMode clamp);
00345 
00361 GAVectorInt* GA_vector_to_bin_real(GAVectorReal* vec, GAVectorReal* lookup, 
00362         GAClampMode clamp);
00363 
00372 GAVectorReal* GA_vector_print_real(GAVectorReal* vec);
00373 
00374 #ifdef __cplusplus
00375 }
00376 #endif
00377 #endif

Generated on Thu Aug 16 15:28:41 2007 for Graphalignment(Rpackage) by  doxygen 1.5.1