16#include "util/ytData.h"
17#include "util/ytKeyValues.h"
18#include "net/ytNetwork.h"
19#include "net/ytNode.h"
20#include "net/ytEdge.h"
24#define BNRC_DEFAULT_MAX_MEM 1000
25#define BNRC_DEF {"BNRC",\
33 BNRC_partialResidual,\
34 BNRC_calcEdgeContrib,\
68 double log_det_K_plus;
78 double ** logDetLambda;
83 double ** LambdaInvBt;
93 double ** tmp_LambdaInvBt;
94 double ** tmp_logDetLambda;
100 int dsytrf_work_size;
106 double * tmp_B_gamma;
109 double * LambdaInvBtWork;
110 double * logDetLambdaWork;
128void BNRC_reinit(
void * buff,
ytData * data);
129double BNRC_score(
void * buff,
const int j,
const int * parents,
const int q);
130void BNRC_edgeProp(
void * buff,
const int j,
const int * parents,
const int q,
131 const int k,
ytEdge * edge);
132void BNRC_nodeProp(
void * buff,
int j,
ytNode * node);
133void BNRC_finalize(
void * buff);
134void BNRC_partialResidual(
void * buff,
const int j,
const int * parents,
const int q,
135 FILE ** fp,
double * ll);
136void BNRC_setEdgeProp(
void * buff,
const int j,
const int * parents,
const int q,
137 const int k,
const ytEdge * edge);
138void BNRC_setNodeProp(
void * buff,
const int j,
const ytNode * node);
139void BNRC_calcRelContrib(
void * buff,
int j,
140 const int * parents,
int q,
double * ar);
141void BNRC_calcEdgeContrib(
void * buff,
ytNetwork * network,
int j,
142 const int * parents,
int q,
143 int mode,
double * ar);
144void BNRC_status(
void * buff);
145int BNRC_debug(
int argc,
char * argv[]);
148void BNRC_prepare_beta(
double hyper_bg,
double hyper_inc,
int hyper_num,
149 double * beta,
double * log_beta,
int verbose);
151size_t BNRC_Data_alloc(
BNRC_Data * D,
int p,
int n,
152 int allocXY,
int dynamic,
int level,
int dry);
153void BNRC_Data_finalize(
BNRC_Data * D,
int allocXY);
155size_t BNRC_Global_alloc(
BNRC_Global * G,
int p,
int n,
int mp,
int level,
159size_t BNRC_Work_alloc(
BNRC_Work * W,
int p,
int n,
int mp,
int H,
160 int M,
int level,
int T1_size,
int dry);
163size_t BNRC_Model_alloc(
BNRC_Model * P,
int mp,
int M,
int dry);
168 const char * type,
double outer);
169void BNRC_proc_mv(
BNRC_Data * D,
int level);
170void BNRC_calc_B(
BNRC_Data * D,
int ofs,
const char * type,
173 const char * type,
BNRC_Work * W,
int level);
175double BNRC_calc(
BNRC_Data * D,
int ofs,
int j,
const int * parents,
int q,
178size_t BNRC_get_T1_size(
int n,
int M);
180void BNRC_setParam(
void * buff,
const char * key,
ytObject * value);
Model parameters for a single node.
Definition BNRC.h:118
Structure for working memory.
Definition BNRC.h:92
General data container.
Definition ytData.h:46
Network node.
Definition ytNode.h:15