SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
init.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2009 Soeren Sonnenburg
8  * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef __SG_INIT_H__
12 #define __SG_INIT_H__
13 
14 #include <shogun/lib/config.h>
15 
16 #include <stdio.h>
17 
18 namespace shogun
19 {
20  class SGIO;
21  class CMath;
22  class Version;
23  class Parallel;
24  class CRandom;
25 
39 void init_shogun(void (*print_message)(FILE* target, const char* str) = NULL,
40  void (*print_warning)(FILE* target, const char* str) = NULL,
41  void (*print_error)(FILE* target, const char* str) = NULL,
42  void (*cancel_computations)(bool &delayed, bool &immediately)=NULL);
43 
46 
49 void exit_shogun();
50 
55 void set_global_io(SGIO* io);
56 
61 SGIO* get_global_io();
62 
67 void set_global_parallel(Parallel* parallel);
68 
73 Parallel* get_global_parallel();
74 
79 void set_global_version(Version* version);
80 
85 Version* get_global_version();
86 
91 void set_global_math(CMath* math);
92 
97 CMath* get_global_math();
98 
103 void set_global_rand(CRandom* rand);
104 
109 CRandom* get_global_rand();
110 
113 void init_from_env();
114 
116 extern void (*sg_print_message)(FILE* target, const char* str);
117 
119 extern void (*sg_print_warning)(FILE* target, const char* str);
120 
122 extern void (*sg_print_error)(FILE* target, const char* str);
123 
125 extern void (*sg_cancel_computations)(bool &delayed, bool &immediately);
126 }
127 #endif //__SG_INIT__

SHOGUN Machine Learning Toolbox - Documentation