<p>evaluate.</p>

@param mortgageAllowance a float.
@param cashDown a float.
@return a float.
439333
public static float evaluate(float mortgageAllowance, float cashDown)
    {
        float mortgageBalance = mortgageAllowance - cashDown;
        if(isInsufficient(mortgageAllowance, cashDown))
        {
            mortgageBalance = mortgageBalance * ( 1 + MIN_CASH_DOWN_FEE_RATIO );
        }
        
        return mortgageBalance;
    }
585721
public double[] getMoneynessAsOffsets() {
		DoubleStream moneyness = getGridNodesPerMoneyness().keySet().stream().mapToDouble(Integer::doubleValue);
		if(quotingConvention == QuotingConvention.PAYERVOLATILITYLOGNORMAL) {
			moneyness = moneyness.map(new DoubleUnaryOperator() {
				@Override
				public double applyAsDouble(double x) {
					return x * 0.01;
				}
			});
		} else if(quotingConvention == QuotingConvention.RECEIVERPRICE) {
			moneyness = moneyness.map(new DoubleUnaryOperator() {
				@Override
				public double applyAsDouble(double x) {
					return - x * 0.0001;
				}
			});
		} else {
			moneyness = moneyness.map(new DoubleUnaryOperator() {
				@Override
				public double applyAsDouble(double x) {
					return x * 0.0001;
				}
			});
		}
		return moneyness.toArray();
	}
560613
public Money forDownpayment(Money downPayment)
    {
        return downPayment.greaterThan(salePrice.times( Ratio.percent( 25 ) )) ?
            Money.zero() :
            financedAmount( downPayment ).times( Ratio.of( 25, 1000 ) );
    }
731129
public static void downto(Float self, Number to, @ClosureParams(FirstParam.class) Closure closure) {
        float to1 = to.floatValue();
        if (self >= to1) {
            for (float i = self; i >= to1; i--) {
                closure.call(i);
            }
        } else
            throw new GroovyRuntimeException("The argument (" + to +
                    ") to downto() cannot be greater than the value (" + self + ") it's called on.");    }
622454
public <T> T withTransaction(@NotNull Propagation propagation,
                                 @NotNull Isolation isolation,
                                 @NotNull TransactionCallback<T> callback) {

        TransactionSettings settings = new TransactionSettings();
        settings.setPropagation(propagation);
        settings.setIsolation(isolation);

        return withTransaction(settings, callback);
    }
681744
@Override
    public int compareTo(MonetaryAmount o) {
        Objects.requireNonNull(o);
        int compare;
        if (currency.equals(o.getCurrency())) {
            compare = asNumberStripped().compareTo(RoundedMoney.from(o).asNumberStripped());
        } else {
            compare = currency.getCurrencyCode().compareTo(o.getCurrency().getCurrencyCode());
        }
        return compare;
    }
791634
@Override
    public Money divide(Number divisor) {
        if (NumberVerifier.isInfinityAndNotNaN(divisor)) {
            return Money.of(0, getCurrency());
        }
        BigDecimal divisorBD = MoneyUtils.getBigDecimal(divisor);
        if (divisorBD.equals(BigDecimal.ONE)) {
            return this;
        }
        MathContext mc = MoneyUtils.getMathContext(monetaryContext, RoundingMode.HALF_EVEN);
        int maxScale = monetaryContext.getMaxScale();
        if(maxScale>0){
            return new Money(this.number.divide(divisorBD, maxScale, mc.getRoundingMode()), getCurrency(), monetaryContext);
        }
        return new Money(this.number.divide(divisorBD, mc), getCurrency(), monetaryContext);
    }
723482
public double totalCount() {
    if (depth() == 1) {
      return total; // I think this one is always OK.  Not very principled here, though.
    } else {
      double result = 0.0;
      for (K o: topLevelKeySet()) {
        result += conditionalizeOnce(o).totalCount();
      }
      return result;
    }
  }
301699
@Override
    public MonetaryAmount apply(MonetaryAmount amount) {
        return amount.getFactory().setCurrency(amount.getCurrency()).setNumber(
                amount.getNumber().numberValue(BigDecimal.class)
                        .setScale(this.context.getInt(SCALE_KEY), this.context.get(RoundingMode.class))).create();
    }
251845
public SimpleListHolder<T> getFlatDown() {
        if (flatDown == null) {
            flatDown = newSimpleListHolder(down_to_leave, getSortProperty());
        }
        return flatDown;
    }
1338038
public Expression asCheap() {
    if (isCheap()) {
      return this;
    }
    return new Expression(resultType, features.plus(Feature.CHEAP)) {
      @Override
      protected void doGen(CodeBuilder adapter) {
        Expression.this.gen(adapter);
      }
    };
  }
1288280
@Override
    public RoundedMoney remainder(Number divisor) {
        return new RoundedMoney(number.remainder(MoneyUtils.getBigDecimal(divisor), Optional.ofNullable(
                monetaryContext.get(MathContext.class)).orElse(MathContext.DECIMAL64)),
                currency, rounding);
    }
1111096
@Override public Double evaluate(List<S> solutionList) {
    return spread(new ArrayFront(solutionList), referenceParetoFront);
  }
605653
public javax.el.ValueExpression getBeta() {
		return (javax.el.ValueExpression) getStateHelper().eval(PropertyKeys.beta);
	}
945648
public double evaluate(List<VarConfig> goldConfigs, List<VarConfig> predictedConfigs) {
        int numCorrect = 0;
        int numTotal = 0;
        
        assert (goldConfigs.size() == predictedConfigs.size());
        for (int i=0; i<goldConfigs.size(); i++) {
            VarConfig gold = goldConfigs.get(i);
            VarConfig pred = predictedConfigs.get(i);
            //assert (gold.getVars().equals(pred.getVars()));
            for (Var v : gold.getVars()) {
                if (v.getType() == VarType.PREDICTED) {
                    int goldState = gold.getState(v);
                    int predState = pred.getState(v);
                    if (goldState == predState) {
                        numCorrect++;
                    }
                    numTotal++;
                }
            }
        }
        
        return (double) numCorrect / numTotal;        
    }
96596
@Override
    public int compareTo(MonetaryAmount o) {
        Objects.requireNonNull(o);
        int compare = getCurrency().getCurrencyCode().compareTo(o.getCurrency().getCurrencyCode());
        if (compare == 0) {
            compare = this.number.compareTo(Money.from(o).number);
        }
        return compare;
    }
335645
public BigDecimal getTotal() {

    if (total == null) {
      return available.add(frozen).subtract(borrowed).add(loaned).add(withdrawing).add(depositing);
    } else {
      return total;
    }
  }