@Test public void evaluate_MockData_ShouldBeExpectedScalar1() throws CelloException { Map<Variable, Double> args = new HashMap<>(); args.put(lut.getVariables().findCObjectByName("x"), 1.5); args.put(lut.getVariables().findCObjectByName("bin"), 1.5); assertEquals(lut.evaluate(args), 5.0, TOLERANCE); }
@Override public Number evaluate(final EvaluationContext ec) throws CelloException { final String fmt = "Cannot evaluate %s in scalar context."; throw new CelloException( String.format(fmt, BivariateLookupTableFunction.class.getSimpleName())); }
BivariateLookupTableFunction extends LookupTableFunction { @Override public Number evaluate(final EvaluationContext ec) throws CelloException { final String fmt = "Cannot evaluate %s in scalar context."; throw new CelloException( String.format(fmt, BivariateLookupTableFunction.class.getSimpleName())); } }
BivariateLookupTableFunction extends LookupTableFunction { @Override public Number evaluate(final EvaluationContext ec) throws CelloException { final String fmt = "Cannot evaluate %s in scalar context."; throw new CelloException( String.format(fmt, BivariateLookupTableFunction.class.getSimpleName())); } BivariateLookupTableFunction(final JSONObject jsonObj); }
BivariateLookupTableFunction extends LookupTableFunction { @Override public Number evaluate(final EvaluationContext ec) throws CelloException { final String fmt = "Cannot evaluate %s in scalar context."; throw new CelloException( String.format(fmt, BivariateLookupTableFunction.class.getSimpleName())); } BivariateLookupTableFunction(final JSONObject jsonObj); @Override boolean isValid(); @Override Number evaluate(final EvaluationContext ec); List<Double> evaluate(final Pair<Variable, Double> value); Double evaluate(final Map<Variable, Double> value); List<Double> getYDataAtIdx(final Integer idx); }
BivariateLookupTableFunction extends LookupTableFunction { @Override public Number evaluate(final EvaluationContext ec) throws CelloException { final String fmt = "Cannot evaluate %s in scalar context."; throw new CelloException( String.format(fmt, BivariateLookupTableFunction.class.getSimpleName())); } BivariateLookupTableFunction(final JSONObject jsonObj); @Override boolean isValid(); @Override Number evaluate(final EvaluationContext ec); List<Double> evaluate(final Pair<Variable, Double> value); Double evaluate(final Map<Variable, Double> value); List<Double> getYDataAtIdx(final Integer idx);  }