init.h File Reference

Go to the source code of this file.

Functions

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

Variables

void(* sg_print_message )(FILE *target, const char *str)
 function called to print normal messages
void(* sg_print_warning )(FILE *target, const char *str)
 function called to print warning messages
void(* sg_print_error )(FILE *target, const char *str)
 function called to print error messages
void(* sg_cancel_computations )(bool &delayed, bool &immediately)
 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)

function called to cancel things

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

function called to print error messages

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

function called to print normal messages

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

function called to print warning messages


SHOGUN Machine Learning Toolbox - Documentation