- java.lang.Object
-
- org.ojalgo.series.primitive.PrimitiveSeries
-
- All Implemented Interfaces:
Access1D<java.lang.Double>,Structure1D
- Direct Known Subclasses:
AccessSeries,BinaryFunctionSeries,DataSeries,DifferencesSeries,PrimitiveTimeSeries,PrunedSeries,QuotientsSeries,UnaryFunctionSeries
public abstract class PrimitiveSeries extends java.lang.Object implements Access1D<java.lang.Double>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Access1D
Access1D.Aggregatable<N extends java.lang.Comparable<N>>, Access1D.Collectable<N extends java.lang.Comparable<N>,R extends Mutate1D>, Access1D.ElementView<N extends java.lang.Comparable<N>>, Access1D.SelectionView<N extends java.lang.Comparable<N>>, Access1D.Sliceable<N extends java.lang.Comparable<N>>, Access1D.Visitable<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S extends Structure1D,B extends Structure1D.Logical<S,B>>, Structure1D.LongIndex, Structure1D.LoopCallback
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPrimitiveSeries()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PrimitiveSeriesadd(double addend)PrimitiveSeriesadd(PrimitiveSeries addend)PrimitiveSeriescopy()static PrimitiveSeriescopy(Access1D<?> template)longcount()The total number of elements in this structure.PrimitiveSeriesdifferences()period == 1PrimitiveSeriesdifferences(int period)PrimitiveSeriesdivide(double divisor)PrimitiveSeriesdivide(PrimitiveSeries divisor)doubledoubleValue(int index)PrimitiveSeriesexp()java.lang.Doubleget(int index)java.lang.Doubleget(long index)PrimitiveSerieslog()PrimitiveSeriesmultiply(double multiplicand)PrimitiveSeriesmultiply(PrimitiveSeries multiplicand)PrimitiveSeriesprune(int shift)A positive valued shift will prune that many elements off the head of the series.PrimitiveSeriesquotients()period == 1PrimitiveSeriesquotients(int period)PrimitiveSeriesrunningProduct(double initialValue)PrimitiveSeriesrunningSum(double initialValue)abstract intsize()The total number of elements in this structure.PrimitiveSeriessubtract(double subtrahend)PrimitiveSeriessubtract(PrimitiveSeries subtrahend)DataSeriestoDataSeries()java.lang.StringtoString()abstract doublevalue(int index)double[]values()PrimitiveSeriesvariances(ScedasticityModel model)Creates a series of variances from this series of values.static PrimitiveSerieswrap(Access1D<?> base)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ojalgo.structure.Access1D
asCollectable1D, asKeyed1D, asList, axpy, byteValue, byteValue, dot, doubleValue, elements, floatValue, floatValue, intValue, intValue, longValue, longValue, nonzeros, select, shortValue, shortValue, supplyTo, toList, toRawCopy1D
-
-
-
-
Method Detail
-
copy
public static PrimitiveSeries copy(Access1D<?> template)
-
wrap
public static PrimitiveSeries wrap(Access1D<?> base)
-
add
public PrimitiveSeries add(double addend)
-
add
public PrimitiveSeries add(PrimitiveSeries addend)
-
copy
public PrimitiveSeries copy()
-
count
public long count()
Description copied from interface:Structure1DThe total number of elements in this structure.You only need to implement this method if the structure can contain more than Integer.MAX_VALUE elements.
- Specified by:
countin interfaceStructure1D
-
differences
public PrimitiveSeries differences()
period == 1
-
differences
public PrimitiveSeries differences(int period)
-
divide
public PrimitiveSeries divide(double divisor)
-
divide
public PrimitiveSeries divide(PrimitiveSeries divisor)
-
doubleValue
public double doubleValue(int index)
- Specified by:
doubleValuein interfaceAccess1D<java.lang.Double>
-
exp
public PrimitiveSeries exp()
-
get
public java.lang.Double get(int index)
-
get
public java.lang.Double get(long index)
-
log
public PrimitiveSeries log()
-
multiply
public PrimitiveSeries multiply(double multiplicand)
-
multiply
public PrimitiveSeries multiply(PrimitiveSeries multiplicand)
-
prune
public PrimitiveSeries prune(int shift)
A positive valued shift will prune that many elements off the head of the series. A negative valued shift will prune that many elements off the tail of the series.
-
quotients
public PrimitiveSeries quotients()
period == 1
-
quotients
public PrimitiveSeries quotients(int period)
-
runningProduct
public PrimitiveSeries runningProduct(double initialValue)
-
runningSum
public PrimitiveSeries runningSum(double initialValue)
-
size
public abstract int size()
Description copied from interface:Structure1DThe total number of elements in this structure.- Specified by:
sizein interfaceStructure1D
-
subtract
public PrimitiveSeries subtract(double subtrahend)
-
subtract
public PrimitiveSeries subtract(PrimitiveSeries subtrahend)
-
toDataSeries
public DataSeries toDataSeries()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
value
public abstract double value(int index)
-
values
public double[] values()
-
variances
public PrimitiveSeries variances(ScedasticityModel model)
Creates a series of variances from this series of values. Assumes there is a stationary mean, and then calculates the (possibly fluctuating) variance from that mean.
-
-