GraphAlignment/src/GA_matrix.h

Go to the documentation of this file.
00001 #ifndef GA_MATRIX
00002 #define GA_MATRIX
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  * Matrix types.
00027  * ----------------------------------------------------------------------------
00028  */
00029 
00040 #include "GA_vector.h"
00041 
00042 #ifdef __cplusplus
00043 extern "C"
00044 {
00045 #endif
00046 
00067 struct GAMatrixInt_Impl
00068 {
00071         int** elts;
00074         int rows;
00077         int cols;
00080         int refs;
00081 };
00082 
00085 typedef struct GAMatrixInt_Impl GAMatrixInt;
00086 
00100 GAMatrixInt* GA_matrix_create_int(int rows, int cols);
00101 
00114 GAMatrixInt* GA_matrix_create_square_int(int size);
00115 
00127 GAMatrixInt* GA_matrix_ref_int(GAMatrixInt* matrix);
00128 
00137 void GA_matrix_destroy_int(GAMatrixInt* matrix);
00138 
00150 int* GA_matrix_get_elt_int(GAMatrixInt* matrix, int row, int col);
00151 
00162 GAMatrixInt* GA_matrix_init_from_array_int(GAMatrixInt* matrix, int* source, 
00163         int srcSize);
00164 
00177 GAMatrixInt* GA_matrix_create_from_array_int(int* source, int rows, int cols);
00178 
00187 GAMatrixInt* GA_matrix_init_zero_int(GAMatrixInt* matrix);
00188 
00198 GAMatrixInt* GA_matrix_init_unit_int(GAMatrixInt* matrix);
00199 
00208 GAMatrixInt* GA_matrix_print_int(GAMatrixInt* matrix);
00209 
00230 struct GAMatrixReal_Impl
00231 {
00234         double** elts;
00237         int rows;
00240         int cols;
00243         int refs;
00244 };
00245 
00248 typedef struct GAMatrixReal_Impl GAMatrixReal;
00249 
00263 GAMatrixReal* GA_matrix_create_real(int rows, int cols);
00264 
00277 GAMatrixReal* GA_matrix_create_square_real(int size);
00278 
00290 GAMatrixReal* GA_matrix_ref_real(GAMatrixReal* matrix);
00291 
00300 void GA_matrix_destroy_real(GAMatrixReal* matrix);
00301 
00313 double* GA_matrix_get_elt_real(GAMatrixReal* matrix, int row, int col);
00314 
00325 GAMatrixReal* GA_matrix_init_from_array_real(GAMatrixReal* matrix, 
00326         double* source, int srcSize);
00327 
00340 GAMatrixReal* GA_matrix_create_from_array_real(double* source, int rows, 
00341         int cols);
00342 
00351 GAMatrixReal* GA_matrix_init_zero_real(GAMatrixReal* matrix);
00352 
00362 GAMatrixReal* GA_matrix_init_unit_real(GAMatrixReal* matrix);
00363 
00379 GAMatrixInt* GA_matrix_to_bin_real(GAMatrixReal* matrix, GAVectorReal* lookup, 
00380         GAClampMode clamp);
00381 
00390 GAMatrixReal* GA_matrix_print_real(GAMatrixReal* matrix);
00391 
00392 #ifdef __cplusplus
00393 }
00394 #endif
00395 #endif

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