lmr reference

Every command-line flag, exit code, context object, host type, method and function of the lmr host, generated from the schema embedded in the repository (native/schema/lmr.dsl.json, dsl.schema 2, name lmr) and from native/src/host/main.cpp. The host schema declares 166 functions with 234 signatures and 50 types with 604 method signatures; the vendored standard library adds 206 more signatures.

Command line

CommandEffect
lmr --versionPrints lmr followed by the release version and exits 0.
lmr --lmcode-schemaPrints a readable summary of the registry: context and function signatures, then each type with its methods.
lmr --lmcode-schema --jsonWrites the embedded schema JSON byte for byte; this is what lmscript compiles against.
lmr --schemaAccepted as an alias of --lmcode-schema, with the same optional --json.
lmr --lmcode-signaturesPrints one canonical signature per line from the live registry.
lmr --generate-schemaPrints schema JSON generated from the live registry (used to maintain the schema file).
lmr --lmcode FILE [FILE ...]Loads and verifies every compiled program file, then runs them in order and writes one result frame to stdout.
lmr --lmcode FILE --lmcode FILEThe repeated-flag form is also accepted for multi-file runs.

Any other argument shape prints the usage line to stderr and is reported as a usage error. All program files are loaded and verified before any of them runs, so a broken later file leaves no output from an earlier one.

Exit codes

CodeMeaning
0Success: the program ran and every out.check assertion passed.
2Command-line usage error (error code CLI_USAGE).
3Load or run error, for example bytecode that fails verification (LOAD_BAD_BYTECODE) or a registry error.
4Application failure: one or more out.check calls failed (APP_FAIL).

Run result

From LMScript, run_lmcode(prog) returns an object with ok and result. For lmr the result holds values (everything stored with out.set, in first-set order), checks (the number of out.check calls) and failures (the number that failed). Non-finite numbers serialize as JSON null.

Context objects

NameType
outOut

Host functions

FunctionSignatures
acosacos(float) -> float
anovaanova(Lm, Lm) -> Anova
approx_funapprox_fun(Vec, Vec) -> ApproxFun; approx_fun(Vec, Vec, string, int) -> ApproxFun; approx_fun(Vec, Vec, string, int, float) -> ApproxFun
arimaarima(int, int, int) -> ArimaSpec
arima_simarima_sim(Rng, int, Vec, Vec, float) -> Vec; arima_sim(Rng, int, Vec, Vec, float, int) -> Vec
as_matrixas_matrix(Frame) -> Mat
asinasin(float) -> float
atanatan(float) -> float
atan2atan2(float, float) -> float
bessel_ibessel_i(float, float) -> float; bessel_i(float, float, bool) -> float
bessel_jbessel_j(float, float) -> float
bessel_kbessel_k(float, float) -> float; bessel_k(float, float, bool) -> float
bessel_ybessel_y(float, float) -> float
betabeta(float, float) -> float
beta_distbeta_dist(float, float) -> Dist
beta_incbeta_inc(float, float, float) -> float
binombinom(int, float) -> Dist
bwbw(Vec, string) -> float
cauchycauchy(float, float) -> Dist
ceilceil(float) -> float
chisqchisq(float) -> Dist; chisq(float, float) -> Dist
choosechoose(float, float) -> float
cmdscalecmdscale(Mat, int) -> Mds
coshcosh(float) -> float
cveccvec(Vec, Vec) -> CVec
densitydensity(Vec) -> Density; density(Vec, float, string) -> Density; density(Vec, string) -> Density; density(Vec, string, string) -> Density; density(Vec, string, string, float) -> Density
diagdiag(Vec) -> Mat
digammadigamma(float) -> float
distdist(string, float) -> Dist; dist(string, float, float) -> Dist; dist(string, float, float, float) -> Dist
ecdfecdf(Vec) -> Ecdf
erferf(float) -> float
erfcerfc(float) -> float
expexp(float) -> float
exp_distexp_dist(float) -> Dist
expm1expm1(float) -> float
f_distf_dist(float, float) -> Dist; f_dist(float, float, float) -> Dist
factorialfactorial(float) -> float
fftfft(Vec) -> CVec
file_appendfile_append(string, string) -> void
file_existsfile_exists(string) -> bool
file_linesfile_lines(string) -> StrList
file_readfile_read(string) -> string
file_writefile_write(string, string) -> void
float_listfloat_list() -> FloatList
float_mapfloat_map() -> FloatMap
float_pqfloat_pq() -> FloatPQ
float_queuefloat_queue() -> FloatQueue
float_stackfloat_stack() -> FloatStack
fmtfmt(string, float) -> string; fmt(string, int) -> string; fmt(string, string) -> string
frameframe() -> Frame
gammagamma(float) -> float
gamma_distgamma_dist(float, float) -> Dist
gamma_pgamma_p(float, float) -> float
geomgeom(float) -> Dist
glmglm(Frame, string, string) -> Glm; glm(Frame, string, string, string) -> Glm; glm(Frame, string, string, string, Vec) -> Glm; glm(Frame, string, string, string, Vec, Vec) -> Glm
hclusthclust(Frame, string) -> Hclust; hclust(Frame, string, string) -> Hclust; hclust(Frame, string, string, float) -> Hclust
histhist(Vec) -> Hist; hist(Vec, Vec) -> Hist; hist(Vec, string) -> Hist
hyperhyper(int, int, int) -> Dist
identityidentity(int) -> Mat
infinf() -> float
int_listint_list() -> IntList
int_mapint_map() -> IntMap
int_pqint_pq() -> IntPQ
int_queueint_queue() -> IntQueue
int_stackint_stack() -> IntStack
integrateintegrate(float, float) -> Integral
is_finiteis_finite(float) -> bool
is_keptis_kept(string) -> bool
is_nanis_nan(float) -> bool
json_parsejson_parse(string) -> Json
keepkeep(string, Frame) -> void; keep(string, Vec) -> void
kept_framekept_frame(string) -> Frame
kept_veckept_vec(string) -> Vec
kmeanskmeans(Frame, int, Rng) -> Kmeans; kmeans(Frame, int, Rng, int) -> Kmeans; kmeans(Frame, int, Rng, int, int, string) -> Kmeans
lbetalbeta(float, float) -> float
lchooselchoose(float, float) -> float
lfactoriallfactorial(float) -> float
lgammalgamma(float) -> float
linspacelinspace(float, float, int) -> Vec
lmlm(Frame, string) -> Lm; lm(Frame, string, Vec) -> Lm
lmcode_return_nulllmcode_return_null() -> void
lmcode_return_putlmcode_return_put(string, FloatList) -> void; lmcode_return_put(string, FloatMap) -> void; lmcode_return_put(string, IntList) -> void; lmcode_return_put(string, IntMap) -> void; lmcode_return_put(string, Json) -> void; lmcode_return_put(string, StrList) -> void; lmcode_return_put(string, StrMap) -> void; lmcode_return_put(string, bool) -> void; lmcode_return_put(string, float) -> void; lmcode_return_put(string, int) -> void; lmcode_return_put(string, string) -> void
lmcode_return_put_nulllmcode_return_put_null(string) -> void
lmcode_return_setlmcode_return_set(FloatList) -> void; lmcode_return_set(FloatMap) -> void; lmcode_return_set(IntList) -> void; lmcode_return_set(IntMap) -> void; lmcode_return_set(Json) -> void; lmcode_return_set(StrList) -> void; lmcode_return_set(StrMap) -> void; lmcode_return_set(bool) -> void; lmcode_return_set(float) -> void; lmcode_return_set(int) -> void; lmcode_return_set(string) -> void
lnormlnorm(float, float) -> Dist
loessloess(Vec, Vec) -> Loess; loess(Vec, Vec, float) -> Loess; loess(Vec, Vec, float, int) -> Loess; loess(Vec, Vec, float, int, string) -> Loess
loglog(float) -> float
log10log10(float) -> float
log1plog1p(float) -> float
log2log2(float) -> float
logislogis(float, float) -> Dist
lpadlpad(string, int) -> string
mahalanobismahalanobis(Mat, Vec, Mat) -> Vec
math_absmath_abs(float) -> float; math_abs(int) -> int
math_ceilmath_ceil(float) -> float; math_ceil(int) -> int
math_floormath_floor(float) -> float; math_floor(int) -> int
math_maxmath_max(float, float) -> float; math_max(int, int) -> int
math_minmath_min(float, float) -> float; math_min(int, int) -> int
math_powmath_pow(float, float) -> float; math_pow(int, int) -> int
math_roundmath_round(float) -> float; math_round(int) -> int
math_sqrtmath_sqrt(float) -> float; math_sqrt(int) -> int
matrixmatrix(Vec, int, bool) -> Mat
minimizeminimize(Vec, string) -> Minimizer
nannan() -> float
nbinomnbinom(float, float) -> Dist
nlsnls(Vec) -> Nls
normnorm() -> Dist; norm(float, float) -> Dist
optimizeoptimize(float, float) -> Optimizer1; optimize(float, float, bool) -> Optimizer1
parse_vecparse_vec(string) -> Vec
pipi() -> float
poispois(float) -> Dist
prcompprcomp(Frame, bool) -> Pca; prcomp(Frame, bool, bool) -> Pca; prcomp(Mat, bool) -> Pca
prettypretty(float, float, int) -> Vec
read_csvread_csv(string) -> Frame
reprep(float, int) -> Vec
rngrng(int) -> Rng
roundround(float) -> float; round(float, int) -> float
rpadrpad(string, int) -> string
seqseq(float, float, float) -> Vec
seq_lenseq_len(int) -> Vec
sinhsinh(float) -> float
smooth_splinesmooth_spline(Vec, Vec) -> SmoothSpline; smooth_spline(Vec, Vec, bool) -> SmoothSpline
smooth_spline_dfsmooth_spline_df(Vec, Vec, float) -> SmoothSpline
smooth_spline_lambdasmooth_spline_lambda(Vec, Vec, float) -> SmoothSpline
spline_funspline_fun(Vec, Vec) -> Spline; spline_fun(Vec, Vec, string) -> Spline
stlstl(Vec, int, int) -> Stl; stl(Vec, int, int, bool) -> Stl
stl_periodicstl_periodic(Vec, int) -> Stl; stl_periodic(Vec, int, bool) -> Stl
str_base64_decodestr_base64_decode(string) -> string
str_base64_encodestr_base64_encode(string) -> string
str_containsstr_contains(string, string) -> bool
str_ends_withstr_ends_with(string, string) -> bool
str_findstr_find(string, string) -> int
str_hex_decodestr_hex_decode(string) -> string
str_hex_encodestr_hex_encode(string) -> string
str_is_floatstr_is_float(string) -> bool
str_is_intstr_is_int(string) -> bool
str_lenstr_len(string) -> int
str_liststr_list() -> StrList
str_lowerstr_lower(string) -> string
str_mapstr_map() -> StrMap
str_matchstr_match(string, string) -> bool
str_pqstr_pq() -> StrPQ
str_queuestr_queue() -> StrQueue
str_repeatstr_repeat(string, int) -> string
str_replacestr_replace(string, string, string) -> string
str_splitstr_split(string, string) -> StrList
str_stackstr_stack() -> StrStack
str_starts_withstr_starts_with(string, string) -> bool
str_substrstr_substr(string, int, int) -> string
str_to_floatstr_to_float(string) -> float
str_to_intstr_to_int(string) -> int
str_trimstr_trim(string) -> string
str_upperstr_upper(string) -> string
t_distt_dist(float) -> Dist; t_dist(float, float) -> Dist
tantan(float) -> float
tanhtanh(float) -> float
template_rendertemplate_render(string, Json) -> string
testtest(string) -> Test
trigammatrigamma(float) -> float
trunctrunc(float) -> float
tukeytukey(float, float) -> Dist; tukey(float, float, float) -> Dist
unifunif(float, float) -> Dist
unirootuniroot(float, float) -> RootFinder
vecvec() -> Vec
weibullweibull(float, float) -> Dist
zeroszeros(int) -> Vec

Host types and methods

The schema declares these 50 types: Anova, ApproxFun, Arima, ArimaSpec, CVec, Density, Dist, Ecdf, Eigen, FloatList, FloatMap, FloatPQ, FloatQueue, FloatStack, Forecast, Frame, Glm, Hclust, Hist, Htest, IntList, IntMap, IntPQ, IntQueue, IntStack, Integral, Json, Kmeans, Lm, Loess, Mat, Mds, Minimizer, Nls, Optimizer1, Out, Pca, Rng, RootFinder, SmoothSpline, Spline, Stl, StrList, StrMap, StrPQ, StrQueue, StrStack, Svd, Test, Vec.

Anova

MethodSignatures
atat(int, string) -> float; at(string, string) -> float
colcol(string) -> Vec
columnscolumns() -> StrList
n_rowsn_rows() -> int
row_namerow_name(int) -> string
tabletable() -> string

ApproxFun

MethodSignatures
atat(float) -> float
evaleval(Vec) -> Vec

Arima

MethodSignatures
aicaic() -> float
convergenceconvergence() -> int
estimateestimate(int) -> float; estimate(string) -> float
forecastforecast(int) -> Forecast
has_coefhas_coef(string) -> bool
loglikloglik() -> float
n_coefn_coef() -> int
namename(int) -> string
nobsnobs() -> int
p_valuep_value(int) -> float; p_value(string) -> float
residualsresiduals() -> Vec
sese(int) -> float; se(string) -> float
sigma2sigma2() -> float
statisticstatistic(int) -> float; statistic(string) -> float

ArimaSpec

MethodSignatures
fitfit(Vec) -> Arima
include_meaninclude_mean(bool) -> ArimaSpec
methodmethod(string) -> ArimaSpec
seasonalseasonal(int, int, int, int) -> ArimaSpec

CVec

MethodSignatures
argarg(int) -> float
fftfft(bool) -> CVec
imim(int) -> float
im_vecim_vec() -> Vec
lenlen() -> int
modmod(int) -> float
mod_vecmod_vec() -> Vec
rere(int) -> float
re_vecre_vec() -> Vec
scalescale(float) -> CVec

Density

MethodSignatures
atat(float) -> float
bwbw() -> float
evaleval(Vec) -> Vec
kernelkernel() -> string
xx() -> Vec
yy() -> Vec

Dist

MethodSignatures
dd(float) -> float
d_vecd_vec(Vec) -> Vec
is_discreteis_discrete() -> bool
log_dlog_d(float) -> float
log_plog_p(float) -> float
log_p_upperlog_p_upper(float) -> float
meanmean() -> float
namename() -> string
pp(float) -> float
p_upperp_upper(float) -> float
p_vecp_vec(Vec) -> Vec
qq(float) -> float
q_logq_log(float) -> float
q_upperq_upper(float) -> float
q_vecq_vec(Vec) -> Vec
sdsd() -> float
varvar() -> float

Ecdf

MethodSignatures
atat(float) -> float
evaleval(Vec) -> Vec
knotsknots() -> Vec
quantilequantile(float) -> float

Eigen

MethodSignatures
valuesvalues() -> Vec
vectorsvectors() -> Mat

FloatList

MethodSignatures
addadd(float) -> FloatList
atat(int) -> float
clearclear() -> FloatList
containscontains(float) -> bool
index_ofindex_of(float) -> int
lenlen() -> int
setset(int, float) -> FloatList

FloatMap

MethodSignatures
clearclear() -> FloatMap
getget(string) -> float
get_orget_or(string, float) -> float
hashas(string) -> bool
key_atkey_at(int) -> string
keyskeys() -> StrList
lenlen() -> int
removeremove(string) -> bool
setset(string, float) -> FloatMap
valuesvalues() -> FloatList

FloatPQ

MethodSignatures
clearclear() -> FloatPQ
emptyempty() -> bool
lenlen() -> int
peekpeek() -> float
poppop() -> float
pushpush(float, float) -> FloatPQ

FloatQueue

MethodSignatures
atat(int) -> float
clearclear() -> FloatQueue
emptyempty() -> bool
lenlen() -> int
peekpeek() -> float
poppop() -> float
pushpush(float) -> FloatQueue

FloatStack

MethodSignatures
atat(int) -> float
clearclear() -> FloatStack
emptyempty() -> bool
lenlen() -> int
peekpeek() -> float
poppop() -> float
pushpush(float) -> FloatStack

Forecast

MethodSignatures
lenlen() -> int
lowerlower(int, float) -> float
meanmean() -> Vec
mean_atmean_at(int) -> float
sese() -> Vec
se_atse_at(int) -> float
upperupper(int, float) -> float

Frame

MethodSignatures
colcol(string) -> Vec
dropdrop(string) -> Frame
drop_nandrop_nan() -> Frame
hashas(string) -> bool
headhead(int) -> Frame
is_textis_text(string) -> bool
namesnames() -> StrList
ncolncol() -> int
nrownrow() -> int
selectselect(string) -> Frame
setset(string, StrList) -> Frame; set(string, Vec) -> Frame
texttext(string) -> StrList
wherewhere(Vec) -> Frame
write_csvwrite_csv(string) -> void

Glm

MethodSignatures
aicaic() -> float
aliasedaliased(int) -> bool; aliased(string) -> bool
anovaanova(string) -> Anova
coef_tablecoef_table() -> string
conf_highconf_high(int, float) -> float; conf_high(string, float) -> float
conf_lowconf_low(int, float) -> float; conf_low(string, float) -> float
convergedconverged() -> bool
deviancedeviance() -> float
df_nulldf_null() -> int
df_residualdf_residual() -> int
dispersiondispersion() -> float
estimateestimate(int) -> float; estimate(string) -> float
estimatesestimates() -> Vec
familyfamily() -> string
fittedfitted() -> Vec
has_coefhas_coef(string) -> bool
iteriter() -> int
linear_predictorslinear_predictors() -> Vec
linklink() -> string
nn() -> int
n_coefn_coef() -> int
namename(int) -> string
namesnames() -> StrList
null_deviancenull_deviance() -> float
p_valuep_value(int) -> float; p_value(string) -> float
predictpredict(Frame, string) -> Vec
residualsresiduals(string) -> Vec
sese(int) -> float; se(string) -> float
statisticstatistic(int) -> float; statistic(string) -> float

Hclust

MethodSignatures
cutcut(int) -> Vec
heightheight(int) -> float
heightsheights() -> Vec
merge_amerge_a(int) -> int
merge_bmerge_b(int) -> int
nn() -> int
orderorder() -> Vec

Hist

MethodSignatures
breaksbreaks() -> Vec
countscounts() -> Vec
densitydensity() -> Vec
midsmids() -> Vec

Htest

MethodSignatures
alternativealternative() -> string
conf_highconf_high() -> float
conf_levelconf_level() -> float
conf_lowconf_low() -> float
dfdf() -> float
estimateestimate() -> float; estimate(int) -> float
estimate_nameestimate_name(int) -> string
expectedexpected() -> Vec
has_cihas_ci() -> bool
methodmethod() -> string
n_estimatesn_estimates() -> int
n_paramsn_params() -> int
null_valuenull_value() -> float
p_valuep_value() -> float
paramparam(int) -> float; param(string) -> float
param_nameparam_name(int) -> string
statisticstatistic() -> float
statistic_namestatistic_name() -> string
summarysummary() -> string

IntList

MethodSignatures
addadd(int) -> IntList
atat(int) -> int
clearclear() -> IntList
containscontains(int) -> bool
index_ofindex_of(int) -> int
lenlen() -> int
setset(int, int) -> IntList

IntMap

MethodSignatures
clearclear() -> IntMap
getget(string) -> int
get_orget_or(string, int) -> int
hashas(string) -> bool
key_atkey_at(int) -> string
keyskeys() -> StrList
lenlen() -> int
removeremove(string) -> bool
setset(string, int) -> IntMap
valuesvalues() -> IntList

IntPQ

MethodSignatures
clearclear() -> IntPQ
emptyempty() -> bool
lenlen() -> int
peekpeek() -> int
poppop() -> int
pushpush(int, float) -> IntPQ

IntQueue

MethodSignatures
atat(int) -> int
clearclear() -> IntQueue
emptyempty() -> bool
lenlen() -> int
peekpeek() -> int
poppop() -> int
pushpush(int) -> IntQueue

IntStack

MethodSignatures
atat(int) -> int
clearclear() -> IntStack
emptyempty() -> bool
lenlen() -> int
peekpeek() -> int
poppop() -> int
pushpush(int) -> IntStack

Integral

MethodSignatures
abs_errorabs_error() -> float
abs_tolabs_tol(float) -> Integral
evaluationsevaluations() -> int
ierier() -> int
messagemessage() -> string
nextnext() -> bool
okok() -> bool
rel_tolrel_tol(float) -> Integral
subdivisionssubdivisions(int) -> Integral
subdivisions_usedsubdivisions_used() -> int
telltell(float) -> void
valuevalue() -> float
xx() -> float

Json

MethodSignatures
as_boolas_bool() -> bool
as_floatas_float() -> float
as_intas_int() -> int
as_stringas_string() -> string
atat(int) -> Json
getget(string) -> Json
hashas(string) -> bool
keyskeys() -> StrList
kindkind() -> string
lenlen() -> int
to_jsonto_json() -> string

Kmeans

MethodSignatures
betweenssbetweenss() -> float
centercenter(int, int) -> float; center(int, string) -> float
clustercluster(int) -> int
clustersclusters() -> Vec
ifaultifault() -> int
iteriter() -> int
kk() -> int
nn() -> int
sizesize(int) -> int
tot_withinsstot_withinss() -> float
totsstotss() -> float
withinsswithinss(int) -> float

Lm

MethodSignatures
adj_r_squaredadj_r_squared() -> float
aicaic() -> float
aliasedaliased(int) -> bool; aliased(string) -> bool
anovaanova() -> Anova
bicbic() -> float
coef_tablecoef_table() -> string
conf_highconf_high(int, float) -> float; conf_high(string, float) -> float
conf_lowconf_low(int, float) -> float; conf_low(string, float) -> float
df_residualdf_residual() -> int
estimateestimate(int) -> float; estimate(string) -> float
estimatesestimates() -> Vec
f_df1f_df1() -> float
f_df2f_df2() -> float
f_p_valuef_p_value() -> float
f_statisticf_statistic() -> float
fittedfitted() -> Vec
has_coefhas_coef(string) -> bool
loglikloglik() -> float
nn() -> int
n_coefn_coef() -> int
namename(int) -> string
namesnames() -> StrList
p_valuep_value(int) -> float; p_value(string) -> float
predictpredict(Frame) -> Vec
predict_sepredict_se(Frame) -> Vec
r_squaredr_squared() -> float
rankrank() -> int
residualsresiduals() -> Vec
rssrss() -> float
sese(int) -> float; se(string) -> float
sigmasigma() -> float
statisticstatistic(int) -> float; statistic(string) -> float

Loess

MethodSignatures
atat(float) -> float
enpenp() -> float
evaleval(Vec) -> Vec
fittedfitted() -> Vec
one_deltaone_delta() -> float
residualsresiduals() -> Vec
robustness_weightsrobustness_weights() -> Vec
ss() -> float
trace_hattrace_hat() -> float
two_deltatwo_delta() -> float

Mat

MethodSignatures
addadd(Mat) -> Mat
atat(int, int) -> float
cholchol() -> Mat
colcol(int) -> Vec
corcor() -> Mat
covcov() -> Mat
detdet() -> float
diagdiag() -> Vec
distdist(string) -> Mat
eigeneigen() -> Eigen
formatformat(string) -> string
inverseinverse() -> Mat
mulmul(Mat) -> Mat
mul_vecmul_vec(Vec) -> Vec
ncolncol() -> int
nrownrow() -> int
rowrow(int) -> Vec
scalescale(float) -> Mat
setset(int, int, float) -> Mat
solvesolve(Vec) -> Vec
strstr() -> string
subsub(Mat) -> Mat
svdsvd() -> Svd
tt() -> Mat
to_frameto_frame() -> Frame
valuesvalues() -> Vec

Mds

MethodSignatures
eigeig() -> Vec
gofgof() -> Vec
pointspoints() -> Mat
warningwarning() -> string

Minimizer

MethodSignatures
convergenceconvergence() -> int
evaluationsevaluations() -> int
fn_countfn_count() -> int
gr_countgr_count() -> int
hessianhessian(bool) -> Minimizer; hessian(int, int) -> float
lowerlower(Vec) -> Minimizer
maxitmaxit(int) -> Minimizer
messagemessage() -> string
ndepsndeps(float) -> Minimizer
nextnext() -> bool
parpar(int) -> float
parspars() -> Vec
pointpoint() -> Vec
reltolreltol(float) -> Minimizer
seedseed(int) -> Minimizer
telltell(float) -> void
upperupper(Vec) -> Minimizer
valuevalue() -> float
xx(int) -> float

Nls

MethodSignatures
algorithmalgorithm(string) -> Nls
aliasedaliased(int) -> bool; aliased(string) -> bool
coef_tablecoef_table() -> string
conf_highconf_high(int, float) -> float; conf_high(string, float) -> float
conf_lowconf_low(int, float) -> float; conf_low(string, float) -> float
conv_criterionconv_criterion() -> float
convergedconverged() -> bool
df_residualdf_residual() -> int
estimateestimate(int) -> float; estimate(string) -> float
estimatesestimates() -> Vec
evaluationsevaluations() -> int
fittedfitted() -> Vec
has_coefhas_coef(string) -> bool
iterationsiterations() -> int
lowerlower(string, float) -> Nls
maxitermaxiter(int) -> Nls
messagemessage() -> string
nn() -> int
n_coefn_coef() -> int
namename(int) -> string
namesnames() -> StrList
nextnext() -> bool
p_valuep_value(int) -> float; p_value(string) -> float
parpar(int) -> float; par(string) -> float
paramparam(string, float) -> Nls
residualsresiduals() -> Vec
rssrss() -> float
sese(int) -> float; se(string) -> float
sigmasigma() -> float
statisticstatistic(int) -> float; statistic(string) -> float
telltell(int, float) -> void
toltol(float) -> Nls
upperupper(string, float) -> Nls

Optimizer1

MethodSignatures
argminargmin() -> float
evaluationsevaluations() -> int
nextnext() -> bool
objectiveobjective() -> float
telltell(float) -> void
toltol(float) -> Optimizer1
xx() -> float

Out

MethodSignatures
checkcheck(bool, string) -> bool
check_closecheck_close(float, float, float, string) -> bool
failfail(string) -> void
failuresfailures() -> int
printprint(string) -> void
setset(string, StrList) -> void; set(string, Vec) -> void; set(string, bool) -> void; set(string, float) -> void; set(string, int) -> void; set(string, string) -> void

Pca

MethodSignatures
centercenter() -> Vec
cumulativecumulative() -> Vec
loadingloading(string, int) -> float
proportionproportion() -> Vec
rotationrotation() -> Mat
scalescale() -> Vec
scoresscores() -> Mat
sdevsdev() -> Vec
summarysummary() -> string

Rng

MethodSignatures
belowbelow(int) -> int
drawdraw(Dist) -> float; draw(Dist, int) -> Vec
normnorm() -> float
permutationpermutation(int) -> Vec
samplesample(Vec, int, bool) -> Vec; sample(Vec, int, bool, Vec) -> Vec
unifunif() -> float

RootFinder

MethodSignatures
convergedconverged() -> bool
estim_precestim_prec() -> float
evaluationsevaluations() -> int
extendextend(string) -> RootFinder
f_rootf_root() -> float
init_itinit_it() -> int
iteriter() -> int
maxitermaxiter(int) -> RootFinder
nextnext() -> bool
rootroot() -> float
telltell(float) -> void
toltol(float) -> RootFinder
xx() -> float

SmoothSpline

MethodSignatures
atat(float) -> float
cv_critcv_crit() -> float
derivderiv(float, int) -> float
dfdf() -> float
evaleval(Vec) -> Vec
lambdalambda() -> float
leveragesleverages() -> Vec
pen_critpen_crit() -> float
xx() -> Vec
yy() -> Vec

Spline

MethodSignatures
atat(float) -> float
derivderiv(float, int) -> float
evaleval(Vec) -> Vec
methodmethod() -> string

Stl

MethodSignatures
remainderremainder() -> Vec
seasonalseasonal() -> Vec
trendtrend() -> Vec
weightsweights() -> Vec

StrList

MethodSignatures
addadd(string) -> StrList
clearclear() -> StrList
index_ofindex_of(string) -> int
setset(int, string) -> StrList

StrMap

MethodSignatures
clearclear() -> StrMap
getget(string) -> string
get_orget_or(string, string) -> string
hashas(string) -> bool
key_atkey_at(int) -> string
keyskeys() -> StrList
lenlen() -> int
removeremove(string) -> bool
setset(string, string) -> StrMap
valuesvalues() -> StrList

StrPQ

MethodSignatures
clearclear() -> StrPQ
emptyempty() -> bool
lenlen() -> int
peekpeek() -> string
poppop() -> string
pushpush(string, float) -> StrPQ

StrQueue

MethodSignatures
atat(int) -> string
clearclear() -> StrQueue
emptyempty() -> bool
lenlen() -> int
peekpeek() -> string
poppop() -> string
pushpush(string) -> StrQueue

StrStack

MethodSignatures
atat(int) -> string
clearclear() -> StrStack
emptyempty() -> bool
lenlen() -> int
peekpeek() -> string
poppop() -> string
pushpush(string) -> StrStack

Svd

MethodSignatures
dd() -> Vec
uu() -> Mat
vv() -> Mat

Test

MethodSignatures
altalt(string) -> Test
blocksblocks(StrList) -> Test; blocks(Vec) -> Test
confconf(float) -> Test
conf_intconf_int(bool) -> Test
correctcorrect(bool) -> Test
countscounts(Vec) -> Test
distdist(Dist) -> Test
exactexact(bool) -> Test
groupsgroups(StrList) -> Test; groups(Vec) -> Test
methodmethod(string) -> Test
mumu(float) -> Test
odds_ratioodds_ratio(float) -> Test
pp(Vec) -> Test; p(float) -> Test
pairedpaired(bool) -> Test
probsprobs(Vec) -> Test
ratioratio(float) -> Test
runrun() -> Htest
successessuccesses(Vec) -> Test; successes(float) -> Test
tabletable(Vec, int, bool) -> Test
trialstrials(Vec) -> Test; trials(float) -> Test
var_equalvar_equal(bool) -> Test
xx(Vec) -> Test
yy(Vec) -> Test

Vec

Operators: * (mul), + (add), - (sub), neg (neg), r* (mul), r+ (add), r- (rsub).

MethodSignatures
absabs() -> Vec
acfacf() -> Vec; acf(int) -> Vec
addadd(Vec) -> Vec; add(float) -> Vec
appendappend(Vec) -> Vec
atat(int) -> float
copycopy() -> Vec
corcor(Vec) -> float; cor(Vec, string) -> float
count_nancount_nan() -> int
covcov(Vec) -> float
cumsumcumsum() -> Vec
diffdiff() -> Vec; diff(int) -> Vec
divdiv(Vec) -> Vec; div(float) -> Vec
dotdot(Vec) -> float
drop_nandrop_nan() -> Vec
expexp() -> Vec
formatformat(string, string) -> string
headhead(int) -> Vec
lenlen() -> int
loglog() -> Vec
madmad() -> float
maxmax() -> float
meanmean() -> float
medianmedian() -> float
minmin() -> float
mulmul(Vec) -> Vec; mul(float) -> Vec
negneg() -> Vec
orderorder() -> Vec
pacfpacf() -> Vec; pacf(int) -> Vec
powpow(float) -> Vec
prodprod() -> float
pushpush(float) -> Vec
quantilequantile(float) -> float; quantile(float, int) -> float
quantilesquantiles(Vec, int) -> Vec
rankrank() -> Vec
rdivrdiv(float) -> Vec
revrev() -> Vec
roundround(int) -> Vec
rsubrsub(float) -> Vec
sdsd() -> float
setset(int, float) -> Vec
sliceslice(int, int) -> Vec
sortsort() -> Vec
sqrtsqrt() -> Vec
standardizestandardize() -> Vec
strstr() -> string
subsub(Vec) -> Vec; sub(float) -> Vec
sumsum() -> float
tailtail(int) -> Vec
taketake(Vec) -> Vec
varvar() -> float
wherewhere(Vec) -> Vec
which_maxwhich_max() -> int
which_minwhich_min() -> int

Standard library (lmcode_std_v3)

The lmcode-cpp SDK pinned in native/sdk.lock vendors the lmcode_std_v3 schema with 206 canonical signatures: 83 function signatures and 123 method signatures across 16 types. They are available in every lmr block without appearing in the host schema. The current lmcode_std_v3 catalog upstream has 226 signatures; lmr picks up the additional 20 when it syncs its SDK pin and releases.

Standard functions

FunctionSignatures
file_appendfile_append(string, string) -> void
file_existsfile_exists(string) -> bool
file_linesfile_lines(string) -> StrList
file_readfile_read(string) -> string
file_writefile_write(string, string) -> void
float_listfloat_list() -> FloatList
float_mapfloat_map() -> FloatMap
float_pqfloat_pq() -> FloatPQ
float_queuefloat_queue() -> FloatQueue
float_stackfloat_stack() -> FloatStack
int_listint_list() -> IntList
int_mapint_map() -> IntMap
int_pqint_pq() -> IntPQ
int_queueint_queue() -> IntQueue
int_stackint_stack() -> IntStack
json_parsejson_parse(string) -> Json
lmcode_return_nulllmcode_return_null() -> void
lmcode_return_putlmcode_return_put(string, bool) -> void; lmcode_return_put(string, float) -> void; lmcode_return_put(string, FloatList) -> void; lmcode_return_put(string, FloatMap) -> void; lmcode_return_put(string, int) -> void; lmcode_return_put(string, IntList) -> void; lmcode_return_put(string, IntMap) -> void; lmcode_return_put(string, Json) -> void; lmcode_return_put(string, StrList) -> void; lmcode_return_put(string, StrMap) -> void; lmcode_return_put(string, string) -> void
lmcode_return_put_nulllmcode_return_put_null(string) -> void
lmcode_return_setlmcode_return_set(bool) -> void; lmcode_return_set(float) -> void; lmcode_return_set(FloatList) -> void; lmcode_return_set(FloatMap) -> void; lmcode_return_set(int) -> void; lmcode_return_set(IntList) -> void; lmcode_return_set(IntMap) -> void; lmcode_return_set(Json) -> void; lmcode_return_set(StrList) -> void; lmcode_return_set(StrMap) -> void; lmcode_return_set(string) -> void
math_absmath_abs(int) -> int; math_abs(float) -> float
math_ceilmath_ceil(int) -> int; math_ceil(float) -> float
math_floormath_floor(int) -> int; math_floor(float) -> float
math_maxmath_max(int, int) -> int; math_max(float, float) -> float
math_minmath_min(int, int) -> int; math_min(float, float) -> float
math_powmath_pow(int, int) -> int; math_pow(float, float) -> float
math_roundmath_round(int) -> int; math_round(float) -> float
math_sqrtmath_sqrt(int) -> int; math_sqrt(float) -> float
str_base64_decodestr_base64_decode(string) -> string
str_base64_encodestr_base64_encode(string) -> string
str_containsstr_contains(string, string) -> bool
str_ends_withstr_ends_with(string, string) -> bool
str_findstr_find(string, string) -> int
str_hex_decodestr_hex_decode(string) -> string
str_hex_encodestr_hex_encode(string) -> string
str_is_floatstr_is_float(string) -> bool
str_is_intstr_is_int(string) -> bool
str_lenstr_len(string) -> int
str_liststr_list() -> StrList
str_lowerstr_lower(string) -> string
str_mapstr_map() -> StrMap
str_matchstr_match(string, string) -> bool
str_pqstr_pq() -> StrPQ
str_queuestr_queue() -> StrQueue
str_repeatstr_repeat(string, int) -> string
str_replacestr_replace(string, string, string) -> string
str_splitstr_split(string, string) -> StrList
str_stackstr_stack() -> StrStack
str_starts_withstr_starts_with(string, string) -> bool
str_substrstr_substr(string, int, int) -> string
str_to_floatstr_to_float(string) -> float
str_to_intstr_to_int(string) -> int
str_trimstr_trim(string) -> string
str_upperstr_upper(string) -> string
template_rendertemplate_render(string, Json) -> string

Standard types

TypeMethods
FloatListadd(float) -> FloatList; at(int) -> float; clear() -> FloatList; contains(float) -> bool; index_of(float) -> int; len() -> int; set(int, float) -> FloatList
FloatMapclear() -> FloatMap; get(string) -> float; get_or(string, float) -> float; has(string) -> bool; key_at(int) -> string; keys() -> StrList; len() -> int; remove(string) -> bool; set(string, float) -> FloatMap; values() -> FloatList
FloatPQclear() -> FloatPQ; empty() -> bool; len() -> int; peek() -> float; pop() -> float; push(float, float) -> FloatPQ
FloatQueueat(int) -> float; clear() -> FloatQueue; empty() -> bool; len() -> int; peek() -> float; pop() -> float; push(float) -> FloatQueue
FloatStackat(int) -> float; clear() -> FloatStack; empty() -> bool; len() -> int; peek() -> float; pop() -> float; push(float) -> FloatStack
IntListadd(int) -> IntList; at(int) -> int; clear() -> IntList; contains(int) -> bool; index_of(int) -> int; len() -> int; set(int, int) -> IntList
IntMapclear() -> IntMap; get(string) -> int; get_or(string, int) -> int; has(string) -> bool; key_at(int) -> string; keys() -> StrList; len() -> int; remove(string) -> bool; set(string, int) -> IntMap; values() -> IntList
IntPQclear() -> IntPQ; empty() -> bool; len() -> int; peek() -> int; pop() -> int; push(int, float) -> IntPQ
IntQueueat(int) -> int; clear() -> IntQueue; empty() -> bool; len() -> int; peek() -> int; pop() -> int; push(int) -> IntQueue
IntStackat(int) -> int; clear() -> IntStack; empty() -> bool; len() -> int; peek() -> int; pop() -> int; push(int) -> IntStack
Jsonas_bool() -> bool; as_float() -> float; as_int() -> int; as_string() -> string; at(int) -> Json; get(string) -> Json; has(string) -> bool; keys() -> StrList; kind() -> string; len() -> int; to_json() -> string
StrListadd(string) -> StrList; at(int) -> string; clear() -> StrList; contains(string) -> bool; index_of(string) -> int; join(string) -> string; len() -> int; set(int, string) -> StrList
StrMapclear() -> StrMap; get(string) -> string; get_or(string, string) -> string; has(string) -> bool; key_at(int) -> string; keys() -> StrList; len() -> int; remove(string) -> bool; set(string, string) -> StrMap; values() -> StrList
StrPQclear() -> StrPQ; empty() -> bool; len() -> int; peek() -> string; pop() -> string; push(string, float) -> StrPQ
StrQueueat(int) -> string; clear() -> StrQueue; empty() -> bool; len() -> int; peek() -> string; pop() -> string; push(string) -> StrQueue
StrStackat(int) -> string; clear() -> StrStack; empty() -> bool; len() -> int; peek() -> string; pop() -> string; push(string) -> StrStack

Standard REST and CLI interfaces

These do not apply to lmr today. The std schema vendored in this repository contains no rest_ functions and none of the RestGet, RestPost, RestPut, RestDelete, RestPatch, RestHead, RestOptions, RestHandler, CliCommand or CliOption interfaces. They belong to the 226-signature lmcode_std_v3 catalog (rest_config, rest_route, rest_serve, rest_stop, rest_cli and the RestExchange methods) and become available to lmr blocks only after lmr updates its SDK pin and ships a release with it. Confirm with lmr --lmcode-signatures on the binary you run.

See also