コード例 #1
0
 @Test
 public void testConstructorDD() {
   p = new InfinitePoint(3, 4);
   boolean ok = true;
   ok &= p.getDimension() == 2;
   ok &= p.getVariables().get(0) == 3;
   ok &= p.getVariables().get(1) == 4;
   assertTrue(ok);
 }
コード例 #2
0
  @Test
  public void testDistanceEuclidienne3() throws DataFormatException {
    List<Double> variables = new LinkedList<Double>();
    for (double d : p.getVariables()) variables.add(d + 1);

    InfinitePoint Point = new InfinitePoint(variables);

    assertTrue(
        p.distanceEuclidienne(Point) - Math.sqrt(Point.getDimension())
            < InfinitePoint.getEpsilon());
  }
コード例 #3
0
 @Test
 public void testGetDimension() {
   p = new InfinitePoint(20);
   assertTrue(p.getDimension() == 20);
 }