de.sciss.strugatzki.impl

MathUtil

object MathUtil

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MathUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def avg(b: Array[Float], off: Int, len: Int): Float

    Calculates the mean of a vector

    Calculates the mean of a vector

    b

    the vector

    off

    the offset into the vector

    len

    the number of samples to take into account

    returns

    the average of the len samples starting at offset off in vector b.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def correlate(a: Array[Array[Float]], aMean: Double, aStdDev: Double, numFrames: Int, numChannels: Int, b: Array[Array[Float]], bMean: Double, bStdDev: Double, bFrameOff: Int, bChanOff: Int): Float

    Perform cross correlation between two matrices a and b.

    Perform cross correlation between two matrices a and b. Because either a or b may be static, the method expects the means and standard deviations of matrices to be passed in.

    While a is considered a full matrix with at least numChannels rows and at least numFrames columns, offset can be given for the b matrix.

    For efficiency reasons, b may be updated in a rotational manner, thus bFrame + frameLen may exceed the number of frames in b. The algorithm automatically takes the modulus bFrame + frameLen % b.numFrames as offset when doing the calculations.

    a

    the first matrix

    aMean

    the mean of the samples in a

    aStdDev

    the standard deviation of the samples in a

    numFrames

    the number of columns in a, also the number of columns considered in the correlation

    numChannels

    the number of rows in a, also the number of rows considered in the correlation

    b

    the second matrix

    bMean

    the mean of the samples in b

    bStdDev

    the standard deviation of the samples in b

    bFrameOff

    frame or column offset in b

    bChanOff

    channel or row offset in b

    returns

    the cross correlation coefficient

  10. def correlateHalf(numChannels: Int, halfWinSize: Int, a: Array[Array[Float]], frameOff: Int, chanOff: Int): Float

    Perform cross correlation between two horizontal halves of a matrix 'a'.

    Perform cross correlation between two horizontal halves of a matrix 'a'.

    For efficiency reasons, a may be updated in a rotational manner, thus frameOff + halfWinSize may exceed the number of frames in a (the algorithm automatically takes the modulus).

    numChannels

    the number of channels or rows to process in the matrix

    halfWinSize

    half of the number of frames or columns in the matrix. The algorithm performs a cross correlation between the first half frame beginning at offset frameOff and the second half beginning at frameOff + halfWinSize (possibly wrapped around the array boundaries)

    a

    the matrix to analyse

    chanOff

    the channel or row offset in the matrix

    returns

    the cross correlation coefficient (sum of cell multiplies, divided by product of variance and matrix size)

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def normalize(normBuf: Array[Array[Float]], b: Array[Array[Float]], bOff: Int, bLen: Int): Unit

    Normalizes a matrix with respect to a normalization vector.

    Normalizes a matrix with respect to a normalization vector. For each row in the matrix, given the rows minimum and maximum value through the normalization vector, every cell is offset by -minimum and then divided by maximum - minimum.

    normBuf

    provides normalization vector. The outer array must be of size b.length. each element of that outer array holds an array of size 2, specifying minimum and maximum value for the index. The normBuf argument may be null, in which case this method simply returns without any adjustments.

    b

    the matrix which is normalized in-place (the values are scaled and overwritten).

    bOff

    a frame of column offset in the matrix b.

    bLen

    the number of frames or columns to process in the matrix b.

  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. def stat(mat: Array[Array[Float]], frameOff: Int, frameLen: Int, chanOff: Int, chanLen: Int): (Double, Double)

    Calculates the mean and standard deviation of a given matrix

    Calculates the mean and standard deviation of a given matrix

    mat

    the matrix to analyse

    frameOff

    0 if the whole matrix is to be considered, otherwise column offset

    frameLen

    the number of columns to analyse

    chanOff

    0 if the whole matrix is to be considered, otherwise row offset

    chanLen

    the number of rows to analyse

    returns

    the tuple (mean, stddev)

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(): String

    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped