Sequence definition.
Inheritance:
Public Fields
-
int n_real_frames
- Real number of frames
-
real** frames
- Array of usable frame pointers.
-
int n_frames
- Number of visible frames
-
int frame_size
- Frame size
Public Methods
-
Sequence()
- Create an empty sequence
-
Sequence(real** frames_, int n_frames_, int frame_size_)
- Create a sequences of n_frames_ frames with size frame_size_.
-
Sequence(int n_frames_, int frame_size_)
- Create a sequence with n_frames_ standard frames of size frame_size
-
void resize(int n_frames_, bool allocate_new_frames=true)
- Resize the sequence to n_frames_.
-
void addFrame(real* frame, bool do_copy=false)
- Add a frame at the end of the Sequence.
-
void add(Sequence* sequence, bool do_copy=false)
- Add a sequence at the end of the Sequence.
-
void copy(Sequence* from)
- Copy the given sequence.
-
void copyFrom(real* vec)
- Copy a real vector in the full sequence.
-
void copyTo(real* vec)
- Copy the full sequence in a real vector.
-
virtual int getSequenceSpace()
- Get the space needed to allocate one Sequence
-
virtual int getFramesSpace()
- Get the space needed to allocate frames contained in the sequence
-
virtual Sequence* clone(Allocator* allocator_=NULL, void* sequence_memory=NULL, void* frames_memory=NULL)
- Clone the sequence.
-
virtual void saveXFile(XFile* file)
- Save the usable frames.
-
virtual void loadXFile(XFile* file)
- Load the usable frames.
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)
-
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
Sequence definition.
A sequence is a set of frames (that is, a vector) which have the same size.
- int n_real_frames
- Real number of frames
- real** frames
- Array of usable frame pointers.
The actual size of this array is given by n_real_frames.
And the usable size is given by n_frames.
- int n_frames
- Number of visible frames
- int frame_size
- Frame size
- Sequence()
- Create an empty sequence
- Sequence(real** frames_, int n_frames_, int frame_size_)
- Create a sequences of n_frames_ frames with size frame_size_.
The frames are given by the frames_ array.
Nothing (except pointers!) will be copied.
- Sequence(int n_frames_, int frame_size_)
- Create a sequence with n_frames_ standard frames
of size frame_size
- void resize(int n_frames_, bool allocate_new_frames=true)
- Resize the sequence to n_frames_. Note that if n_frames_ is lower
than the previous one, the frames won't be deallocated, and can be retrieved
by another resize...
- void addFrame(real* frame, bool do_copy=false)
- Add a frame at the end of the Sequence.
If do_copy is true, copy the sequence.
Else, just copy the pointer.
- void add(Sequence* sequence, bool do_copy=false)
- Add a sequence at the end of the Sequence.
If do_copy is true, copy the frame contents.
Else, just copy the frame pointers.
- void copy(Sequence* from)
- Copy the given sequence.
The given sequence don't need to have the same structure.
But it must have the same total length.
- void copyFrom(real* vec)
- Copy a real vector in the full sequence.
The sequence must have the good size!
- void copyTo(real* vec)
- Copy the full sequence in a real vector.
The sequence must have the good size!
- virtual int getSequenceSpace()
- Get the space needed to allocate one Sequence
- virtual int getFramesSpace()
- Get the space needed to allocate frames contained in the sequence
- virtual Sequence* clone(Allocator* allocator_=NULL, void* sequence_memory=NULL, void* frames_memory=NULL)
- Clone the sequence.
If allocator_ is non-null, call it for all memory allocation and object initialization.
Else, the returned sequence will be destroyed when the original sequence will be destroyed.
If sequence_memory is non-null, puts the class memory-space in it; it must contain
the space given by getSequenceSpace().
If frames_memory is non-null, use the given memory for frames allocation; it must contain
the space given by getFramesSpace().
- virtual void saveXFile(XFile* file)
- Save the usable frames. (n_frames available in frames).
- virtual void loadXFile(XFile* file)
- Load the usable frames. (n_frames available in frames).
- 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++.