|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.io.RandomAccessFile
mnist.tools.MnistDbFile
mnist.tools.MnistImageFile
public class MnistImageFile
MNIST database image file. Contains additional header information for the number of rows and columns per each entry.
| Constructor Summary | |
|---|---|
MnistImageFile(java.lang.String name,
java.lang.String mode)
Creates new MNIST database image file ready for reading. |
|
| Method Summary | |
|---|---|
int |
getCols()
Number of columns per image. |
int |
getEntryLength()
Number of bytes for each entry. |
int |
getHeaderSize()
|
int |
getRows()
Number of rows per image. |
void |
nextImage()
Move the cursor to the next image. |
void |
prevImage()
Move the cursor to the previous image. |
int[][] |
readImage()
Reads the image at the current position. |
| Methods inherited from class mnist.tools.MnistDbFile |
|---|
getCount, getCurrentIndex, next, prev, setCurrentIndex |
| Methods inherited from class java.io.RandomAccessFile |
|---|
close, getChannel, getFD, getFilePointer, length, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seek, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MnistImageFile(java.lang.String name,
java.lang.String mode)
throws java.io.FileNotFoundException,
java.io.IOException
name - the system-dependent filenamemode - the access mode
java.io.IOException
java.io.FileNotFoundException| Method Detail |
|---|
public int[][] readImage()
throws java.io.IOException
java.io.IOException
public void nextImage()
throws java.io.IOException
java.io.IOException
public void prevImage()
throws java.io.IOException
java.io.IOExceptionpublic int getRows()
public int getCols()
public int getEntryLength()
MnistDbFile
getEntryLength in class MnistDbFilepublic int getHeaderSize()
getHeaderSize in class MnistDbFile
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||