Class JxnRealArraySample
- java.lang.Object
-
- JxnRealArraySample
-
public class JxnRealArraySample extends Object
Collection of static methods for taking samples from aJxnRealArrayAlgebra
instance.m
values of the input are represented by a single sample value in the output.Example m > 0: Input <----------------------->|<---- ... ---->|<------------------------> Index: 0 1 2 3 4 | 5 ... 44 | 45 46 47 48 49 Value: 0.2 0.4 0.6 0.8 1.0 | 1.2 ... 9.0 | 9.2 9.4 9.6 9.8 10.0 output for
m = 5:
Index: 0 1 2 3 4 5 6 7 8 9 Value: 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 from: 4 9 14 19 24 29 34 39 44 49 Input <------------------->|<----- ... ----->|<-------------------> Index: 0 1 2 3 | 4 ... 27 | 28 29 30 31 Time: 0:15 0:30 0:45 1:00 | 1:45 ... 7:00 | 7:15 7:30 7:45 8:00 output for
m = 4:
Index: 0 1 2 3 4 5 6 7 Time: 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00 from: 3 7 11 15 19 23 27 31 Example m < 0: Input |<----------------------->|<---- ... ---->|<------------------------> Index: 0 | 1 2 3 4 5 | 6 ... 45 | 46 47 48 49 50 Value: 0.0 | 0.2 0.4 0.6 0.8 1.0 | 1.2 ... 9.0 | 9.2 9.4 9.6 9.8 10.0 output for
m = -5:
Index: 0 1 2 3 4 5 6 7 8 9 10 Value: 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 from: 0 5 10 15 20 25 30 35 40 45 50 Input |<------------------->|<----- ... ----->|<-------------------> Index: 0 | 1 2 3 4 | 5 ... 28 | 29 30 31 32 Time: 0:00 | 0:15 0:30 0:45 1:00 | 1:45 ... 7:00 | 7:15 7:30 7:45 8:00 output for
m = -4:
Index: 0 1 2 3 4 5 6 7 8 Time: 0:00 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00 from: 0 4 8 12 16 20 24 28 32
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JxnRealArrayAlgebra
avgSample(JxnRealArrayAlgebra ra, int m)
Returns a new instance containing the average values of respective intervals.static JxnRealArrayAlgebra
maxSample(JxnRealArrayAlgebra ra, int m)
Returns a new instance containing the maximun values of respective intervals.static JxnRealArrayAlgebra
minMaxSample(JxnRealArrayAlgebra ra, int m)
Returns a new instance of alternating minimun and maximum values.static JxnRealArrayAlgebra
minSample(JxnRealArrayAlgebra ra, int m)
Returns a new instance containing the minimun values of respective intervals.static JxnRealArrayAlgebra
sample(JxnRealArrayAlgebra ra, int m)
Returns a new instance containing the samples.
-
-
-
Method Detail
-
sample
public static JxnRealArrayAlgebra sample(JxnRealArrayAlgebra ra, int m)
Returns a new instance containing the samples.
-
avgSample
public static JxnRealArrayAlgebra avgSample(JxnRealArrayAlgebra ra, int m)
Returns a new instance containing the average values of respective intervals.
-
minSample
public static JxnRealArrayAlgebra minSample(JxnRealArrayAlgebra ra, int m)
Returns a new instance containing the minimun values of respective intervals.
-
maxSample
public static JxnRealArrayAlgebra maxSample(JxnRealArrayAlgebra ra, int m)
Returns a new instance containing the maximun values of respective intervals.
-
minMaxSample
public static JxnRealArrayAlgebra minMaxSample(JxnRealArrayAlgebra ra, int m)
Returns a new instance of alternating minimun and maximum values.
-
-