Class VQ

java.lang.Object
org.xiph.speex.VQ

public class VQ extends Object
Vector Quantization.
Version:
$Revision: 1.2 $
Author:
Marc Gimpel, Wimba S.A. (mgimpel@horizonwimba.com)
  • Constructor Summary

    Constructors
    Constructor
    Description
    VQ()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static final int
    index(float[] in, float[] codebook, int len, int entries)
    Finds the index of the entry in a codebook that best matches the input.
    static final int
    index(float in, float[] codebook, int entries)
    Finds the index of the entry in a codebook that best matches the input.
    static final void
    nbest(float[] in, int offset, float[] codebook, int len, int entries, float[] E, int N, int[] nbest, float[] best_dist)
    Finds the indices of the n-best entries in a codebook
    static final void
    nbest_sign(float[] in, int offset, float[] codebook, int len, int entries, float[] E, int N, int[] nbest, float[] best_dist)
    Finds the indices of the n-best entries in a codebook with sign

    Methods inherited from class java.lang.Object

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

    • VQ

      public VQ()
  • Method Details

    • index

      public static final int index(float in, float[] codebook, int entries)
      Finds the index of the entry in a codebook that best matches the input.
      Parameters:
      in - - the value to compare.
      codebook - - the list of values to search through for the best match.
      entries - - the size of the codebook.
      Returns:
      the index of the entry in a codebook that best matches the input.
    • index

      public static final int index(float[] in, float[] codebook, int len, int entries)
      Finds the index of the entry in a codebook that best matches the input.
      Parameters:
      in - - the vector to compare.
      codebook - - the list of values to search through for the best match.
      len - - the size of the vector.
      entries - - the size of the codebook.
      Returns:
      the index of the entry in a codebook that best matches the input.
    • nbest

      public static final void nbest(float[] in, int offset, float[] codebook, int len, int entries, float[] E, int N, int[] nbest, float[] best_dist)
      Finds the indices of the n-best entries in a codebook
      Parameters:
      in -
      offset -
      codebook -
      len -
      entries -
      E -
      N -
      nbest -
      best_dist -
    • nbest_sign

      public static final void nbest_sign(float[] in, int offset, float[] codebook, int len, int entries, float[] E, int N, int[] nbest, float[] best_dist)
      Finds the indices of the n-best entries in a codebook with sign
      Parameters:
      in -
      offset -
      codebook -
      len -
      entries -
      E -
      N -
      nbest -
      best_dist -