class Sequence

Sequence definition.

Inheritance:


Public Fields

[more]int n_real_frames
Real number of frames
[more]real** frames
Array of usable frame pointers.
[more]int n_frames
Number of visible frames
[more]int frame_size
Frame size

Public Methods

[more] Sequence()
Create an empty sequence
[more] Sequence(real** frames_, int n_frames_, int frame_size_)
Create a sequences of n_frames_ frames with size frame_size_.
[more] Sequence(int n_frames_, int frame_size_)
Create a sequence with n_frames_ standard frames of size frame_size
[more]void resize(int n_frames_, bool allocate_new_frames=true)
Resize the sequence to n_frames_.
[more]void addFrame(real* frame, bool do_copy=false)
Add a frame at the end of the Sequence.
[more]void add(Sequence* sequence, bool do_copy=false)
Add a sequence at the end of the Sequence.
[more]void copy(Sequence* from)
Copy the given sequence.
[more]void copyFrom(real* vec)
Copy a real vector in the full sequence.
[more]void copyTo(real* vec)
Copy the full sequence in a real vector.
[more]virtual int getSequenceSpace()
Get the space needed to allocate one Sequence
[more]virtual int getFramesSpace()
Get the space needed to allocate frames contained in the sequence
[more]virtual Sequence* clone(Allocator* allocator_=NULL, void* sequence_memory=NULL, void* frames_memory=NULL)
Clone the sequence.
[more]virtual void saveXFile(XFile* file)
Save the usable frames.
[more]virtual void loadXFile(XFile* file)
Load the usable frames.


Inherited from Object:

Public Fields

oAllocator* allocator

Public Methods

ovoid addOption(const char* name, int size, void* ptr, const char* help="")
ovoid addIOption(const char* name, int* ptr, int init_value, const char* help="")
ovoid addROption(const char* name, real* ptr, real init_value, const char* help="")
ovoid addBOption(const char* name, bool* ptr, bool init_value, const char* help="")
ovoid addOOption(const char* name, Object** ptr, Object* init_value, const char* help="")
ovoid setOption(const char* name, void* ptr)
ovoid setIOption(const char* name, int option)
ovoid setROption(const char* name, real option)
ovoid setBOption(const char* name, bool option)
ovoid setOOption(const char* name, Object* option)
ovoid load(const char* filename)
ovoid save(const char* filename)
ovoid* operator new(size_t size, Allocator* allocator_=NULL)
ovoid* operator new(size_t size, Allocator* allocator_, void* ptr_)
ovoid operator delete(void* ptr)


Documentation

Sequence definition. A sequence is a set of frames (that is, a vector) which have the same size.

oint n_real_frames
Real number of frames

oreal** 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.

oint n_frames
Number of visible frames

oint frame_size
Frame size

o Sequence()
Create an empty sequence

o 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.

o Sequence(int n_frames_, int frame_size_)
Create a sequence with n_frames_ standard frames of size frame_size

ovoid 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...

ovoid 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.

ovoid 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.

ovoid 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.

ovoid copyFrom(real* vec)
Copy a real vector in the full sequence. The sequence must have the good size!

ovoid copyTo(real* vec)
Copy the full sequence in a real vector. The sequence must have the good size!

ovirtual int getSequenceSpace()
Get the space needed to allocate one Sequence

ovirtual int getFramesSpace()
Get the space needed to allocate frames contained in the sequence

ovirtual 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().

ovirtual void saveXFile(XFile* file)
Save the usable frames. (n_frames available in frames).

ovirtual 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++.