RayleighAux { static double[] getLineSpace(double start, double end, int interval) { if (interval < 0) { throw new NegativeArraySizeException("Array must not have negative index"); } double[] temp = new double[interval]; double steps = (end - start) / (interval - 1); for (int i = 0; i < temp.length; i++) { temp[i] = steps * i; } return temp; }  static double[] parseJSON1DimArray(JSONObject parse, String ray_coeff_matrix); static void initDefaultAuxiliary(); void setSolarFluxs(double[] solarFluxs); void setAltitudes(Tile altitude); double[] getTaur(); double[] getAltitudes(); void setAltitudes(double... alt); Map<Integer, List<double[]>> getInterpolation(); void setWavelength(float waveLength); double getWaveLength(); double[] getSunAzimuthAnglesRad(); void setSunAzimuthAnglesRad(double[] sunAzimuthAngles); double[] getViewAzimuthAnglesRad(); void setViewAzimuthAnglesRad(double[] viewAzimuthAngles); double[] getSunZenithAnglesRad(); void setSunZenithAnglesRad(double[] sunZenithAngles); double[] getViewZenithAnglesRad(); void setViewZenithAnglesRad(double[] viewZenithAngles); double[] getAirMass(); double[] getAziDifferent(); double[] getCosSZARads(); void setCosSZARads(double[] sunZenithAnglesRad); double[] getCosOZARads(); void setCosOZARads(double[] zenithAnglesRad); double[] getSinSZARads(); void setSinSZARads(double[] sunZenithAnglesRad); double[] getSinOZARads(); void setSinOZARads(double[] zenithAnglesRad); double[] getSunZenithAngles(); void setSunZenithAngles(Tile sourceTile); void setSunZenithAngles(double... sunZenithAngles); double[] getViewZenithAngles(); void setViewZenithAngles(double... viewZenithAngles); void setViewZenithAngles(Tile sourceTile); void setSunAzimuthAngles(double... sunAzimuthAngles); void setSunAzimuthAngles(Tile sourceTile); double[] getLatitudes(); void setLatitudes(double... lat); void setLatitudes(Tile sourceTile); void setViewAzimuthAngles(double... viewAzimuthAngles); void setViewAzimuthAngles(Tile sourceTile); double[] getSeaLevels(); void setSeaLevels(double... seaLevels); void setS2MsiSeaLevelsPressures(double seaLevel, Rectangle rectangle); void setS2MsiTotalOzones(double ozone, Rectangle rectangle); void setS2MsiAngles(GeoCoding geoCoding, Tile szaTile, Tile vzaTile, Tile saaTile, Tile vaaTile, Rectangle rectangle); void setSeaLevels(Tile sourceTile); double[] getTotalOzones(); void setTotalOzones(double... totalO); void setTotalOzones(Tile sourceTile); void setOlciTotalOzones(Tile sourceTile); double[] getSolarFluxs(); void setSolarFluxs(Tile sourceTile); double[] getSourceSampleRad(); void setSourceSampleRad(Tile sourceTile); double[] getLongitudes(); void setLongitudes(double... longitudes); void setLongitude(Tile sourceTile); double[] getInterpolateRayleighThickness(double... taur); double[] getSquarePower(double[] sinOZARads);  }
@Test public void testCreateLineSpaceOfArrayElements() throws Exception { double[] lineSpace = RayleighAux.getLineSpace(0, 10, 5); assertNotNull(lineSpace); assertEquals(5, lineSpace.length); assertArrayEquals(new double[]{0.0, 2.5, 5.0, 7.5, 10.0}, lineSpace, 1e-8); lineSpace = RayleighAux.getLineSpace(0, 1, 5); assertEquals(5, lineSpace.length); assertArrayEquals(new double[]{0.0, 0.25, 0.5, 0.75, 1.0}, lineSpace, 1e-8); lineSpace = RayleighAux.getLineSpace(0, 0, 5); assertEquals(5, lineSpace.length); assertArrayEquals(new double[]{0.0, 0.0, 0.0, 0.0, 0.0}, lineSpace, 1e-8); try { lineSpace = RayleighAux.getLineSpace(0, 10, -5); fail("Array cant have negative index"); } catch (NegativeArraySizeException ex) { } }