Class ResultDecoders


  • public class ResultDecoders
    extends java.lang.Object
    This class offers conversion functions from a byte[] to some encoded data structure therein. They are to be used in a Stream.map(Function) call to the stream returned by StdioBridge.receive() or one of the sendAndReceive() methods.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.function.Function<byte[],​double[][]> decodeVectors
      This decode converts a byte array into an array of double vectors.
    • Constructor Summary

      Constructors 
      Constructor Description
      ResultDecoders()  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • decodeVectors

        public static java.util.function.Function<byte[],​double[][]> decodeVectors
        This decode converts a byte array into an array of double vectors. The format of the byte array is required to look the following:
        1. The first 4 bytes must represent an integer that indicates the number of vectors (double arrays) returned
        2. The bytes 5 to 8 must represent an integer that indicates the length of each vector (the length must be uniform)
        3. The rest of the bytes must represent doubles that fit in number to the above described dimensions
    • Constructor Detail

      • ResultDecoders

        public ResultDecoders()