SHOGUN  v3.1.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 
110 extern void (*sg_print_message)(FILE* target, const char* str);
111 
113 extern void (*sg_print_warning)(FILE* target, const char* str);
114 
116 extern void (*sg_print_error)(FILE* target, const char* str);
117 
119 extern void (*sg_cancel_computations)(bool &delayed, bool &immediately);
120 }
121 #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:44
void set_global_version(Version *version)
Definition: init.cpp:135
void set_global_math(CMath *math)
Definition: init.cpp:148
void(* sg_print_warning)(FILE *target, const char *str)
function called to print warning messages
Definition: init.cpp:35
void exit_shogun()
Definition: init.cpp:88
void init_shogun_with_defaults()
Definition: init.cpp:82
CMath * get_global_math()
Definition: init.cpp:155
void(* sg_print_error)(FILE *target, const char *str)
function called to print error messages
Definition: init.cpp:38
Parallel * get_global_parallel()
Definition: init.cpp:129
SGIO * get_global_io()
Definition: init.cpp:116
void(* sg_cancel_computations)(bool &delayed, bool &immediately)
function called to cancel things
Definition: init.cpp:41
void set_global_parallel(Parallel *parallel)
Definition: init.cpp:122
void(* sg_print_message)(FILE *target, const char *str)
function called to print normal messages
Definition: init.cpp:32
Version * get_global_version()
Definition: init.cpp:142
void set_global_rand(CRandom *rand)
Definition: init.cpp:161
void set_global_io(SGIO *io)
Definition: init.cpp:109
CRandom * get_global_rand()
Definition: init.cpp:168

SHOGUN Machine Learning Toolbox - Documentation