Package nz.org.riskscape.defaults.curves
Class ObservedPoints
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<org.apache.commons.math3.fitting.WeightedObservedPoint>
nz.org.riskscape.defaults.curves.ObservedPoints
- All Implemented Interfaces:
Iterable<org.apache.commons.math3.fitting.WeightedObservedPoint>
,Collection<org.apache.commons.math3.fitting.WeightedObservedPoint>
,List<org.apache.commons.math3.fitting.WeightedObservedPoint>
public class ObservedPoints
extends AbstractList<org.apache.commons.math3.fitting.WeightedObservedPoint>
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorDescriptionObservedPoints
(nz.org.riskscape.engine.util.SegmentedList<Double> xValues, nz.org.riskscape.engine.util.SegmentedList<Double> yValues) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.math3.fitting.WeightedObservedPoint
get
(int index) Iterator<org.apache.commons.math3.fitting.WeightedObservedPoint>
iterator()
int
size()
List<org.apache.commons.math3.fitting.WeightedObservedPoint>
withLogX()
List<org.apache.commons.math3.fitting.WeightedObservedPoint>
List<org.apache.commons.math3.fitting.WeightedObservedPoint>
withLogY()
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
ObservedPoints
-
-
Method Details
-
iterator
- Specified by:
iterator
in interfaceCollection<org.apache.commons.math3.fitting.WeightedObservedPoint>
- Specified by:
iterator
in interfaceIterable<org.apache.commons.math3.fitting.WeightedObservedPoint>
- Specified by:
iterator
in interfaceList<org.apache.commons.math3.fitting.WeightedObservedPoint>
- Overrides:
iterator
in classAbstractList<org.apache.commons.math3.fitting.WeightedObservedPoint>
-
size
public int size()- Specified by:
size
in interfaceCollection<org.apache.commons.math3.fitting.WeightedObservedPoint>
- Specified by:
size
in interfaceList<org.apache.commons.math3.fitting.WeightedObservedPoint>
- Specified by:
size
in classAbstractCollection<org.apache.commons.math3.fitting.WeightedObservedPoint>
-
get
public org.apache.commons.math3.fitting.WeightedObservedPoint get(int index) - Specified by:
get
in interfaceList<org.apache.commons.math3.fitting.WeightedObservedPoint>
- Specified by:
get
in classAbstractList<org.apache.commons.math3.fitting.WeightedObservedPoint>
-
withLogX
-
withLogY
-
withLogXLogY
-
asListOfPairs
- Returns:
- a view of this list as pairs. WeightedObservedPoint is missing many niceities, like equals, or toString, which can be useful/important.
-
getYValues
- Returns:
- a
Stream
of all the y values in the set of observed points. This can be a 'cheaper' operation than getting the list of WeightedObservedPoints and streaming through those.
-
getXValues
- Returns:
- a
Stream
of all the x values in the set of observed points. This can be a 'cheaper' operation than getting the list of WeightedObservedPoints and streaming through those.
-