Package llnl.gnem.core.signalprocessing
Class Sequence
java.lang.Object
llnl.gnem.core.signalprocessing.Sequence
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
abs()
Replaces each point in the data array with its absolute valuestatic void
alias
(double[][] src, double[][] dst) static void
alias
(double[] src, double[] dst) static void
alias
(float[][] src, float[][] dst) static void
alias
(float[] src, float[] dst) alias
(int N) Treat the Sequences as vector and calculate the cross product of this Sequence (A) with another (B)static void
cshift
(double[][] x, int shift) static void
cshift
(double[] x, int shift) static void
cshift
(float[][] x, int shift) static void
cshift
(float[] x, int shift) void
cshift
(int shift) boolean
cut
(int i1, int i2) static void
decimate
(double[][] x, double[][] y, int decrate) static void
decimate
(double[] x, double[] y, int decrate) static void
decimate
(float[][] x, float[][] y, int decrate) static void
decimate
(float[] x, float[] y, int decrate) void
decimate
(int factor) void
dftAlias
(int factor) void
static Sequence
void
Replaces each point in the data array with its value divided by the equivalent value in another Sequence result[i] = orig[i]/othersequence[i]float
Takes the dot product between this Sequence and another Sequence objectfloat
extremum()
int
float
get
(int n) float[]
getArray()
int
length()
void
log()
Replace each element in a sequence with it's natural log valuevoid
log10()
Replace each element in a sequence with it's log10 valuefloat
max()
float
mean()
float
min()
void
static double[][]
pad
(double[][] x, int n) static double[]
pad
(double[] x, int n) static float[][]
pad
(float[][] x, int n) static float[]
pad
(float[] x, int n) void
pad_to
(int newlength) void
Replaces each point in the data array with its value plus the equivalent value in another Sequence result[i] = orig[i] + othersequence[i]void
power
(double value) raise each of the values of the sequence to a powervoid
power
(int value) raise each of the values of the sequence to itsvoid
print
(PrintStream ps) void
reverse()
void
rmean()
void
scaleBy
(float a) void
set
(int i, float f) void
setConstant
(float c) void
signedPower
(double value) Convert each element to the signed power(or root) Raise each Sequence element to a power, then multiply by the original signvoid
signum()
change to Sequence to its signum sequence : +-1 or 0void
sqr()
Replaces each point in the data array with its square valuevoid
sqrt()
Replaces each point in the data array with its square rootvoid
stretch
(int factor) static void
window
(double[][] x, int src, double[][] w, double[][] y, int dst) static void
window
(double[] x, int src, double[] w, double[] y, int dst) static void
window
(float[][] x, int src, float[][] w, float[][] y, int dst) static void
window
(float[] x, int src, float[] w, float[] y, int dst) void
zero()
static void
zero
(double[] x) static void
zero
(double[][] x) static void
zero
(float[] x) static void
zero
(float[][] x) protected void
zero
(float[] s, int start, int duration) static void
zshift
(double[][] x, int shift) static void
zshift
(double[] x, int shift) static void
zshift
(float[][] x, int shift) static void
zshift
(float[] x, int shift) void
zshift
(int shift)
-
Constructor Details
-
Sequence
public Sequence(int n) -
Sequence
public Sequence() -
Sequence
public Sequence(int n, float value) -
Sequence
public Sequence(float[] v) -
Sequence
public Sequence(double[] v) -
Sequence
-
-
Method Details
-
get
public float get(int n) -
getArray
public float[] getArray() -
length
public int length() -
min
public float min() -
max
public float max() -
extremum
public float extremum() -
extremumIndex
public int extremumIndex() -
mean
public float mean() -
rmean
public void rmean() -
zero
public void zero() -
scaleBy
public void scaleBy(float a) -
reverse
public void reverse() -
zshift
public void zshift(int shift) -
zshift
public static void zshift(float[] x, int shift) -
zshift
public static void zshift(double[] x, int shift) -
zshift
public static void zshift(float[][] x, int shift) -
zshift
public static void zshift(double[][] x, int shift) -
cshift
public void cshift(int shift) -
cshift
public static void cshift(float[] x, int shift) -
cshift
public static void cshift(double[] x, int shift) -
cshift
public static void cshift(float[][] x, int shift) -
cshift
public static void cshift(double[][] x, int shift) -
window
-
window
public static void window(float[] x, int src, float[] w, float[] y, int dst) -
window
public static void window(double[] x, int src, double[] w, double[] y, int dst) -
window
public static void window(float[][] x, int src, float[][] w, float[][] y, int dst) -
window
public static void window(double[][] x, int src, double[][] w, double[][] y, int dst) -
alias
-
alias
public static void alias(float[] src, float[] dst) -
alias
public static void alias(double[] src, double[] dst) -
alias
public static void alias(float[][] src, float[][] dst) -
alias
public static void alias(double[][] src, double[][] dst) -
stretch
public void stretch(int factor) -
decimate
public void decimate(int factor) -
decimate
public static void decimate(float[] x, float[] y, int decrate) -
decimate
public static void decimate(double[] x, double[] y, int decrate) -
decimate
public static void decimate(float[][] x, float[][] y, int decrate) -
decimate
public static void decimate(double[][] x, double[][] y, int decrate) -
cut
public boolean cut(int i1, int i2) -
minusEquals
-
plusEquals
Replaces each point in the data array with its value plus the equivalent value in another Sequence result[i] = orig[i] + othersequence[i]- Parameters:
S
- - the other Sequence
-
divideBy
Replaces each point in the data array with its value divided by the equivalent value in another Sequence result[i] = orig[i]/othersequence[i]- Parameters:
S
- - the other Sequence object
-
cross
Treat the Sequences as vector and calculate the cross product of this Sequence (A) with another (B)- Parameters:
B
- another vector as a Sequence object- Returns:
- the cross product (AxB)
-
dotprod
Takes the dot product between this Sequence and another Sequence object- Parameters:
S
- - the other Sequence object- Returns:
- the float result of the dot product
-
abs
public void abs()Replaces each point in the data array with its absolute value -
sqr
public void sqr()Replaces each point in the data array with its square value -
sqrt
public void sqrt()Replaces each point in the data array with its square root -
log10
public void log10()Replace each element in a sequence with it's log10 value -
log
public void log()Replace each element in a sequence with it's natural log value -
power
public void power(double value) raise each of the values of the sequence to a power- Parameters:
value
- --> seq^value each element will be raised to the power (value) e.g. value= 2 squares the sequence value = 0.5 takes a square root
-
power
public void power(int value) raise each of the values of the sequence to its- Parameters:
value
- --> seq^value each element will be raised to the power (value) e.g. value= 2 squares the sequence value = 0.5 takes a square root
-
signum
public void signum()change to Sequence to its signum sequence : +-1 or 0 -
signedPower
public void signedPower(double value) Convert each element to the signed power(or root) Raise each Sequence element to a power, then multiply by the original sign- Parameters:
value
- - the power e.g. 2 == square, .5 == square root
-
pad_to
public void pad_to(int newlength) -
dftConjugate
public void dftConjugate() -
dftprod
-
dftAlias
public void dftAlias(int factor) -
pad
public static float[] pad(float[] x, int n) -
pad
public static double[] pad(double[] x, int n) -
pad
public static float[][] pad(float[][] x, int n) -
pad
public static double[][] pad(double[][] x, int n) -
print
-
set
public void set(int i, float f) -
setConstant
public void setConstant(float c) -
zero
protected void zero(float[] s, int start, int duration) -
zero
public static void zero(float[] x) -
zero
public static void zero(double[] x) -
zero
public static void zero(float[][] x) -
zero
public static void zero(double[][] x)
-