Vector<?> + Vector<?>
It can't add Vector<?> and a Double which looks like the calculation of "func(P0001)+5" would be.
And it cant work with Double arrays.
The workaround would be to subclass the Add function with a method like
public class MyAdd extends Add {
@Override
public Object add(Object l, Object r) throws Exception {
if(l instanceof Vector<?> && r instnceof Double) {
.....
} else if (l instanceof Double[] && r instanceof Double[]) {
.....
} else {
return super.add(l,r);
}
}
}
and then change the PFMC for the add operator
jep.getOperatorTable().getAdd().setPFMC(new myAdd());
work with vectors of the form Vector<?>. It does not have the code to work with a double array