Class IDX


  • public abstract class IDX
    extends java.lang.Object
    Reads IDX-files as described at THE MNIST DATABASE page. The elements/pixels/bytes are written to the ArrayAnyD instance in order as they're read from the file. The indexing order then needs to be reversed, and that causes the images to be transposed.
    • Constructor Detail

      • IDX

        public IDX()
    • Method Detail

      • parse

        public static ArrayAnyD<java.lang.Double> parse​(java.io.File filePath)
      • parse

        public static ArrayAnyD<java.lang.Double> parse​(java.lang.String filePath)
      • parse

        public static ArrayAnyD<java.lang.Double> parse​(java.lang.String filePath,
                                                        DenseArray.Factory<java.lang.Double> arrayFactory)
      • print

        public static void print​(Access2D<?> image,
                                 BasicLogger printer,
                                 boolean transpose)
      • print

        public static void print​(Access2D<?> image,
                                 BasicLogger printer,
                                 boolean transpose,
                                 double maxExpectedValue)
      • printPixel

        private static void printPixel​(double gray,
                                       BasicLogger printer,
                                       double oneThird,
                                       double twoThirds)