40#include "util/ytData.h"
41#include "util/ytKeyValues.h"
42#include "net/ytNetwork.h"
43#include "net/ytNode.h"
44#include "net/ytEdge.h"
48#define BNRC_DEFAULT_MAX_MEM 1000
49#define BNRC_DEF {"BNRC",\
57 BNRC_partialResidual,\
91 double log_det_K_plus;
101 double ** logDetLambda;
106 double ** LambdaInvBt;
116 double ** tmp_LambdaInvBt;
117 double ** tmp_logDetLambda;
121 double * dsytrf_work;
122 int dsytrf_work_size;
128 double * tmp_B_gamma;
131 double * LambdaInvBtWork;
132 double * logDetLambdaWork;
150void BNRC_reinit(
void * buff,
ytData * data);
151double BNRC_score(
void * buff,
const int j,
const int * parents,
const int q);
152void BNRC_edgeProp(
void * buff,
const int j,
const int * parents,
const int q,
153 const int k,
ytEdge * edge);
154void BNRC_nodeProp(
void * buff,
int j,
ytNode * node);
155void BNRC_finalize(
void * buff);
156void BNRC_partialResidual(
void * buff,
const int j,
const int * parents,
const int q,
157 FILE ** fp,
double * ll);
158void BNRC_setEdgeProp(
void * buff,
const int j,
const int * parents,
const int q,
159 const int k,
const ytEdge * edge);
160void BNRC_setNodeProp(
void * buff,
const int j,
const ytNode * node);
161void BNRC_status(
void * buff);
162int BNRC_debug(
int argc,
char * argv[]);
165void BNRC_prepare_beta(
double hyper_bg,
double hyper_inc,
int hyper_num,
166 double * beta,
double * log_beta,
int verbose);
168size_t BNRC_Data_alloc(
BNRC_Data * D,
int p,
int n,
169 int allocXY,
int dynamic,
int level,
int dry);
170void BNRC_Data_finalize(
BNRC_Data * D,
int allocXY);
172size_t BNRC_Global_alloc(
BNRC_Global * G,
int p,
int n,
int mp,
int level,
176size_t BNRC_Work_alloc(
BNRC_Work * W,
int p,
int n,
int mp,
int H,
177 int M,
int level,
int T1_size,
int dry);
180size_t BNRC_Model_alloc(
BNRC_Model * P,
int mp,
int M,
int dry);
185 const char * type,
double outer);
186void BNRC_proc_mv(
BNRC_Data * D,
int level);
187void BNRC_calc_B(
BNRC_Data * D,
int ofs,
const char * type,
190 const char * type,
BNRC_Work * W,
int level);
192double BNRC_calc(
BNRC_Data * D,
int ofs,
int j,
const int * parents,
int q,
195size_t BNRC_get_T1_size(
int n,
int M);
197void BNRC_setParam(
void * buff,
const char * key,
ytObject * value);
Model parameters for a single node.
Definition BNRC.h:140
Structure for working memory.
Definition BNRC.h:115
General data container.
Definition ytData.h:73
Network node.
Definition ytNode.h:42