Class SuanShuIntegration

java.lang.Object
io.deephaven.numerics.suanshu.SuanShuIntegration

public class SuanShuIntegration extends Object
Basic utility methods to convert Deephaven data-structures to Suanshu data-structures
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The abstract implementation of Matrix.
    static class 
    The abstract implementation of Vector.
    static class 
     
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(byte[]... byteColumnsData)
    Wraps byte[]... as Matrix This method assumes byteColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(double[]... doubleColumnsData)
    Wraps double[]... as Matrix This method assumes doubleColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(float[]... floatColumnsData)
    Wraps float[]... as Matrix.
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(int[]... intColumnsData)
    Wraps int[]... as Matrix This method assumes intColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(long[]... longColumnsData)
    Wraps long[]... as Matrix This method assumes longColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(short[]... shortColumnsData)
    Wraps short[]... as Matrix This method assumes shortColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(ByteVector... byteVectors)
    Wraps ByteVector...
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(DoubleVector... doubleVectors)
    Wraps DoubleVector...
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(FloatVector... floatVectors)
    Wraps FloatVector...
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(IntVector... intVectors)
    Wraps IntVector...
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(LongVector... longVectors)
    Wraps LongVector...
    static <T extends Vector>
    com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(ObjectVector<T> objectVector)
    Wraps ObjectVector...
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(ShortVector... shortVectors)
    Wraps ShortVector...
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(Vector... vectors)
    Wraps Vector...
    static com.numericalmethod.suanshu.matrix.doubles.Matrix
    ssMat(Number[]... numberColumnsData)
    Wrap Number[]...
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(byte[] bytes)
    Wraps byte[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(double[] doubles)
    Wraps double[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(float[] floats)
    Wraps float[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(int[] ints)
    Wraps int[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(long[] longs)
    Wraps long[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(short[] shorts)
    Wraps short[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(ByteVector byteVector)
    Wraps ByteVector instance as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(DoubleVector doubleVector)
    Wraps DoubleVector instance as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(FloatVector floatVector)
    Wraps FloatVector instance as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(IntVector intVector)
    Wraps IntVector instance as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(LongVector longVector)
    Wraps LongVector instance as Vector
    static <T extends Number>
    com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(ObjectVector<T> vector)
    Wraps ObjectVector as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(ShortVector shortVector)
    Wraps ShortVector instance as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(Byte... bytes)
    Wraps byte[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(Double... doubles)
    Wraps double[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(Float... floats)
    Wraps float[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(Integer... ints)
    Wraps int[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(Long... longs)
    Wraps long[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(Number... numbers)
    Wraps Number[] as Vector
    static com.numericalmethod.suanshu.vector.doubles.Vector
    ssVec(Short... shorts)
    Wraps short[] as Vector

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(ByteVector byteVector)
      Wraps ByteVector instance as Vector
      Parameters:
      byteVector - instance to wrap
      Returns:
      Immutable Vector backed by ByteVector
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(Byte... bytes)
      Wraps byte[] as Vector
      Parameters:
      bytes - array to wrap
      Returns:
      Immutable Vector backed by byte[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(byte[] bytes)
      Wraps byte[] as Vector
      Parameters:
      bytes - array to wrap
      Returns:
      Immutable Vector backed by byte[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(ShortVector shortVector)
      Wraps ShortVector instance as Vector
      Parameters:
      shortVector - instance to wrap
      Returns:
      Immutable Vector backed by ShortVector
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(Short... shorts)
      Wraps short[] as Vector
      Parameters:
      shorts - array to wrap
      Returns:
      Immutable Vector backed by short[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(short[] shorts)
      Wraps short[] as Vector
      Parameters:
      shorts - array to wrap
      Returns:
      Immutable Vector backed by short[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(IntVector intVector)
      Wraps IntVector instance as Vector
      Parameters:
      intVector - instance to wrap
      Returns:
      ImmutableVector backed by IntVector
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(int[] ints)
      Wraps int[] as Vector
      Parameters:
      ints - array to wrap
      Returns:
      Immutable Vector backed by int[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(Integer... ints)
      Wraps int[] as Vector
      Parameters:
      ints - array to wrap
      Returns:
      Immutable Vector backed by int[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(FloatVector floatVector)
      Wraps FloatVector instance as Vector
      Parameters:
      floatVector - instance to wrap
      Returns:
      Immutable Vector backed by FloatVector
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(Float... floats)
      Wraps float[] as Vector
      Parameters:
      floats - array to wrap
      Returns:
      Immutable Vector backed by float[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(float[] floats)
      Wraps float[] as Vector
      Parameters:
      floats - array to wrap
      Returns:
      Immutable Vector backed by float[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(LongVector longVector)
      Wraps LongVector instance as Vector
      Parameters:
      longVector - instance to wrap
      Returns:
      Immutable Vector backed by LongVector
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(Long... longs)
      Wraps long[] as Vector
      Parameters:
      longs - array to wrap
      Returns:
      Immutable Vector backed by long[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(long[] longs)
      Wraps long[] as Vector
      Parameters:
      longs - array to wrap
      Returns:
      Immutable Vector backed by long[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(DoubleVector doubleVector)
      Wraps DoubleVector instance as Vector
      Parameters:
      doubleVector - instance to wrap
      Returns:
      Immutable Vector backed by DoubleVector
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(Double... doubles)
      Wraps double[] as Vector
      Parameters:
      doubles - array to wrap
      Returns:
      Immutable Vector backed by double[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(double[] doubles)
      Wraps double[] as Vector
      Parameters:
      doubles - array to wrap
      Returns:
      Immutable Vector backed by double[]
    • ssVec

      public static com.numericalmethod.suanshu.vector.doubles.Vector ssVec(Number... numbers)
      Wraps Number[] as Vector
      Parameters:
      numbers - array to wrap
      Returns:
      Immutable Vector backed by Number[]
    • ssVec

      public static <T extends Number> com.numericalmethod.suanshu.vector.doubles.Vector ssVec(ObjectVector<T> vector)
      Wraps ObjectVector as Vector
      Type Parameters:
      T - type of elements in vector
      Parameters:
      vector - array to wrap
      Returns:
      Immutable Vector backed by ObjectVector
      Throws:
      RequirementFailure - if vector contains elements other than Number or any of its implementations.
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(ByteVector... byteVectors)
      Wraps ByteVector... as Matrix This method assumes byteVectors to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      byteVectors - array to wrap
      Returns:
      Immutable Matrix backed by ByteVector...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(byte[]... byteColumnsData)
      Wraps byte[]... as Matrix This method assumes byteColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      byteColumnsData - 2D array to wrap
      Returns:
      Immutable Matrix backed by byte[]...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(ShortVector... shortVectors)
      Wraps ShortVector... as Matrix This method assumes shortVectors to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      shortVectors - array to wrap
      Returns:
      Immutable Matrix backed by ShortVector...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(short[]... shortColumnsData)
      Wraps short[]... as Matrix This method assumes shortColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      shortColumnsData - 2D array to wrap
      Returns:
      Immutable Matrix backed by short[]...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(IntVector... intVectors)
      Wraps IntVector... as Matrix This method assumes intVectors to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      intVectors - array to wrap
      Returns:
      Immutable Matrix backed by IntVector...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(int[]... intColumnsData)
      Wraps int[]... as Matrix This method assumes intColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      intColumnsData - 2D array to wrap
      Returns:
      Immutable Matrix backed by int[]...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(FloatVector... floatVectors)
      Wraps FloatVector... as Matrix This method assumes floatVectors to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      floatVectors - array to wrap
      Returns:
      Immutable Matrix backed by FloatVector...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(float[]... floatColumnsData)
      Wraps float[]... as Matrix. This method assumes floatColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      floatColumnsData - 2D array to wrap
      Returns:
      Immutable Matrix backed by float[]...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(LongVector... longVectors)
      Wraps LongVector... as Matrix This method assumes longVectors to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      longVectors - array to wrap
      Returns:
      Immutable Matrix backed by LongVector...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(long[]... longColumnsData)
      Wraps long[]... as Matrix This method assumes longColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      longColumnsData - 2D array to wrap
      Returns:
      Immutable Matrix backed by long[]...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(DoubleVector... doubleVectors)
      Wraps DoubleVector... as Matrix This method assumes doubleVectors to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      doubleVectors - array to wrap
      Returns:
      Immutable Matrix backed by DoubleVector...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(double[]... doubleColumnsData)
      Wraps double[]... as Matrix This method assumes doubleColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      doubleColumnsData - 2D array to wrap
      Returns:
      Immutable Matrix backed by double[]...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(Number[]... numberColumnsData)
      Wrap Number[]... as Matrix This method assumes numberColumnsData to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      numberColumnsData - 2D array to wrap
      Returns:
      Immutable Matrix backed by Number[]...
    • ssMat

      public static com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(Vector... vectors)
      Wraps Vector... as Matrix This method assumes vectors to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Parameters:
      vectors - array to wrap
      Returns:
      Immutable Matrix backed by Vector...
      Throws:
      UnsupportedOperationException - if any of the arrays in vectors does not belong to {ByteVector, ShortVector, IntVector, FloatVector, LongVector, DoubleVector, ObjectVector<? extends Number>}
    • ssMat

      public static <T extends Vector> com.numericalmethod.suanshu.matrix.doubles.Matrix ssMat(ObjectVector<T> objectVector)
      Wraps ObjectVector... as Matrix This method assumes dhVector to be in unconventional [columns][rows] structure, where first dimension denotes columns and second dimension denotes rows.
      Type Parameters:
      T - - type of elements in dhVector
      Parameters:
      objectVector - vector to wrap
      Returns:
      Immutable Matrix backed by ObjectVector...
      Throws:
      UnsupportedOperationException - if any of the vectors in objectVector does not belong to {ByteVector, ShortVector, IntVector, FloatVector, LongVector, DoubleVector, ObjectVector<? extends Number>}