Class Sequence

java.lang.Object
llnl.gnem.core.signalprocessing.Sequence

public class Sequence extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Sequence(double[] v)
     
    Sequence(float[] v)
     
    Sequence(int n)
     
    Sequence(int n, float value)
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    abs()
    Replaces each point in the data array with its absolute value
    static 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
    dftprod(Sequence x, Sequence y, float c)
     
    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 object
    float
     
    int
     
    float
    get(int n)
     
    float[]
     
    int
     
    void
    log()
    Replace each element in a sequence with it's natural log value
    void
    Replace each element in a sequence with it's log10 value
    float
    max()
     
    float
     
    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 power
    void
    power(int value)
    raise each of the values of the sequence to its
    void
     
    void
     
    void
     
    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 sign
    void
    change to Sequence to its signum sequence : +-1 or 0
    void
    sqr()
    Replaces each point in the data array with its square value
    void
    Replaces each point in the data array with its square root
    void
    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)
     
    window(int start, Sequence window)
     
    void
     
    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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public Sequence(Sequence S)
  • 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

      public Sequence window(int start, Sequence 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

      public Sequence alias(int N)
    • 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

      public void minusEquals(Sequence S)
    • plusEquals

      public void plusEquals(Sequence S)
      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

      public void divideBy(Sequence S)
      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

      public Sequence cross(Sequence B)
      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

      public float dotprod(Sequence S)
      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

      public static Sequence dftprod(Sequence x, Sequence y, float c)
    • 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

      public void print(PrintStream ps)
    • 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)