}
@Test
public void testMultiple() {
RegionFactory<Euclidean1D> factory = new RegionFactory<Euclidean1D>();
IntervalsSet set = (IntervalsSet)
factory.intersection(factory.union(factory.difference(new IntervalsSet(1.0, 6.0, 1.0e-10),
new IntervalsSet(3.0, 5.0, 1.0e-10)),
new IntervalsSet(9.0, Double.POSITIVE_INFINITY, 1.0e-10)),
new IntervalsSet(Double.NEGATIVE_INFINITY, 11.0, 1.0e-10));
Assert.assertEquals(5.0, set.getSize(), 1.0e-10);
Assert.assertEquals(5.9, ((Vector1D) set.getBarycenter()).getX(), 1.0e-10);
Assert.assertEquals(Region.Location.OUTSIDE, set.checkPoint(new Vector1D(0.0)));
Assert.assertEquals(Region.Location.OUTSIDE, set.checkPoint(new Vector1D(4.0)));
Assert.assertEquals(Region.Location.OUTSIDE, set.checkPoint(new Vector1D(8.0)));
Assert.assertEquals(Region.Location.OUTSIDE, set.checkPoint(new Vector1D(12.0)));
Assert.assertEquals(Region.Location.INSIDE, set.checkPoint(new Vector1D(1.2)));
Assert.assertEquals(Region.Location.INSIDE, set.checkPoint(new Vector1D(5.9)));
Assert.assertEquals(Region.Location.INSIDE, set.checkPoint(new Vector1D(9.01)));
Assert.assertEquals(Region.Location.BOUNDARY, set.checkPoint(new Vector1D(5.0)));
Assert.assertEquals(Region.Location.BOUNDARY, set.checkPoint(new Vector1D(11.0)));
Assert.assertEquals( 1.0, set.getInf(), 1.0e-10);
Assert.assertEquals(11.0, set.getSup(), 1.0e-10);
List<Interval> list = set.asList();
Assert.assertEquals(3, list.size());
Assert.assertEquals( 1.0, list.get(0).getInf(), 1.0e-10);
Assert.assertEquals( 3.0, list.get(0).getSup(), 1.0e-10);
Assert.assertEquals( 5.0, list.get(1).getInf(), 1.0e-10);
Assert.assertEquals( 6.0, list.get(1).getSup(), 1.0e-10);