4#if defined(HAVE_READLINE) && defined(HAVE_READLINE_READLINE_H)
5#include <readline/history.h>
17 char *filename =
getenv(
"SINGULARHIST");
18 if (filename==
NULL) filename=(
char*)
"~/.history";
30 printf(
"Failed to write history\n");
36 WerrorS(
"Initialise of ml failed.");
41 ml_make_prediction(filename, buffer, lengths,
_omStrDup);
43 ml_make_prediction(filename, buffer, lengths,
omStrDup);
48 for (
i = 0;
i < 5;
i++) {
65extern "C" int SI_MOD_INIT(machinelearning)(
SModulFunctions* psModulFunctions)
67 char *filename =
getenv(
"SINGULARHIST");
70 WarnS(
"SINGULARHIST is not set - no history available, using ~/.history");
74 psModulFunctions->iiAddCproc(
Class used for (list of) interpreter objects.
INLINE_THIS void Init(int l=0)
void WerrorS(const char *s)
Function definitions for using python to do machine learning in Singular.
OM_INLINE_DECL char * _omStrDup(const char *s)