SVM Dataset - Definition. More...
#include "svmdataset.h"
#include <string.h>
#include <math.h>
#include "svmdataset.c"
#include "float.th"
Go to the source code of this file.
Classes | |
struct | VlSvmDataset_ |
Defines | |
#define | FLT VL_TYPE_FLOAT |
#define | FLT VL_TYPE_DOUBLE |
#define | VL_SVMDATASET_INSTANTIATING |
#define | VL_SVMDATASET_INSTANTIATING |
Functions | |
void | vl_svmdataset_delete (VlSvmDataset *self) |
Delete the object. | |
VlSvmAccumulateFunction | vl_svmdataset_get_accumulate_function (VlSvmDataset const *self) |
Get the accumulate function. | |
void * | vl_svmdataset_get_data (VlSvmDataset const *self) |
Get the wrapped data. | |
vl_size | vl_svmdataset_get_dimension (VlSvmDataset const *self) |
Get the dimension of the wrapped data. | |
VlHomogeneousKernelMap * | vl_svmdataset_get_homogeneous_kernel_map (VlSvmDataset const *self) |
Get the homogeneous kernel map object. | |
VlSvmInnerProductFunction | vl_svmdataset_get_inner_product_function (VlSvmDataset const *self) |
Get the inner product function. | |
vl_size | vl_svmdataset_get_num_data (VlSvmDataset const *self) |
Get the number of wrapped data elements. | |
VlSvmDataset * | vl_svmdataset_new (vl_type dataType, void *data, vl_size dimension, vl_size numData) |
Create a new object wrapping a dataset. | |
void | vl_svmdataset_set_homogeneous_kernel_map (VlSvmDataset *self, VlHomogeneousKernelMap *hom) |
Set the homogeneous kernel map object. | |
double | VL_XCAT (_vl_svmdataset_inner_product_, SFX) |
void | VL_XCAT (vl_svmdataset_accumulate_, SFX) |
double | VL_XCAT (_vl_svmdataset_inner_product_hom_, SFX) |
void | VL_XCAT (vl_svmdataset_accumulate_hom_, SFX) |
SVM Dataset - Definition.
Definition in file svmdataset.c.
#define FLT VL_TYPE_FLOAT |
Definition at line 119 of file svmdataset.c.
#define FLT VL_TYPE_DOUBLE |
Definition at line 119 of file svmdataset.c.
#define VL_SVMDATASET_INSTANTIATING |
Definition at line 120 of file svmdataset.c.
#define VL_SVMDATASET_INSTANTIATING |
Definition at line 120 of file svmdataset.c.
void vl_svmdataset_delete | ( | VlSvmDataset * | self | ) |
Delete the object.
self | object to delete. |
The function frees the resources allocated by vl_svmdataset_new(). Notice that the wrapped data will *not* be freed as it is not owned by the object.
Definition at line 164 of file svmdataset.c.
VlSvmAccumulateFunction vl_svmdataset_get_accumulate_function | ( | VlSvmDataset const * | self | ) |
Get the accumulate function.
self | object. |
Definition at line 260 of file svmdataset.c.
void* vl_svmdataset_get_data | ( | VlSvmDataset const * | self | ) |
Get the wrapped data.
self | object. |
Definition at line 179 of file svmdataset.c.
vl_size vl_svmdataset_get_dimension | ( | VlSvmDataset const * | self | ) |
Get the dimension of the wrapped data.
self | object. |
Definition at line 201 of file svmdataset.c.
VlHomogeneousKernelMap* vl_svmdataset_get_homogeneous_kernel_map | ( | VlSvmDataset const * | self | ) |
Get the homogeneous kernel map object.
self | object. |
NULL
if any). Definition at line 215 of file svmdataset.c.
Get the inner product function.
self | object. |
Definition at line 291 of file svmdataset.c.
vl_size vl_svmdataset_get_num_data | ( | VlSvmDataset const * | self | ) |
Get the number of wrapped data elements.
self | object. |
Definition at line 190 of file svmdataset.c.
VlSvmDataset* vl_svmdataset_new | ( | vl_type | dataType, |
void * | data, | ||
vl_size | dimension, | ||
vl_size | numData | ||
) |
Create a new object wrapping a dataset.
dataType | of data (float and double supported). |
data | pointer to the data. |
dimension | the dimension of a data vector. |
numData | number of wrapped data vectors. |
The function allocates and returns a new SVM dataset object wrapping the data pointed by data. Note that no copy is made of data, so the caller should keep the data allocated as the object exists.
Definition at line 138 of file svmdataset.c.
void vl_svmdataset_set_homogeneous_kernel_map | ( | VlSvmDataset * | self, |
VlHomogeneousKernelMap * | hom | ||
) |
Set the homogeneous kernel map object.
self | object. |
hom | homogeneous kernel map object to use. |
After changing the kernel map, the inner product and accumulator function should be queried again (vl_svmdataset_get_inner_product_function adn vl_svmdataset_get_accumulate_function).
Set this to NULL
to avoid using a kernel map.
Note that this does *not* transfer the ownership of the object to the function. Furthermore, VlSvmDataset holds to the object until it is destroyed or the object is replaced or removed by calling this function again.
Definition at line 238 of file svmdataset.c.
Definition at line 330 of file svmdataset.c.
Definition at line 344 of file svmdataset.c.
Definition at line 358 of file svmdataset.c.
Definition at line 381 of file svmdataset.c.