Package edu.cmu.cs.fusion

Examples of edu.cmu.cs.fusion.FusionEnvironment


  }
 
  @Test
  public void testTruthFalse() {
    RelationshipPredicate pred = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(2)});
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), Variant.SOUND_VARIANT);
   
    assertEquals(ThreeValue.FALSE, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here


  }

  @Test
  public void testTruthTrue() {
    RelationshipPredicate pred = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), Variant.SOUND_VARIANT);
   
    assertEquals(ThreeValue.TRUE, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  }

  @Test
  public void testTruthUnknownNoInference() {
    RelationshipPredicate pred = new RelationshipPredicate(utils.getRelation(1), new SpecVar[] {utils.getVar(2), utils.getVar(1)});
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), Variant.SOUND_VARIANT);
   
    assertEquals(ThreeValue.UNKNOWN, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  @Test
  public void testTruthNotFalse() {
    RelationshipPredicate pred = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(2)});
    pred.setPositive(false);
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), Variant.SOUND_VARIANT);
   
    assertEquals(ThreeValue.TRUE, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  @Test
  public void testTruthNotTrue() {
    RelationshipPredicate pred = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    pred.setPositive(false);
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), Variant.SOUND_VARIANT);
   
    assertEquals(ThreeValue.FALSE, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  @Test
  public void testTruthNotUnknownNoInference() {
    RelationshipPredicate pred = new RelationshipPredicate(utils.getRelation(1), new SpecVar[] {utils.getVar(2), utils.getVar(1)});
    pred.setPositive(false);
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), Variant.SOUND_VARIANT);
   
    assertEquals(ThreeValue.UNKNOWN, pred.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

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

  @Test
  public void testTruthTrue() {
    Predicate bv = new BooleanValue(utils.getVar(0));
    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.TRUE, bv.getTruth(env, utils.getSub(0)));
  }
View Full Code Here

  @Test
  public void testTruthUnknown() {
    Predicate bv = new BooleanValue(utils.getVar(0));
    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

  public void testTruthNotFalse() {
    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.FALSE);
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), tvs, Variant.SOUND_VARIANT);
   
    assertEquals(ThreeValue.TRUE, bv.getTruth(env, utils.getSub(0)));
  }
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.