Examples of FusionEnvironment


Examples of edu.cmu.cs.fusion.FusionEnvironment

  public void testTruthNotTrue() {
    BooleanValue bv = new BooleanValue(utils.getVar(0));
    bv.setPositive(false);
    Map<ObjectLabel, ThreeValue> tvs = new HashMap<ObjectLabel, ThreeValue>();
    tvs.put(utils.getSub(0).getSub(utils.getVar(0)), ThreeValue.TRUE);
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), tvs, Variant.SOUND_VARIANT);
   
    assertEquals(ThreeValue.FALSE, bv.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

Examples of edu.cmu.cs.fusion.FusionEnvironment

  public void testTruthNotUnknown() {
    BooleanValue bv = new BooleanValue(utils.getVar(0));
    bv.setPositive(false);
    Map<ObjectLabel, ThreeValue> tvs = new HashMap<ObjectLabel, ThreeValue>();
    tvs.put(utils.getSub(0).getSub(utils.getVar(0)), ThreeValue.UNKNOWN);
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), tvs, Variant.SOUND_VARIANT);
   
    assertEquals(ThreeValue.UNKNOWN, bv.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

Examples of edu.cmu.cs.fusion.FusionEnvironment

    //Test T or T
    RelationshipPredicate lP = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    RelationshipPredicate rP = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(4), utils.getVar(3)});
    OrPredicate pred = new OrPredicate(lP, rP);

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

Examples of edu.cmu.cs.fusion.FusionEnvironment

    //Test U or T
    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(4), utils.getVar(3)});
    OrPredicate pred = new OrPredicate(lP, rP);

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

Examples of edu.cmu.cs.fusion.FusionEnvironment

    //Test T or F
    RelationshipPredicate lP = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(4), utils.getVar(3)});
    RelationshipPredicate rP = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(2)});
    OrPredicate pred = new OrPredicate(lP, rP);

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

Examples of edu.cmu.cs.fusion.FusionEnvironment

    //Test F or F
    RelationshipPredicate lP = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(2)});
    RelationshipPredicate rP = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(4), utils.getVar(2)});
    OrPredicate pred = new OrPredicate(lP, rP);

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

Examples of edu.cmu.cs.fusion.FusionEnvironment

    //Test U or F
    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(2)});
    OrPredicate pred = new OrPredicate(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

Examples of edu.cmu.cs.fusion.FusionEnvironment

    //Test U or U
    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)});
    OrPredicate pred = new OrPredicate(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

Examples of edu.cmu.cs.fusion.FusionEnvironment

  }
 
  @Test
  public void testTruthFalse() {
    Predicate fPred = new FalsePredicate();
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), Variant.SOUND_VARIANT);
   
    assertEquals(fPred.getTruth(env, utils.getSub(0)), ThreeValue.FALSE);
  }
View Full Code Here

Examples of edu.cmu.cs.fusion.FusionEnvironment

  }

  @Test
  public void testTruthTrue() {
    Predicate tPred = new TruePredicate();
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), Variant.SOUND_VARIANT);
   
    assertEquals(tPred.getTruth(env, utils.getSub(0)), ThreeValue.TRUE);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.