Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Emd.h

00001 #ifndef _EMD_H_
00002 #define _EMD_H_
00003 /*****************************************************************************/
00004 #include <stdio.h>
00005 #include <math.h>
00006 #define MAX_SIG_SIZE   1000
00007 #define MAX_ITERATIONS 500
00008 #define INFINITY       1e20
00009 #define EPSILON        1e-20
00010 /*****************************************************************************/
00011 
00012 #include <newmat.h>
00013 typedef ColumnVector * feature_t;
00014 
00015 /*****************************************************************************/
00016 
00017 typedef struct
00018 {
00019   int n;                /* Number of features in the signature */
00020   feature_t *Features;  /* Pointer to the features vector */
00021   double *Weights;       /* Pointer to the weights of the features */
00022 } signature_t;
00023 
00024 
00025 typedef struct
00026 {
00027   int from;             /* Feature number in signature 1 */
00028   int to;               /* Feature number in signature 2 */
00029   double amount;         /* Amount of flow from "from" to "to" */
00030 } flow_t;
00031 
00032 
00033 
00034 double emd(signature_t *Signature1, signature_t *Signature2,
00035           float (*func)(feature_t *, feature_t *),
00036           flow_t *Flow, int *FlowSize);
00037 
00038 #endif

Generated on Sat Nov 13 11:21:23 2004 for Noisy DAG Matcher by doxygen1.2.18