Package hec.data

Interface IRating

All Known Implementing Classes:
PairedDataMath, PairedDataMathVertDatum

public interface IRating
Generalized rating interface
  • Method Summary

    Modifier and Type
    Method
    Description
    long[]
    Retrieves the creation dates of the rating in milliseconds, one for each contained rating
    Retrieves the data ratingUnits.
    long
    Retrieves the default value time.
    long[]
    Retrieves the effective dates of the rating in milliseconds, one for each contained rating
    int
    Retrieves the number of independent parameters for this rating.
    Retrieves the name of the rating.
    double[][]
    Retrieves the min and max value for each parameter of the rating, in the current ratingUnits.
    double[][]
    getRatingExtents(long ratingTime)
    Retrieves the min and max value for each parameter of the rating, in the current ratingUnits.
    Retrieves the rating parameters.
    long
    Retrieves the rating time.
    Retrieves the rating ratingUnits.
    double
    rate(double indVal)
    Finds the dependent value for a single independent value.
    double[]
    rate(double[] indVals)
    Finds multiple dependent values for multiple single independent values.
    double[]
    rate(double[][] indVals)
    Finds multiple dependent values for multiple sets of independent values.
    double[]
    rate(long[] valTimes, double[] indVals)
    Finds multiple dependent values for multiple single independent and times.
    double[]
    rate(long[] valTimes, double[][] indVals)
    Finds multiple dependent values for multiple sets of independent values and times.
    double
    rate(long valTime, double indVal)
    Finds the dependent value for a single independent value at a specified time.
    double[]
    rate(long valTime, double[] indVals)
    Finds multiple dependent values for multiple single independent values at a specified time.
    double[]
    rate(long valTime, double[][] indVals)
    Finds multiple dependent values for multiple sets of independent values at a specified time.
    Rates the values in the specified TimeSeriesMath to generate a resulting TimeSeriesMath.
    Rates the values in the specified TimeSeriesMath objects to generate a resulting TimeSeriesMath.
    Rates the values in the specified TimeSeriesContainer to generate a resulting TimeSeriesContainer.
    Rates the values in the specified TimeSeriesContainer objects to generate a resulting TimeSeriesContainer.
    double
    rateOne(double... indVals)
    Finds the dependent value for a set of independent values.
    double
    rateOne(long valTime, double... indVals)
    Finds the dependent value for a set of independent values.
    double
    rateOne2(double[] indVals)
    Finds the dependent value for a set of independent values.
    double
    rateOne2(long valTime, double[] indVals)
    Finds the dependent value for a set of independent values.
    void
    Resets the default value time.
    void
    Resets (un-sets) the rating time.
    double
    reverseRate(double depVal)
    Finds the independent value for a single independent value.
    double[]
    reverseRate(double[] depVals)
    Finds multiple independent values for multiple single independent values.
    double[]
    reverseRate(long[] valTimes, double[] depVals)
    Finds multiple independent values for multiple single independent and times.
    double
    reverseRate(long valTime, double depVal)
    Finds the independent value for a single independent value at a specified time.
    double[]
    reverseRate(long valTime, double[] depVals)
    Finds multiple independent values for multiple single independent values at a specified time.
    Rates the values in the specified TimeSeriesMath to generate a resulting TimeSeriesMath.
    Rates the values in the specified TimeSeriesContainer to generate a resulting TimeSeriesContainer.
    void
    Sets the data ratingUnits.
    void
    setDefaultValueTime(long defaultValueTime)
    Sets the default value time.
    void
    Sets the name of the rating
    void
    setRatingTime(long ratingTime)
    Sets the rating time.
  • Method Details

    • getName

      String getName()
      Retrieves the name of the rating.
      Returns:
      The name of the rating
    • setName

      void setName(String name) throws RatingException
      Sets the name of the rating
      Parameters:
      name - The new name of the rating
      Throws:
      RatingException
    • getRatingParameters

      String[] getRatingParameters()
      Retrieves the rating parameters.
      Returns:
      The independent and dependent parameters of the rating
    • getRatingUnits

      String[] getRatingUnits()
      Retrieves the rating ratingUnits. These are the ratingUnits of the underlying rating, which may be different than the data ratingUnits, as long as valid unit conversions exist between rating ratingUnits and data ratingUnits.
      Returns:
      The ratingUnits, one unit for each parameter
    • getDataUnits

      String[] getDataUnits()
      Retrieves the data ratingUnits. These are the ratingUnits expected for independent parameters and the unit produced for the dependent parameter. If the underlying rating uses different ratingUnits, the rating must perform unit conversions.
      Returns:
      The ratingUnits identifier, one unit for each parameter
    • setDataUnits

      void setDataUnits(String[] units) throws RatingException
      Sets the data ratingUnits. These are the ratingUnits expected for independent parameters and the unit produced for the dependent parameter. If the underlying rating uses different ratingUnits, the rating must perform unit conversions.
      Parameters:
      units - The ratingUnits, one unit for each parameter
      Throws:
      RatingException
    • getDefaultValueTime

      long getDefaultValueTime()
      Retrieves the default value time. This is used for rating values that have no inherent times.
      Returns:
      The default value time
    • setDefaultValueTime

      void setDefaultValueTime(long defaultValueTime)
      Sets the default value time. This is used for rating values that have no inherent times.
      Parameters:
      defaultValueTime - The default value time in Java milliseconds
    • resetDefaultValuetime

      void resetDefaultValuetime()
      Resets the default value time. This is used for rating values that have no inherent times.
    • getRatingTime

      long getRatingTime()
      Retrieves the rating time. This rate values at a time in the past. No rating information with a creation date later than the rating time will be used to rate values.
      Returns:
      The rating time in Java milliseconds
    • setRatingTime

      void setRatingTime(long ratingTime)
      Sets the rating time. This rate values at a time in the past. No rating information with a creation date later than the rating time will be used to rate values.
      Parameters:
      ratingTime - The rating time in Java milliseconds
    • resetRatingTime

      void resetRatingTime()
      Resets (un-sets) the rating time.
    • getRatingExtents

      double[][] getRatingExtents() throws RatingException
      Retrieves the min and max value for each parameter of the rating, in the current ratingUnits.
      Returns:
      The min and max values for each parameter. The outer (first) dimension will be 2, with the first containing min values and the second containing max values. The inner (second) dimension will be the number of independent parameters for the rating plus one. The first value will be the extent for the first independent parameter, and the last value will be the extent for the dependent parameter.
      Throws:
      RatingException
    • getRatingExtents

      double[][] getRatingExtents(long ratingTime) throws RatingException
      Retrieves the min and max value for each parameter of the rating, in the current ratingUnits.
      Parameters:
      ratingTime - The time to use in determining the rating extents
      Returns:
      The min and max values for each parameter. The outer (first) dimension will be 2, with the first containing min values and the second containing max values. The inner (second) dimension will be the number of independent parameters for the rating plus one. The first value will be the extent for the first independent parameter, and the last value will be the extent for the dependent parameter.
      Throws:
      RatingException
    • getEffectiveDates

      long[] getEffectiveDates()
      Retrieves the effective dates of the rating in milliseconds, one for each contained rating
    • getCreateDates

      long[] getCreateDates()
      Retrieves the creation dates of the rating in milliseconds, one for each contained rating
    • rate

      double rate(double indVal) throws RatingException
      Finds the dependent value for a single independent value. The rating must be for a single independent parameter.
      Parameters:
      indVal - The independent value to rate.
      Returns:
      The dependent value
      Throws:
      RatingException
    • rateOne

      double rateOne(double... indVals) throws RatingException
      Finds the dependent value for a set of independent values. The rating must be for as many independent parameters as there are arguments.
      Parameters:
      indVals - The independent parameters to rate
      Returns:
      The dependent value
      Throws:
      RatingException
    • rateOne2

      double rateOne2(double[] indVals) throws RatingException
      Finds the dependent value for a set of independent values. The rating must be for as many independent parameters as there are arguments.
      Parameters:
      indVals - The independent parameters to rate
      Returns:
      The dependent value
      Throws:
      RatingException
    • rate

      double[] rate(double[] indVals) throws RatingException
      Finds multiple dependent values for multiple single independent values. The rating must be for a single independent parameter.
      Parameters:
      indVals - The independent values to rate
      Returns:
      The dependent values
      Throws:
      RatingException
    • rate

      double[] rate(double[][] indVals) throws RatingException
      Finds multiple dependent values for multiple sets of independent values. The rating must be for as many independent parameters as the length of each independent parameter set.
      Parameters:
      indVals - The independent values to rate. Each set of independent values must be the same length.
      Returns:
      The dependent values
      Throws:
      RatingException
    • rate

      double rate(long valTime, double indVal) throws RatingException
      Finds the dependent value for a single independent value at a specified time. The rating must be for a single independent parameter.
      Parameters:
      valTime - The time associated with the value to rate, in Java milliseconds
      indVal - The independent value to rate
      Returns:
      The dependent value
      Throws:
      RatingException
    • rateOne

      double rateOne(long valTime, double... indVals) throws RatingException
      Finds the dependent value for a set of independent values. The rating must be for as many independent parameters as there are arguments.
      Parameters:
      valTime - The time associated with the set of value to rate, in Java milliseconds
      indVals - The independent parameters to rate
      Returns:
      The dependent value
      Throws:
      RatingException
    • rateOne2

      double rateOne2(long valTime, double[] indVals) throws RatingException
      Finds the dependent value for a set of independent values. The rating must be for as many independent parameters as there are arguments.
      Parameters:
      valTime - The time associated with the set of value to rate, in Java milliseconds
      indVals - The independent parameters to rate
      Returns:
      The dependent value
      Throws:
      RatingException
    • rate

      double[] rate(long valTime, double[] indVals) throws RatingException
      Finds multiple dependent values for multiple single independent values at a specified time. The rating must be for a single independent parameter.
      Parameters:
      valTime - The time associated with the values to rate, in Java milliseconds
      indVals - The independent values to rate
      Returns:
      The dependent values
      Throws:
      RatingException
    • rate

      double[] rate(long[] valTimes, double[] indVals) throws RatingException
      Finds multiple dependent values for multiple single independent and times. The rating must be for a single independent parameter.
      Parameters:
      valTimes - The times associated with the values to rate, in Java milliseconds
      indVals - The independent values to rate
      Returns:
      The dependent values
      Throws:
      RatingException
    • rate

      double[] rate(long valTime, double[][] indVals) throws RatingException
      Finds multiple dependent values for multiple sets of independent values at a specified time. The rating must be for as many independent parameters as the length of each independent parameter set.
      Parameters:
      valTime - The time associated with the values to rate, in Java milliseconds
      indVals - The independent values to rate. Each set of independent values must be the same length.
      Returns:
      The dependent values
      Throws:
      RatingException
    • rate

      double[] rate(long[] valTimes, double[][] indVals) throws RatingException
      Finds multiple dependent values for multiple sets of independent values and times. The rating must be for as many independent parameters as the length of each independent parameter set.
      Parameters:
      valTimes - The time associated with the values to rate, in Java milliseconds
      indVals - The independent values to rate. Each set of independent values must be the same length.
      Returns:
      The dependent values
      Throws:
      RatingException
    • rate

      Rates the values in the specified TimeSeriesContainer to generate a resulting TimeSeriesContainer. The rating must be for a single independent parameter.
      Parameters:
      tsc - The TimeSeriesContainer of independent values.
      Returns:
      The TimeSeriesContainer of dependent values.
      Throws:
      RatingException
    • rate

      Rates the values in the specified TimeSeriesContainer objects to generate a resulting TimeSeriesContainer. The rating must be for as many independent parameters as the length of tscs.
      Parameters:
      tscs - The TimeSeriesContainers of independent values, one for each independent parameter.
      Returns:
      The TimeSeriesContainer of dependent values.
      Throws:
      RatingException
    • rate

      Rates the values in the specified TimeSeriesMath to generate a resulting TimeSeriesMath. The rating must be for a single independent parameter.
      Parameters:
      tsm - The TimeSeriesMath of independent values.
      Returns:
      The TimeSeriesMath of dependent values.
      Throws:
      RatingException
    • rate

      Rates the values in the specified TimeSeriesMath objects to generate a resulting TimeSeriesMath. The rating must be for as many independent parameters as the length of tscs.
      Parameters:
      tsms - The TimeSeriesMaths of independent values, one for each independent parameter.
      Returns:
      The TimeSeriesMath of dependent values.
      Throws:
      RatingException
    • reverseRate

      double reverseRate(double depVal) throws RatingException
      Finds the independent value for a single independent value. The rating must be for a single independent parameter.
      Parameters:
      depVal - The dependent value to rate.
      Returns:
      The independent value
      Throws:
      RatingException
    • reverseRate

      double[] reverseRate(double[] depVals) throws RatingException
      Finds multiple independent values for multiple single independent values. The rating must be for a single independent parameter.
      Parameters:
      depVals - The dependent values to rate
      Returns:
      The independent values
      Throws:
      RatingException
    • reverseRate

      double reverseRate(long valTime, double depVal) throws RatingException
      Finds the independent value for a single independent value at a specified time. The rating must be for a single independent parameter.
      Parameters:
      valTime - The time associated with the value to rate, in Java milliseconds
      depVal - The dependent value to rate
      Returns:
      The independent value
      Throws:
      RatingException
    • reverseRate

      double[] reverseRate(long valTime, double[] depVals) throws RatingException
      Finds multiple independent values for multiple single independent values at a specified time. The rating must be for a single independent parameter.
      Parameters:
      valTime - The time associated with the values to rate, in Java milliseconds
      depVals - The dependent values to rate
      Returns:
      The independent values
      Throws:
      RatingException
    • reverseRate

      double[] reverseRate(long[] valTimes, double[] depVals) throws RatingException
      Finds multiple independent values for multiple single independent and times. The rating must be for a single independent parameter.
      Parameters:
      valTimes - The times associated with the values to rate, in Java milliseconds
      depVals - The dependent values to rate
      Returns:
      The independent values
      Throws:
      RatingException
    • reverseRate

      Rates the values in the specified TimeSeriesContainer to generate a resulting TimeSeriesContainer. The rating must be for a single independent parameter.
      Parameters:
      tsc - The TimeSeriesContainer of dependent values.
      Returns:
      The TimeSeriesContainer of independent values.
      Throws:
      RatingException
    • reverseRate

      Rates the values in the specified TimeSeriesMath to generate a resulting TimeSeriesMath. The rating must be for a single independent parameter.
      Parameters:
      tsm - The TimeSeriesMath of dependent values.
      Returns:
      The TimeSeriesMath of independent values.
      Throws:
      RatingException
    • getIndParamCount

      int getIndParamCount() throws RatingException
      Retrieves the number of independent parameters for this rating.
      Returns:
      The number of independent parameters for this rating.
      Throws:
      RatingException