init.cpp File Reference

Go to the source code of this file.

Functions

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))
void exit_shogun ()

Variables

CParallelsg_parallel = NULL
CIOsg_io = NULL
CVersionsg_version = NULL
CMathsg_math = NULL
void(* sg_print_message )(FILE *target, const char *str) = NULL
 function called to print normal messages
void(* sg_print_warning )(FILE *target, const char *str) = NULL
 function called to print warning messages
void(* sg_print_error )(FILE *target, const char *str) = NULL
 function called to print error messages
void(* sg_cancel_computations )(bool &delayed, bool &immediately) = NULL
 function called to cancel things

Function Documentation

void exit_shogun (  ) 

This function must be called when one stops using libshogun. It will perform a number of cleanups

Definition at line 58 of file init.cpp.

void init_shogun ( void(*)(FILE *target, const char *str)  print_message = NULL,
void(*)(FILE *target, const char *str)  print_warning = NULL,
void(*)(FILE *target, const char *str)  print_error = NULL,
void(*)(bool &delayed, bool &immediately)  cancel_computations = NULL 
)

This function must be called before libshogun is used. Usually shogun does not provide any output messages (neither debugging nor error; apart from exceptions). This function allows one to specify customized output callback functions and a callback function to check for exceptions:

Parameters:
print_message function pointer to print a message
print_warning function pointer to print a warning message
print_error function pointer to print an error message (this will be printed before shogun throws an exception)
cancel_computations function pointer to check for exception

Definition at line 33 of file init.cpp.


Variable Documentation

void(* sg_cancel_computations)(bool &delayed, bool &immediately) = NULL

function called to cancel things

CIO* sg_io = NULL

Definition at line 17 of file init.cpp.

CMath* sg_math = NULL

Definition at line 19 of file init.cpp.

Definition at line 16 of file init.cpp.

void(* sg_print_error)(FILE *target, const char *str) = NULL

function called to print error messages

void(* sg_print_message)(FILE *target, const char *str) = NULL

function called to print normal messages

void(* sg_print_warning)(FILE *target, const char *str) = NULL

function called to print warning messages

Definition at line 18 of file init.cpp.


SHOGUN Machine Learning Toolbox - Documentation