SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
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__
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:54
void set_global_version(Version *version)
Definition: init.cpp:150
void set_global_math(CMath *math)
Definition: init.cpp:163
void(* sg_print_warning)(FILE *target, const char *str)
function called to print warning messages
Definition: init.cpp:45
void exit_shogun()
Definition: init.cpp:100
void init_shogun_with_defaults()
Definition: init.cpp:94
CMath * get_global_math()
Definition: init.cpp:170
void(* sg_print_error)(FILE *target, const char *str)
function called to print error messages
Definition: init.cpp:48
Parallel * get_global_parallel()
Definition: init.cpp:144
SGIO * get_global_io()
Definition: init.cpp:131
void(* sg_cancel_computations)(bool &delayed, bool &immediately)
function called to cancel things
Definition: init.cpp:51
void set_global_parallel(Parallel *parallel)
Definition: init.cpp:137
void(* sg_print_message)(FILE *target, const char *str)
function called to print normal messages
Definition: init.cpp:42
void init_from_env()
Definition: init.cpp:189
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
Version * get_global_version()
Definition: init.cpp:157
void set_global_rand(CRandom *rand)
Definition: init.cpp:176
void set_global_io(SGIO *io)
Definition: init.cpp:124
CRandom * get_global_rand()
Definition: init.cpp:183

SHOGUN Machine Learning Toolbox - Documentation