Package plan_runner.conversion

Examples of plan_runner.conversion.IntegerConversion


  public ComparisonPredicate(int operation, ValueExpression<T> ve1, ValueExpression<T> ve2,
      int difference, int inequalityIndexType) {
    _operation = operation;
    _ve1 = ve1;
    _ve2 = new Addition(ve2, new ValueSpecification(new IntegerConversion(), difference));
    _diff = Integer.valueOf(-2 * difference);
    indexType = inequalityIndexType;
  }
View Full Code Here


    return sb.toString();
  }
 
  public static void main(String[] args){
    ComparisonPredicate<Integer> comparison = new ComparisonPredicate<Integer>
      (ComparisonPredicate.SYM_BAND_WITH_BOUNDS_OP, 10, new IntegerConversion());
   
    int x1 = 0; int y1 = 50; int x2 = 10; int y2 = 55;
    System.out.println("Should be false " + comparison.isCandidateRegion(x1, y1, x2, y2));
   
    x1 = 44; y1 = 10; x2 = 49; y2 = 23;
View Full Code Here

  ValueExpression changeToDouble(ValueExpression other) {

    if (other instanceof ColumnReference)
      return new ColumnReference<Double>(numConv, ((ColumnReference) other).getColumnIndex());
    else if (other instanceof ValueSpecification) {
      IntegerConversion change;
      if (other.getType() instanceof IntegerConversion) {
        change = (IntegerConversion) other.getType();
        final double temp = change.toDouble(other.eval(null));
        final ValueSpecification tempVS = new ValueSpecification<Double>(numConv, temp);
        return tempVS;
      } else
        return other;
    } else if (other instanceof Addition) {
View Full Code Here

TOP

Related Classes of plan_runner.conversion.IntegerConversion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.