00001 00007 /* 00008 Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. 00009 All rights reserved. 00010 00011 This file is part of the VLFeat library and is made available under 00012 the terms of the BSD license (see the COPYING file). 00013 */ 00014 00015 #ifndef VL_AIB_H 00016 #define VL_AIB_H 00017 00018 #include "generic.h" 00019 #include "mathop.h" 00020 00038 typedef struct _VlAIB 00039 { 00040 vl_uint *nodes ; 00041 vl_uint nentries ; 00042 double *beta ; 00043 vl_uint *bidx ; 00046 vl_uint *which ; 00047 vl_uint nwhich ; 00049 double *Pcx; 00050 double *Px; 00051 double *Pc; 00052 vl_uint nvalues; 00053 vl_uint nlabels; 00055 vl_uint *parents; 00056 double *costs; 00058 vl_uint verbosity ; 00059 } VlAIB; 00060 00064 VL_EXPORT 00065 VlAIB * vl_aib_new(double * Pcx, vl_uint nvalues, vl_uint nlabels); 00066 00067 VL_EXPORT 00068 void vl_aib_delete (VlAIB * aib); 00074 VL_EXPORT 00075 void vl_aib_process(VlAIB * aib); 00081 VL_INLINE vl_uint * vl_aib_get_parents(VlAIB const * aib); 00082 VL_INLINE double * vl_aib_get_costs(VlAIB const * aib); 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 00106 VL_INLINE 00107 double * vl_aib_get_costs(VlAIB const * aib) 00108 { 00109 return aib->costs; 00110 } 00111 00112 /* ----------------------------------------------------------------- */ 00117 VL_INLINE void 00118 vl_aib_set_verbosity (VlAIB * self, int verbosity) 00119 { 00120 self->verbosity = verbosity ; 00121 } 00122 00127 VL_INLINE int 00128 vl_aib_get_verbosity (VlAIB const * self) 00129 { 00130 return self->verbosity ; 00131 } 00132 00133 /* VL_AIB_H */ 00134 #endif