Ellipsoid { public double[] getSortedRadii() { return of(ra, rb, rc).sorted().toArray(); } Ellipsoid(final Object[] ellipsoid);  Ellipsoid(final double a, final double b, final double c,
		final double cx, final double cy, final double cz,
		final double[][] eigenVectors); boolean contains(final double x, final double y, final double z); void contract(final double increment); Ellipsoid copy(); void dilate(final double da, final double db, final double dc); double[] getAxisAlignedBoundingBox(); double[] getCentre(); double[] getRadii(); double[][] getRotation(); void setRotation(final double[][] rotation); double[] getSortedRadii(); double[][] getSurfacePoints(final int nPoints); double[][] getSurfacePoints(final double[][] vectors); double getVolume(); double[] getYMinAndMax(); double[] getZMinAndMax(); void rotate(final double[][] rotation); void setCentroid(final double x, final double y, final double z); static double[][] transpose(final double[][] a); public int id; }
@Test public void testGetSortedRadii() { final int t = 1000; final Ellipsoid e = unitSphere.copy(); for (int i = 0; i < t; i++) { e.dilate(Math.random(), Math.random(), Math.random()); final double[] r = e.getSortedRadii(); assertTrue(r[0] < r[1]); assertTrue(r[1] < r[2]); } }