Modifier and Type | Method and Description |
---|---|
ArrayList<Double> |
getAsArrayList()
Return a clone of this time discretization as
ArrayList<Double> . |
double[] |
getAsDoubleArray()
Return a clone of this time discretization as
double[] . |
int |
getNumberOfTimes() |
int |
getNumberOfTimeSteps() |
double |
getTime(int timeIndex)
Returns the time for the given time index.
|
int |
getTimeIndex(double time)
Returns the time index for the given time.
|
int |
getTimeIndexNearestGreaterOrEqual(double time)
Returns the time index for the time in the time discretization which is the nearest
to the given time, being greater or equal (i.e. min(i : timeDiscretization[i] ≥ time
where timeDiscretization[i] ≤ timeDiscretization[j]).
|
int |
getTimeIndexNearestLessOrEqual(double time)
Returns the time index for the time in the time discretization which is the nearest
to the given time, being less or equal (i.e. max(i : timeDiscretization[i] ≤ time
where timeDiscretization[i] ≤ timeDiscretization[j]).
|
TimeDiscretizationInterface |
getTimeShiftedTimeDiscretization(double timeShift)
Return a new time discretization where all time points have been shifted by
a given time shift.
|
double |
getTimeStep(int timeIndex)
Returns the time step from the given time index to the next one.
|
forEach, iterator, spliterator
int getNumberOfTimes()
int getNumberOfTimeSteps()
double getTime(int timeIndex)
timeIndex
- Time indexdouble getTimeStep(int timeIndex)
timeIndex
- Time indexint getTimeIndex(double time)
time
- The time.int getTimeIndexNearestLessOrEqual(double time)
time
- Given time.int getTimeIndexNearestGreaterOrEqual(double time)
time
- Given time.double[] getAsDoubleArray()
double[]
.double[]
ArrayList<Double> getAsArrayList()
ArrayList<Double>
.
Note that this method is costly in terms of performance.ArrayList<Double>
TimeDiscretizationInterface getTimeShiftedTimeDiscretization(double timeShift)
timeShift
- A time shift applied to all discretization points.Copyright © 2017. All rights reserved.