SHOGUN
v3.2.0
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2009 Soeren Sonnenburg 00008 * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society 00009 */ 00010 00011 #ifndef __SG_INIT_H__ 00012 #define __SG_INIT_H__ 00013 00014 #include <stdio.h> 00015 00016 namespace shogun 00017 { 00018 class SGIO; 00019 class CMath; 00020 class Version; 00021 class Parallel; 00022 class CRandom; 00023 00037 void init_shogun(void (*print_message)(FILE* target, const char* str) = NULL, 00038 void (*print_warning)(FILE* target, const char* str) = NULL, 00039 void (*print_error)(FILE* target, const char* str) = NULL, 00040 void (*cancel_computations)(bool &delayed, bool &immediately)=NULL); 00041 00043 void init_shogun_with_defaults(); 00044 00047 void exit_shogun(); 00048 00053 void set_global_io(SGIO* io); 00054 00059 SGIO* get_global_io(); 00060 00065 void set_global_parallel(Parallel* parallel); 00066 00071 Parallel* get_global_parallel(); 00072 00077 void set_global_version(Version* version); 00078 00083 Version* get_global_version(); 00084 00089 void set_global_math(CMath* math); 00090 00095 CMath* get_global_math(); 00096 00101 void set_global_rand(CRandom* rand); 00102 00107 CRandom* get_global_rand(); 00108 00110 extern void (*sg_print_message)(FILE* target, const char* str); 00111 00113 extern void (*sg_print_warning)(FILE* target, const char* str); 00114 00116 extern void (*sg_print_error)(FILE* target, const char* str); 00117 00119 extern void (*sg_cancel_computations)(bool &delayed, bool &immediately); 00120 } 00121 #endif //__SG_INIT__