Handles the standard binary sequence format in Torch.
Inheritance:
Public Methods
-
IOBin(const char* filename_, bool one_file_is_one_sequence_=false, int max_load_=-1, bool is_sequential=true)
- Reads the sequence contained in filename.
-
static void saveSequence(XFile* file, Sequence* sequence)
- Saves sequence in file using the binary format
Public Fields
-
int n_sequences
-
int frame_size
Public Methods
-
virtual int getNumberOfFrames(int t)
-
virtual void getSequence(int t, Sequence* sequence)
-
virtual int getTotalNumberOfFrames()
Inherited from Object:
Public Fields
-
Allocator* allocator
Public Methods
-
void addOption(const char* name, int size, void* ptr, const char* help="")
-
void addIOption(const char* name, int* ptr, int init_value, const char* help="")
-
void addROption(const char* name, real* ptr, real init_value, const char* help="")
-
void addBOption(const char* name, bool* ptr, bool init_value, const char* help="")
-
void addOOption(const char* name, Object** ptr, Object* init_value, const char* help="")
-
void setOption(const char* name, void* ptr)
-
void setIOption(const char* name, int option)
-
void setROption(const char* name, real option)
-
void setBOption(const char* name, bool option)
-
void setOOption(const char* name, Object* option)
-
virtual void loadXFile(XFile* file)
-
virtual void saveXFile(XFile* file)
-
void load(const char* filename)
-
void save(const char* filename)
-
void* operator new(size_t size, Allocator* allocator_=NULL)
-
void* operator new(size_t size, Allocator* allocator_, void* ptr_)
-
void operator delete(void* ptr)
Documentation
Handles the standard binary sequence format in Torch.
The format is the following:
- Two int at the beginning of the file for the number of frames and the frame size
of the sequence in the file.
- After that, the sequence data, frame after frame. (frame_size real per row).
- IOBin(const char* filename_, bool one_file_is_one_sequence_=false, int max_load_=-1, bool is_sequential=true)
- Reads the sequence contained in filename.
If one_file_is_one_sequence is false, getSequence() will return one sequence
with one frame at each call. (If calling getSequence(t, foo),
it will put in the sequence foo the frame corresponding to the line t of the file).
Note also that if one_file_is_one_sequence is false, the access to the IO must be
sequential when calling getSequence() if is_sequential is true. (Sequential mode
is faster).
If max_load_ is positive, it loads only the first max_load_ frames,
if one_file_is_one_sequence is false.
The file will be opened when reading the first sequence, and closed when reading the
last one if is_sequential is true. Otherwise, the file will be opened and closed
each time you call getSequence().
- static void saveSequence(XFile* file, Sequence* sequence)
- Saves sequence in file using the binary format
- This class has no child classes.
- Author:
- Ronan Collobert (collober@idiap.ch)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.