Objects
Author:
Andrea Vedaldi

Many VLFeat algorithms are available in the form of *objects*. The C language, used by VLFeat, does not support objects explicitly. Here an object is intended a C structure along with a number of functions (the object member functions or methods) operating on it. Ideally, the object data structure is kept opaque to the user, for example by defining it in the .c implementation files which are not accessible to the library user.

Object names are capitalized and start with the Vl prefix (for example VlExampleObject). Object methods are lowercase and start with the vl_<object_name>_ suffix (e.g. vl_example_object_new).

Object lifecycle

Conceptually, an object undergoes four phases during its lifecycle: allocation, initialization, finalization, and deallocation:

In practice, most VlFeat object are supposed to be created on the heap. To this end, allocation/initialization and finalization/deallocation are combined into two operations:

Getters and setters

Most objects contain a number of methods to get (getters) and set (setters) properties. These should contain the get and set keywords in their name, for example

double x = vl_example_object_get_property () ;
vl_example_object_set_property(x) ;


libvlfeat
Author(s): Andrea Vedaldi
autogenerated on Thu Jun 6 2019 20:25:52