Package ai.domain

Examples of ai.domain.DomainException


    if (!isInterestingType(name))
      return null;
    Pair<Bool, DI> initializer = computeInitialValue(initializerOrNull, input);
    Variable variable = EvaluationUtils.tryGetVariable(name);
    if (variable == null)
      throw new DomainException("Error: '%s'", variable);
    if (asAssignment && initializerOrNull != null)
      return expressionSemantics.processBooleanAssignment(initializer.right, name, initializer.left);
    else
      return processNewVariable(initializer.right, variable, initializer.left, asAssignment);
  }
View Full Code Here


  public DI evaluateNewArgument(SimpleName argument, DI input) {
    if (!isInterestingType(argument))
      return null;
    Variable variable = EvaluationUtils.tryGetVariable(argument);
    if (variable == null)
      throw new DomainException("Error: '%s'", variable);
    return processNewVariable(input, variable, null, true);
  }
View Full Code Here

    this.value = new IntervalValue(left, right);
  }

  public double getLeft() {
    if (value == null)
      throw new DomainException("Cannot get beginning of BOT interval");
    return value.left;
  }
View Full Code Here

    return value.left;
  }

  public double getRight() {
    if (value == null)
      throw new DomainException("Cannot get ending of BOT interval");
    return value.right;
  }
View Full Code Here

      return (x == Double.NEGATIVE_INFINITY) ? x : Math.ceil(x);
  }
 
  private Interval divideHelper(Interval a, Interval b) {
    if (!(0 <= b.getLeft()))
      throw new DomainException("Hmm,  invalid usage??");
    // 0 / 0 = NaN
    double possible1 = fixNaN(a.getLeft()/b.getLeft(), 0)
    double possible2 = fixNaN(a.getLeft()/b.getRight(), 0);
    double possible3 = fixNaN(a.getRight()/b.getLeft(), 0);
    double possible4 = fixNaN(a.getRight()/b.getRight(), 0);
View Full Code Here

    this.values = null;
  }
 
  public D1 getLeft() {
    if (values == null)
      throw new DomainException("Invalid usage");
    return values.left;
  }
View Full Code Here

    return values.left;
  }

  public D2 getRight() {
    if (values == null)
      throw new DomainException("Invalid usage");
    return values.right;
  }
View Full Code Here

    return values.right;
  }
 
  public ProductDomain(Pair<D1,D2> values) {
    if (values == null || values.left.isBottom() || values.right.isBottom())
      throw new DomainException("Invalid usage");
    this.values = values;
  }
View Full Code Here

  public static NonRelationalDomain<Interval> updateVariableBy(NonRelationalDomain<Interval> input, Variable var,
      int delta) {
    if (input.isBottom())
      return input;
    if (!input.containsValue(var))
      throw new DomainException("Missing variable: '%s'", var);
    Interval oldValue = input.getValueFor(var);
    Interval newValue = new Interval(oldValue.getValue().add(delta));
    if (newValue.equals(oldValue))
      return input;
    return input.updateVariable(var, newValue);
View Full Code Here

    this.variableValues = null;
  }
 
  protected NonRelationalDomain(Map<Variable, DI> variableValues) {
    if (variableValues == null)
      throw new DomainException("Invalid 'null' domain values");
    this.variableValues = variableValues;
  }
View Full Code Here

TOP

Related Classes of ai.domain.DomainException

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.