Package llnl.gnem.core.signalprocessing
Class Sequence
java.lang.Object
llnl.gnem.core.signalprocessing.Sequence
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabs()Replaces each point in the data array with its absolute valuestatic voidalias(double[][] src, double[][] dst) static voidalias(double[] src, double[] dst) static voidalias(float[][] src, float[][] dst) static voidalias(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 voidcshift(double[][] x, int shift) static voidcshift(double[] x, int shift) static voidcshift(float[][] x, int shift) static voidcshift(float[] x, int shift) voidcshift(int shift) booleancut(int i1, int i2) static voiddecimate(double[][] x, double[][] y, int decrate) static voiddecimate(double[] x, double[] y, int decrate) static voiddecimate(float[][] x, float[][] y, int decrate) static voiddecimate(float[] x, float[] y, int decrate) voiddecimate(int factor) voiddftAlias(int factor) voidstatic SequencevoidReplaces each point in the data array with its value divided by the equivalent value in another Sequence result[i] = orig[i]/othersequence[i]floatTakes the dot product between this Sequence and another Sequence objectfloatextremum()intfloatget(int n) float[]getArray()intlength()voidlog()Replace each element in a sequence with it's natural log valuevoidlog10()Replace each element in a sequence with it's log10 valuefloatmax()floatmean()floatmin()voidstatic 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) voidpad_to(int newlength) voidReplaces each point in the data array with its value plus the equivalent value in another Sequence result[i] = orig[i] + othersequence[i]voidpower(double value) raise each of the values of the sequence to a powervoidpower(int value) raise each of the values of the sequence to itsvoidprint(PrintStream ps) voidreverse()voidrmean()voidscaleBy(float a) voidset(int i, float f) voidsetConstant(float c) voidsignedPower(double value) Convert each element to the signed power(or root) Raise each Sequence element to a power, then multiply by the original signvoidsignum()change to Sequence to its signum sequence : +-1 or 0voidsqr()Replaces each point in the data array with its square valuevoidsqrt()Replaces each point in the data array with its square rootvoidstretch(int factor) static voidwindow(double[][] x, int src, double[][] w, double[][] y, int dst) static voidwindow(double[] x, int src, double[] w, double[] y, int dst) static voidwindow(float[][] x, int src, float[][] w, float[][] y, int dst) static voidwindow(float[] x, int src, float[] w, float[] y, int dst) voidzero()static voidzero(double[] x) static voidzero(double[][] x) static voidzero(float[] x) static voidzero(float[][] x) protected voidzero(float[] s, int start, int duration) static voidzshift(double[][] x, int shift) static voidzshift(double[] x, int shift) static voidzshift(float[][] x, int shift) static voidzshift(float[] x, int shift) voidzshift(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)
-