Package com.jgaap.util

Examples of com.jgaap.util.EventSet.addEvents()


    tmp.add(new Event("\"I", eventDriver));
    tmp.add(new Event("won't,\"", eventDriver));
    tmp.add(new Event("he", eventDriver));
    tmp.add(new Event("grumbled.", eventDriver));

    expectedEventSet.addEvents(tmp);
    assertTrue(expectedEventSet.equals(sampleEventSet));
  }

}
View Full Code Here


    test2.add(new Event("alpha", null));
    test2.add(new Event("alpha", null));
    test2.add(new Event("alpha", null));
    test2.add(new Event("beta", null));
    known2 = new EventSet();
    known2.addEvents(test2);
   
    Result = new CrossEntropyDivergence().divergence(new EventMap(known1), new EventMap(known2));
   
    //System.out.println(Result);
   
View Full Code Here

    test2.add(new Event("alpha", null));
    test2.add(new Event("alpha", null));
    test2.add(new Event("beta", null));
    test2.add(new Event("gamma", null));
    known2 = new EventSet();
    known2.addEvents(test2);
 
   
    //System.out.println("Start Here");
   
    Result = new CrossEntropyDivergence().divergence(new EventMap(known2), new EventMap(known1));
View Full Code Here

    test1.add(new Event("seven", null));
    test1.add(new Event("eight", null));
    test1.add(new Event("nine", null));
    test1.add(new Event("ten", null));     
    set1.addEvents(test1);
    set2.addEvents(test1);
    double result = new ChordDistance().distance(new EventMap(set1), new EventMap(set2));
    assertTrue(DistanceTestHelper.inRange(result, Math.sqrt(1.8), 0.0000000001));
   
   
    set2 = new EventSet();
View Full Code Here

    test2.add(new Event("6", null));
    test2.add(new Event("7", null));
    test2.add(new Event("8", null));
    test2.add(new Event("9", null));
    test2.add(new Event("10", null));
    set2.addEvents(test2);
    result = new ChordDistance().distance(new EventMap(set1), new EventMap(set2));
    assertTrue(DistanceTestHelper.inRange(result, Math.sqrt(2.0), 0.0000000001));
  }

}
View Full Code Here

     
      EventSet expectedSet = new EventSet();
      Vector<Event> tmp = new Vector<Event>();
      tmp.add(new Event("The", eventDriver));
      tmp.add(new Event("The", eventDriver));
       expectedSet.addEvents(tmp);
      
        assertTrue(expectedSet.equals(sampleSet));
        }
}
View Full Code Here

    test1.add(new Event("beta", null));
    test1.add(new Event("gamma", null));
    test1.add(new Event("gamma", null));
    test1.add(new Event("gamma", null));
    es1.addEvents(test1);
    es2.addEvents(test1);
    assertTrue(new PearsonCorrelationDistance().distance(new EventMap(es1), new EventMap(es2)) == 0);

    // test 2 : identical probabilities but different distributions
    es1=new EventSet();
    es2=new EventSet();
View Full Code Here

    test2.add(new Event("D", null));
    test2.add(new Event("E", null));
    test2.add(new Event("E", null));

    es1.addEvents(test1);
    es2.addEvents(test2);
    double result = new PearsonCorrelationDistance().distance(new EventMap(es1), new EventMap(es2));
    //System.out.println(result);
    assertTrue(DistanceTestHelper.inRange(result, 0.0, 0.0000000001));

    // test 3 : Perfect anticorrelation
View Full Code Here

    test2.add(new Event("B", null));
    test2.add(new Event("B", null));
    test2.add(new Event("A", null));

    es1.addEvents(test1);
    es2.addEvents(test2);
    result = new PearsonCorrelationDistance().distance(new EventMap(es1), new EventMap(es2));
    //System.out.println(result);
    assertTrue(DistanceTestHelper.inRange(result, 2.0, 0.0000000001));

    // test 4 : non-trivial calculation
View Full Code Here

    tmp.add(new Event("6.2", eventDriver));
    tmp.add(new Event("5.9", eventDriver));
    tmp.add(new Event("5.7", eventDriver));
    tmp.add(new Event("7.4", eventDriver));

    expectedEventSet.addEvents(tmp);

System.out.println("Expected is " + expectedEventSet.toString());
System.out.println("Actual is " + sampleEventSet.toString());
    assertTrue(expectedEventSet.equals(sampleEventSet));
  }
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.