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 <stdio.h>
15 
16 namespace shogun
17 {
18  class SGIO;
19  class CMath;
20  class Version;
21  class Parallel;
22  class CRandom;
23 
37 void init_shogun(void (*print_message)(FILE* target, const char* str) = NULL,
38  void (*print_warning)(FILE* target, const char* str) = NULL,
39  void (*print_error)(FILE* target, const char* str) = NULL,
40  void (*cancel_computations)(bool &delayed, bool &immediately)=NULL);
41 
44 
47 void exit_shogun();
48 
53 void set_global_io(SGIO* io);
54 
59 SGIO* get_global_io();
60 
65 void set_global_parallel(Parallel* parallel);
66 
71 Parallel* get_global_parallel();
72 
77 void set_global_version(Version* version);
78 
83 Version* get_global_version();
84 
89 void set_global_math(CMath* math);
90 
95 CMath* get_global_math();
96 
101 void set_global_rand(CRandom* rand);
102 
107 CRandom* get_global_rand();
108 
111 void init_from_env();
112 
114 extern void (*sg_print_message)(FILE* target, const char* str);
115 
117 extern void (*sg_print_warning)(FILE* target, const char* str);
118 
120 extern void (*sg_print_error)(FILE* target, const char* str);
121 
123 extern void (*sg_cancel_computations)(bool &delayed, bool &immediately);
124 }
125 #endif //__SG_INIT__
void init_shogun(void(*print_message)(FILE *target, const char *str), void(*print_warning)(FILE *target, const char *str), void(*print_error)(FILE *target, const char *str), void(*cancel_computations)(bool &delayed, bool &immediately))
Definition: init.cpp:46
void set_global_version(Version *version)
Definition: init.cpp:139
void set_global_math(CMath *math)
Definition: init.cpp:152
void(* sg_print_warning)(FILE *target, const char *str)
function called to print warning messages
Definition: init.cpp:37
void exit_shogun()
Definition: init.cpp:92
void init_shogun_with_defaults()
Definition: init.cpp:86
CMath * get_global_math()
Definition: init.cpp:159
void(* sg_print_error)(FILE *target, const char *str)
function called to print error messages
Definition: init.cpp:40
Parallel * get_global_parallel()
Definition: init.cpp:133
SGIO * get_global_io()
Definition: init.cpp:120
void(* sg_cancel_computations)(bool &delayed, bool &immediately)
function called to cancel things
Definition: init.cpp:43
void set_global_parallel(Parallel *parallel)
Definition: init.cpp:126
void(* sg_print_message)(FILE *target, const char *str)
function called to print normal messages
Definition: init.cpp:34
void init_from_env()
Definition: init.cpp:178
Version * get_global_version()
Definition: init.cpp:146
void set_global_rand(CRandom *rand)
Definition: init.cpp:165
void set_global_io(SGIO *io)
Definition: init.cpp:113
CRandom * get_global_rand()
Definition: init.cpp:172

SHOGUN Machine Learning Toolbox - Documentation