Package edu.cmu.cs.fusion

Examples of edu.cmu.cs.fusion.FusionEnvironment


  public void testTruthUnknown2() {
    RelationshipPredicate lP = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(2), utils.getVar(3)});
    RelationshipPredicate rP = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    AndPredicate pred = new AndPredicate(lP, rP);

    FusionEnvironment env = new TestEnvironment(utils.getContext(0), Variant.SOUND_VARIANT);
   
    assertEquals(ThreeValue.UNKNOWN, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here


  public void testTruthUnknown3() {
    RelationshipPredicate lP = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(2), utils.getVar(3)});
    RelationshipPredicate rP = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(3), utils.getVar(2)});
    AndPredicate pred = new AndPredicate(lP, rP);

    FusionEnvironment env = new TestEnvironment(utils.getContext(1), Variant.SOUND_VARIANT);
   
    assertEquals(ThreeValue.UNKNOWN, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

    if (val == ThreeValue.UNKNOWN) {
      RelationshipDelta delta = env.getInferredDelta(this, sub);
     
      if (delta != null) {
        RelationshipContext newContext = env.getContext().applyChangesFromDelta(delta);
        FusionEnvironment newEnv = env.copy(newContext);
        val = getTruth(newEnv, sub);
      }
    }
   
    return isPositive ? val : val.negate();
View Full Code Here

TOP

Related Classes of edu.cmu.cs.fusion.FusionEnvironment

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.