NAME
get_target_signature - Gets target signature.
SYNOPSIS
#include "lsm/lsm_emd.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int get_target_signature
(
Signature **target_sig_ptr_ptr,
const int num_features
);
DESCRIPTION
This routine implements the creation/over-writing semantics used in
the KJB library in the case of signatures. If *target_sig_ptr_ptr
is NULL, then this routine creates the signature. If the target signature
is not NULL and is the correct size, then this routine does nothing
(recycles the memory). If the target signature is the wrong size, then it
is freed abd reallocated.
Distributions are stored in signatures which consist of an array of
features and a corresponding array of feature weights.
A "signature" is defined as follows:
| typedef struct Signature
{
int num_features; Number of features in the signature
Vector** feature_vec; Pointer to array of features
double* weights_vec; Pointer to array of feature weights
} Signature;
In the emd_lib.c module, a "feature" is simply a KJB Vector. All features
should have the same length.
Each feature in a signature has a corresponding weight indicating its relative
abundance in the distribution. All weights should sum to 1.
RETURNS
Either NO_ERROR, or ERROR, with an appropriate error message being set.
RELATED
free_signature, copy_signature, set_signature_features,
set_signature_weights, get_signature_from_RGB, get_clustered_data,
convert_spectrum_to_signature
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Lindsay Martin
DOCUMENTER
Lindsay Martin
SEE ALSO
get_earthmover_distance
,
euclidean_distance
,
free_signature
,
copy_signature
,
set_signature_features
,
set_signature_weights
,
get_target_signature_db