Changeset 87d423 in git


Ignore:
Timestamp:
Aug 23, 2019, 10:13:24 PM (5 years ago)
Author:
Murray Heymann <heymann.murray@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
1594757a62a2f1f847b4aebcfacdc8a03885abf9
Parents:
cd552eb18a483f4541fb1abe06b65fd12e5852c0
git-author:
Murray Heymann <heymann.murray@gmail.com>2019-08-23 22:13:24+02:00
git-committer:
Murray Heymann <heymann.murray@gmail.com>2019-08-23 22:13:32+02:00
Message:
Start creating built-in function for predict fx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rcd552e r87d423  
    77967796  return setOption(res,v);
    77977797}
     7798
     7799
     7800//HERE
     7801static BOOLEAN jjPREDHELP0(leftv res, leftv)
     7802{
     7803        lists L = (lists)omAllocBin(slists_bin);
     7804        if (!ml_initialise()) {
     7805                Print("Not as advertised.");
     7806                PrintLn();
     7807        }
     7808
     7809        L->Init(1);
     7810
     7811        L->m[0].rtyp = STRING_CMD;
     7812        L->m[0].data = omStrDup("SomeString");
     7813
     7814        // pass the resultant list to the res datastructure
     7815        res->data=(void *)L;
     7816
     7817        ml_finalise();
     7818        return FALSE;
     7819}
     7820
     7821
     7822
    77987823static BOOLEAN jjREDUCE4(leftv res, leftv u)
    77997824{
     
    80028027                }
    80038028        }
    8004         // free the struct (not the list itself)
     8029        // free the struct (not the list entries itself, which were allocated
     8030        // by strdup)
     8031        omfree(bb_list->list);
    80058032        omfree(bb_list);
    80068033
  • Singular/table.h

    rcd552e r87d423  
    948948,{D(jjCALL2ARG),  CNUMBER_CMD,     CNUMBER_CMD,         2      , ALLOW_NC |ALLOW_RING}
    949949,{D(jjOPTION_PL), OPTION_CMD,      STRING_CMD/*or set by p*/,-1, ALLOW_NC |ALLOW_RING}
     950,{D(jjPREDHELP0), PREDHELP_CMD,    LIST_CMD,            0      , ALLOW_NC |ALLOW_RING}
    950951,{D(jjCALL2ARG),  REDUCE_CMD,      IDEAL_CMD/*or set by p*/,  2, ALLOW_NC |ALLOW_RING}
    951952,{D(jjCALL3ARG),  REDUCE_CMD,      IDEAL_CMD/*or set by p*/,  3, ALLOW_NC |ALLOW_RING}
     
    954955,{D(jjCALL1ARG),  RESERVEDNAME_CMD, INT_CMD,            1      , ALLOW_NC |ALLOW_RING}
    955956,{D(jjRESERVED0), RESERVEDNAME_CMD, NONE,               0      , ALLOW_NC |ALLOW_RING}
    956 //,{D(jjCALL1ARG),  RESERVEDNAMELIST_CMD, LIST_CMD,            1      , ALLOW_NC |ALLOW_RING}
    957 ,{D(jjRESERVEDLIST0), RESERVEDNAMELIST_CMD, LIST_CMD,               0      , ALLOW_NC |ALLOW_RING}
     957//,{D(jjCALL1ARG),  RESERVEDNAMELIST_CMD, LIST_CMD,       1      , ALLOW_NC |ALLOW_RING}
     958,{D(jjRESERVEDLIST0), RESERVEDNAMELIST_CMD, LIST_CMD,   0      , ALLOW_NC |ALLOW_RING}
    958959,{D(jjSTRING_PL), STRING_CMD,      STRING_CMD,         -1      , ALLOW_NC |ALLOW_RING}
    959960,{D(jjCALL3ARG),  SUBST_CMD,       NONE/*set by p*/,   3       , ALLOW_PLURAL |ALLOW_RING}
     
    11561157  { "poly",        0, POLY_CMD ,          RING_DECL},
    11571158  { "polyBucket",  0, BUCKET_CMD ,        RING_DECL},
     1159  { "predictHelp", 0, PREDHELP_CMD ,      CMD_M},
    11581160  { "preimage",    0, PREIMAGE_CMD ,      CMD_13},
    11591161  { "prime",       0, PRIME_CMD ,         CMD_1},
  • Singular/tok.h

    rcd552e r87d423  
    152152  PARSTR_CMD,
    153153  PFAC_CMD,
     154  PREDHELP_CMD,
    154155  PRIME_CMD,
    155156  PRINT_CMD,
  • machine_learning/ml_python/common/lookuptable.py

    rcd552e r87d423  
    7676            not os.path.isfile(HELPFILE_NPY) or \
    7777            not attempt_cached:
    78         os.makedirs(HOME_DIR, exist_ok=True)
     78        if not os.path.exists(HOME_DIR):
     79            os.makedirs(HOME_DIR)
    7980        file_list = np.array(get_list_of_htm_files())
    8081        np.save(HELPFILE_NPY, file_list)
  • machine_learning/mlpredict.c

    rcd552e r87d423  
    100100        } else {
    101101                retvalue = 0;
     102                printf("HERE!!!!\n");
    102103        }
    103104
Note: See TracChangeset for help on using the changeset viewer.