4#if defined(HAVE_READLINE) && defined(HAVE_READLINE_READLINE_H)
5#include <readline/history.h>
18 char *filename =
getenv(
"SINGULARHIST");
31 printf(
"Failed to write history\n");
37 WerrorS(
"Initialise of ml failed.");
42 ml_make_prediction(filename, buffer, lengths,
_omStrDup);
44 ml_make_prediction(filename, buffer, lengths,
strdup);
49 for (
i = 0;
i < 5;
i++) {
66extern "C" int SI_MOD_INIT(machinelearning)(
SModulFunctions* psModulFunctions)
68 char *filename =
getenv(
"SINGULARHIST");
71 WarnS(
"SINGULARHIST is not set - no history available, using ~/.singularhist");
75 psModulFunctions->iiAddCproc(
Class used for (list of) interpreter objects.
INLINE_THIS void Init(int l=0)
void WerrorS(const char *s)
#define SINGULARHIST_FILE
Function definitions for using python to do machine learning in Singular.
OM_INLINE_DECL char * _omStrDup(const char *s)