Class ArrayUtils

java.lang.Object
com.redis.vl.utils.ArrayUtils

public class ArrayUtils extends Object
Utility class for array conversions.
  • Method Details

    • floatArrayToBytes

      public static byte[] floatArrayToBytes(float[] floats)
      Convert float array to byte array using little-endian byte order.
      Parameters:
      floats - The float array to convert
      Returns:
      The byte array representation
    • bytesToFloatArray

      public static float[] bytesToFloatArray(byte[] bytes)
      Convert byte array to float array using little-endian byte order.
      Parameters:
      bytes - The byte array to convert
      Returns:
      The float array representation
    • doubleArrayToFloats

      public static float[] doubleArrayToFloats(double[] doubles)
      Convert double array to float array.
      Parameters:
      doubles - The double array to convert
      Returns:
      The float array representation