Package heart.alsvfd

Examples of heart.alsvfd.Value


  }

  @Override
  public UncertainTrue evaluateUncertainLt(Attribute at, Value v, WorkingMemory wm)
      throws UnsupportedOperationException, NotInTheDomainException {
    Value attributeValue = wm.getAttributeValue(at);
    boolean logicalValue = attributeValue.lt(v, at.getType());
   
    return (logicalValue ? new UncertainTrue(getMaxCertainty()): new UncertainTrue(getMinCertainty()));
  }
View Full Code Here


  }

  @Override
  public UncertainTrue evaluateUncertainLte(Attribute at, Value v, WorkingMemory wm)
      throws UnsupportedOperationException, NotInTheDomainException {
    Value attributeValue = wm.getAttributeValue(at);
    boolean logicalValue = attributeValue.lte(v, at.getType());
   
    return (logicalValue ? new UncertainTrue(getMaxCertainty()): new UncertainTrue(getMinCertainty()));
  }
View Full Code Here

  }

  @Override
  public UncertainTrue evaluateUncertainGt(Attribute at, Value v, WorkingMemory wm)
      throws UnsupportedOperationException, NotInTheDomainException {
    Value attributeValue = wm.getAttributeValue(at);
    boolean logicalValue = attributeValue.gt(v, at.getType());
   
    return (logicalValue ? new UncertainTrue(getMaxCertainty()): new UncertainTrue(getMinCertainty()));
  }
View Full Code Here

  }

  @Override
  public UncertainTrue evaluateUncertainGte(Attribute at, Value v, WorkingMemory wm)
      throws UnsupportedOperationException, NotInTheDomainException {
    Value attributeValue = wm.getAttributeValue(at);
    boolean logicalValue = attributeValue.gte(v, at.getType());
   
    return (logicalValue ? new UncertainTrue(getMaxCertainty()): new UncertainTrue(getMinCertainty()));
  }
View Full Code Here

    }
  }
 
  public boolean execute(WorkingMemory wmthrows UnsupportedOperationException, NotInTheDomainException  {
    try{
      Value newValue = decision.evaluate(wm);
      wm.setAttributeValue(attr, newValue, true);
 
      return true;
    }catch(UnsupportedOperationException e){
      //TODO rethrow with modified message
View Full Code Here

  @Override
  public UncertainTrue evaluateUncertainEq(Attribute at, Value v, WorkingMemory wm)
      throws UnsupportedOperationException, NotInTheDomainException {
   
    Value attributeValue = wm.getAttributeValue(at);
   
    // It means that once we consider evaluation in terms of uncertainty,
    // If the value is completely unknown everything is possible.
    if(attributeValue instanceof Null && !(v instanceof Null)){
      return new UncertainTrue(0.0f);
    }
   
    boolean logicalValue = attributeValue.eq(v, at.getType());
   
    return evaluateUncertainTrueValue(at, v, wm, Formulae.OP_EQ, logicalValue);

  }
View Full Code Here


  @Override
  public UncertainTrue evaluateUncertainNeq(Attribute at, Value v, WorkingMemory wm)
      throws UnsupportedOperationException, NotInTheDomainException {
    Value attributeValue = wm.getAttributeValue(at);
    // It means that once we consider evaluation in terms of uncertainty,
    // If the value is completely unknown everything is possible.
    if(attributeValue instanceof Null && !(v instanceof Null)){
      return new UncertainTrue(0.0f);
    }
   
    boolean logicalValue = attributeValue.neq(v, at.getType());
    return evaluateUncertainTrueValue(at, v,wm, Formulae.OP_NEQ, logicalValue);
  }
View Full Code Here


  @Override
  public UncertainTrue evaluateUncertainIn(Attribute at, Value v, WorkingMemory wm)
      throws UnsupportedOperationException, NotInTheDomainException {
    Value attributeValue = wm.getAttributeValue(at);
    // It means that once we consider evaluation in terms of uncertainty,
    // If the value is completely unknown everything is possible.
    if(attributeValue instanceof Null && !(v instanceof Null)){
      return new UncertainTrue(0.0f);
    }
   
    boolean logicalValue = attributeValue.in(v, at.getType());
    return evaluateUncertainTrueValue(at, v,wm, Formulae.OP_IN, logicalValue);
  }
View Full Code Here


  @Override
  public UncertainTrue evaluateUncertainNotin(Attribute at, Value v, WorkingMemory wm)
      throws UnsupportedOperationException, NotInTheDomainException {
    Value attributeValue = wm.getAttributeValue(at);
    // It means that once we consider evaluation in terms of uncertainty,
    // If the value is completely unknown everything is possible.
    if(attributeValue instanceof Null && !(v instanceof Null)){
      return new UncertainTrue(0.0f);
    }
   
    boolean logicalValue = attributeValue.notin(v, at.getType());
    return evaluateUncertainTrueValue(at, v,wm, Formulae.OP_NOTIN, logicalValue);
  }
View Full Code Here


  @Override
  public UncertainTrue evaluateUncertainSubset(Attribute at, Value v, WorkingMemory wm)
      throws UnsupportedOperationException, NotInTheDomainException {
    Value attributeValue = wm.getAttributeValue(at);
    // It means that once we consider evaluation in terms of uncertainty,
    // If the value is completely unknown everything is possible.
    if(attributeValue instanceof Null && !(v instanceof Null)){
      return new UncertainTrue(0.0f);
    }
   
    boolean logicalValue = attributeValue.subset(v, at.getType());
    return evaluateUncertainTrueValue(at, v,wm, Formulae.OP_SUBSET, logicalValue);
  }
View Full Code Here

TOP

Related Classes of heart.alsvfd.Value

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.