Handles the standard Ascii sequence format in Torch.
Inheritance:
Public Methods
-
IOAscii(const char* filename_, bool one_file_is_one_sequence_=false, int max_load_=-1)
- Reads the sequence contained in filename.
-
static void saveSequence(XFile* file, Sequence* sequence)
- Saves one sequence in file using the ascii 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 Ascii sequence format in Torch.
The format is the following:
- First line should contain the number of frames and the frame size (two int
separated by a space) of the file.
- Next lines are frames of the sequence. One frame is one line. (number_of_columns real
at each line, separated by a space).
- IOAscii(const char* filename_, bool one_file_is_one_sequence_=false, int max_load_=-1)
- 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 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.
- static void saveSequence(XFile* file, Sequence* sequence)
- Saves one sequence in file using the ascii 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++.