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 #include "mathop.h" 00019 00037 typedef struct _VlAIB 00038 { 00039 vl_uint *nodes ; 00040 vl_uint nentries ; 00041 double *beta ; 00042 vl_uint *bidx ; 00045 vl_uint *which ; 00046 vl_uint nwhich ; 00048 double *Pcx; 00049 double *Px; 00050 double *Pc; 00051 vl_uint nvalues; 00052 vl_uint nlabels; 00054 vl_uint *parents; 00055 double *costs; 00056 } VlAIB; 00057 00062 VL_EXPORT 00063 VlAIB * vl_aib_new(double * Pcx, vl_uint nvalues, vl_uint nlabels); 00064 00065 VL_EXPORT 00066 void vl_aib_delete (VlAIB * aib); 00067 00073 VL_EXPORT 00074 void vl_aib_process(VlAIB * aib); 00075 00081 VL_INLINE vl_uint * vl_aib_get_parents(VlAIB const * aib); 00082 VL_INLINE double * vl_aib_get_costs(VlAIB const * aib); 00083 00087 /* ------------------------------------------------------------------- 00088 * Inline functions implementation 00089 * ---------------------------------------------------------------- */ 00090 00096 VL_INLINE 00097 vl_uint * vl_aib_get_parents(VlAIB const * aib) 00098 { 00099 return aib->parents; 00100 } 00101 00102 00108 VL_INLINE 00109 double * vl_aib_get_costs(VlAIB const * aib) 00110 { 00111 return aib->costs; 00112 } 00113 00114 /* VL_AIB_H */ 00115 #endif