Package com.jgaap.util

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


    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 BrayCurtisDistance().distance(new EventMap(set1), new EventMap(set2));
    assertTrue(DistanceTestHelper.inRange(result, 1.0, 0.0000000001));
  }
}
View Full Code Here


    tmp.add(new Event("###", eventDriver));
    tmp.add(new Event("BB", eventDriver));
    tmp.add(new Event("CCC", eventDriver));


    expectedEventSet.addEvents(tmp);
    assertTrue(expectedEventSet.equals(sampleEventSet));
  }
}
View Full Code Here

           "in sacred truth and rigid spelling\n"+
           "numerical sprites elucidate\n"+
           "for me the lexicons full weight\n"+
           "if nature gain who can complain\n"+
                 "tho dr johnson fulminate", eventDriver));
       expectedEventSet.addEvents(tmp);
       assertTrue(expectedEventSet.equals(sampleEventSet));

       /*null case would be covered by the spaces in the above test*/
    }
  }
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("delta", null));
    es1.addEvents(test1);
    es2.addEvents(test1);
    assertTrue(new KendallCorrelationDistance().distance(new EventMap(es1), new EventMap(es2)) == 0);

    es1=new EventSet();
    es2=new EventSet();
    test1 = new Vector<Event>();
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 KendallCorrelationDistance().distance(new EventMap(es1), new EventMap(es2));
    //System.out.println(result);
    assertTrue(DistanceTestHelper.inRange(result, 1.2, 0.0000000001));

    es1=new EventSet();
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 KendallCorrelationDistance().distance(new EventMap(es1), new EventMap(es2));
    //System.out.println(result);
    assertTrue(DistanceTestHelper.inRange(result, 2.0, 0.0000000001));
  }
View Full Code Here

      tmp.add(new Event("Jumped", eventDriver));
      tmp.add(new Event("Over", eventDriver));
      tmp.add(new Event("Lazy", eventDriver));
      tmp.add(new Event("Dog", eventDriver));

       expectedSet.addEvents(tmp);
      
        assertTrue(expectedSet.equals(sampleSet));
        }
}
View Full Code Here

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

    /* test 2 -- different distributions, total overlap */
    Vector<Event> test2 = new Vector<Event>();
    es2=new EventSet();
View Full Code Here

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

    /* test 3 -- totally disjoint (== 1.0) */
    es2=new EventSet();
    test2 = new Vector<Event>();
View Full Code Here

    /* test 3 -- totally disjoint (== 1.0) */
    es2=new EventSet();
    test2 = new Vector<Event>();
    test2.add(new Event("omega", null));
    es2.addEvents(test2);
    assertTrue(new IntersectionDistance().distance(new EventMap(es1), new EventMap(es2)) == 1.0);
   
    /* test 4 -- Partial overlap.  5 (3/3) elem., one in common */
    es2 = new EventSet();
    test2 = new Vector<Event>();
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.