aib.h
Go to the documentation of this file.00001 00007 /* AUTORIGHTS 00008 Copyright 2007 (c) Andrea Vedaldi and Brian Fulkerson 00009 00010 This file is part of VLFeat, available in the terms of the GNU 00011 General Public License version 2. 00012 */ 00013 00014 #ifndef VL_AIB_H 00015 #define VL_AIB_H 00016 00017 #include "generic.h" 00018 00036 typedef struct _VlAIB 00037 { 00038 vl_uint *nodes ; 00039 vl_uint nentries ; 00040 double *beta ; 00041 vl_uint *bidx ; 00044 vl_uint *which ; 00045 vl_uint nwhich ; 00047 double *Pcx; 00048 double *Px; 00049 double *Pc; 00050 vl_uint nvalues; 00051 vl_uint nlabels; 00053 vl_uint *parents; 00054 double *costs; 00055 } VlAIB; 00056 00061 VL_EXPORT 00062 VlAIB * vl_aib_new(double * Pcx, vl_uint nvalues, vl_uint nlabels); 00063 00064 VL_EXPORT 00065 void vl_aib_delete (VlAIB * aib); 00066 00072 VL_EXPORT 00073 void vl_aib_process(VlAIB * aib); 00074 00080 VL_INLINE vl_uint * vl_aib_get_parents(VlAIB const * aib); 00081 VL_INLINE double * vl_aib_get_costs(VlAIB const * aib); 00082 00086 /* ------------------------------------------------------------------- 00087 * Inline functions implementation 00088 * ---------------------------------------------------------------- */ 00089 00095 VL_INLINE 00096 vl_uint * vl_aib_get_parents(VlAIB const * aib) 00097 { 00098 return aib->parents; 00099 } 00100 00101 00107 VL_INLINE 00108 double * vl_aib_get_costs(VlAIB const * aib) 00109 { 00110 return aib->costs; 00111 } 00112 00113 /* VL_AIB_H */ 00114 #endif