Commit fa6da3f0 authored by Hynek Baran's avatar Hynek Baran

LVar returns NULL on expressions without Vars

parent 4b1ca29d
......@@ -191,6 +191,7 @@
#
# v 5.92
# * testing new nonlinear resolve implementation in file (cat(jets_new_resolve_enable, "/Jets.newresolve.s"))
# * LVar returns NULL on expressions without Vars
###########################################################################################
###########################################################################################
......@@ -199,7 +200,7 @@
###########################################################################################
interface(screenwidth=120):
printf("Jets 5.92 test1 as of Oct 19, 2018 (%s)\n",
printf("Jets 5.92 test2 as of Mar 25, 2019 (%s)\n",
StringTools[FormatTime]("%Y-%m-%d %T", timestamp=FileTools[Status](__FILE__)[5]));
#
......@@ -2572,9 +2573,9 @@ end:
Report(2,[`derived cc's [LVar=size] to be resolved:`, map(a->[LVar(a)=size(a)], [op(ders)])]);
aux1 := ders union as;
aux1 := map(proc(a) return Simpl(a, [LVar(a)]); end, aux1); # prepare for linearity test
lins, nonlins := selectremove(proc(a) local V1 := LVar(a); if V1 = NULL then return true else return type(a, linear(V1)) fi; end, aux1); # preselect linear eqs
aux1 := map(proc(a) local V1 := VarL(a)[1]; return Simpl(a, [V1]); end, aux1); # prepare for linearity test
lins, nonlins := selectremove(proc(a) local V1 := VarL(a)[1]; return type(a, linear(V1)) end, aux1); # preselect linear eqs
### TODO: použij všechny solvable a vybírej z unsolvable+nonlins
#solvlins, unsolvlins := selectremove(proc(a) local V := VarL(a), LC := collect(coeff(a, V[1]), V, simpl, distributed);
......@@ -3274,8 +3275,8 @@ LVar := proc()
description "Leading Var w.r. to current Varordering";
local vs;
vs := Varl(args);
if nops(vs) = 0 then {}
else ListTools[FindMaximalElement](vs, `Vars/<<`) fi;
if nops(vs) = 0 then return NULL
else return ListTools[FindMaximalElement](vs, `Vars/<<`) fi;
end:
`Vars/TD` := proc(f,x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment