#ifndef CPQ_COMMON_HEADER
#define CPQ_COMMON_HEADER

/* what to compute: the immutable SEXP inputs of a query. */
typedef struct {

  SEXP fitted;         /* the bn.fit object to sample from. */
  SEXP target;         /* event expr (cpquery) or node labels (cpdist). */
  SEXP evidence;       /* the evidence expression, list, or TRUE. */
  SEXP eval_env;       /* environment the query was called from. */

} cpq_query;

/* bind a batch of generated observations to an evaluation environment. */
SEXP make_data_env(SEXP data, SEXP eval_env);

#endif
