SHOGUN  6.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  class SGLinalg;
26 
40 void init_shogun(void (*print_message)(FILE* target, const char* str) = NULL,
41  void (*print_warning)(FILE* target, const char* str) = NULL,
42  void (*print_error)(FILE* target, const char* str) = NULL,
43  void (*cancel_computations)(bool &delayed, bool &immediately)=NULL);
44 
47 
50 void exit_shogun();
51 
56 void set_global_io(SGIO* io);
57 
62 SGIO* get_global_io();
63 
68 void set_global_parallel(Parallel* parallel);
69 
74 Parallel* get_global_parallel();
75 
80 void set_global_version(Version* version);
81 
86 Version* get_global_version();
87 
92 void set_global_math(CMath* math);
93 
98 CMath* get_global_math();
99 
104 void set_global_rand(CRandom* rand);
105 
110 CRandom* get_global_rand();
111 
112 #ifndef SWIG // SWIG should skip this part
113 
117 SGLinalg* get_global_linalg();
118 #endif
119 
122 void init_from_env();
123 
125 extern void (*sg_print_message)(FILE* target, const char* str);
126 
128 extern void (*sg_print_warning)(FILE* target, const char* str);
129 
131 extern void (*sg_print_error)(FILE* target, const char* str);
132 
134 extern void (*sg_cancel_computations)(bool &delayed, bool &immediately);
135 }
136 #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:57
void set_global_version(Version *version)
Definition: init.cpp:156
void set_global_math(CMath *math)
Definition: init.cpp:169
void(* sg_print_warning)(FILE *target, const char *str)
function called to print warning messages
Definition: init.cpp:48
void exit_shogun()
Definition: init.cpp:106
void init_shogun_with_defaults()
Definition: init.cpp:100
CMath * get_global_math()
Definition: init.cpp:176
void(* sg_print_error)(FILE *target, const char *str)
function called to print error messages
Definition: init.cpp:51
Parallel * get_global_parallel()
Definition: init.cpp:150
SGIO * get_global_io()
Definition: init.cpp:137
void(* sg_cancel_computations)(bool &delayed, bool &immediately)
function called to cancel things
Definition: init.cpp:54
void set_global_parallel(Parallel *parallel)
Definition: init.cpp:143
void(* sg_print_message)(FILE *target, const char *str)
function called to print normal messages
Definition: init.cpp:45
SGLinalg * get_global_linalg()
Definition: init.cpp:195
void init_from_env()
Definition: init.cpp:200
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
Version * get_global_version()
Definition: init.cpp:163
void set_global_rand(CRandom *rand)
Definition: init.cpp:182
void set_global_io(SGIO *io)
Definition: init.cpp:130
CRandom * get_global_rand()
Definition: init.cpp:189

SHOGUN Machine Learning Toolbox - Documentation