// *** THIS FILE IS AUTO GENERATED. DO NOT EDIT IT ***
#ifndef RF_EXTERNAL_CORE_H
#define RF_EXTERNAL_CORE_H

#include "globalCore.h"
#include "snpAuxiliaryInfo.h"
#include "leafLink.h"
#include "factor.h"
#include "terminalBase.h"
#include "nodeBase.h"
/*
extern JNIEnv    *RF_java_env;
extern jobject    RF_java_obj;
extern jclass     RF_java_cls;
extern jclass     RF_java_except_cls;
extern jclass     RF_java_hshmap_cls;
extern jmethodID  RF_java_hshmap_constr;
extern jmethodID  RF_java_hshmap_put;
extern jobject    RF_java_hshmap_obj;
extern jclass     RF_java_ens_cls;
extern jmethodID  RF_java_ens_mid;
extern jmethodID  RF_java_mid_log;
extern jmethodID  RF_java_mid_logError;
extern jmethodID  RF_java_mid_logExit;
extern NAT1DInfo **RF_nat1DInfoList;
extern NAT2DInfo **RF_nat2DInfoList;
extern NativeEnsembleInfo **RF_nativeEnsembleInfoList;
extern uint       RF_nat1DInfoListSize;
extern uint       RF_nat2DInfoListSize;
extern uint       RF_nativeEnsembleInfoListSize;
extern jobject    RF_rLevelsJNIE;
extern jobject    RF_xLevelsJNIE;
*/

extern SEXP RF_sexpVector[2];
extern SEXP      RF_rLevelsSEXP;
extern SEXP      RF_xLevelsSEXP;

extern SNPAuxiliaryInfo **RF_snpAuxiliaryInfoList;
extern SNPAuxiliaryInfo **RF_incomingAuxiliaryInfoList;
extern AuxiliaryDimensionConstants *RF_auxDimConsts;
extern uint   RF_userTraceFlag;
extern time_t RF_userTimeStart;
extern time_t RF_userTimeSplit;  
extern uint      RF_opt;
extern uint      RF_optHigh;
extern float (*ran1A) (uint);
extern void  (*randomSetChainA) (uint, int);
extern int   (*randomGetChainA) (uint);
extern float (*ran1B) (uint);
extern void  (*randomSetChainB) (uint, int);
extern int   (*randomGetChainB) (uint);
extern float (*ran1C) (uint);
extern void  (*randomSetChainC) (uint, int);
extern int   (*randomGetChainC) (uint);
extern float (*ran1D) (uint);
extern void  (*randomSetChainD) (uint, int);
extern int   (*randomGetChainD) (uint);
extern void *(*makeNode) (uint xSize);
extern void  (*freeNode) (void *parent);
extern void *(*makeTerminal) (void);
extern void  (*freeTerminal) (void *parent);
extern void (*assignAllTerminalNodeOutcomes) (char mode, uint treeID, TerminalBase *term);
extern void (*calculateAllTerminalNodeOutcomes) (char mode, uint treeID, TerminalBase *term);
extern double   *RF_quantile;
extern uint      RF_quantileSize;
extern double    RF_qEpsilon;
extern uint      RF_inv_2qEpsilon;
extern uint      RF_observationSize;
extern double ***RF_response;
extern ulong    *RF_restoreTreeOffset;
extern uint     *RF_treeID_;
extern uint     *RF_nodeID_;
extern uint     *RF_nodeSZ_;
extern uint      *RF_hcDim_;
extern int      **RF_parmID_;
extern double   **RF_contPT_;
extern uint     **RF_mwcpSZ_;
extern ulong   **RF_restoreMWCPoffset;
extern uint     **RF_mwcpPT_;
extern uint  **RF_AMBR_ID_ptr;
extern uint  **RF_TN_ACNT_ptr;
extern uint  **RF_MEMB_ID_ptr;
extern uint RF_stackCount;
extern uint RF_nativeIndex;
extern LeafLinkedObj **RF_leafLinkedObjTail;
extern LeafLinkedObj **RF_leafLinkedObjHead;
extern TerminalBase ***RF_tTermMembership;
extern TerminalBase ***RF_ftTermMembership;
extern uint      RF_ySize;
extern uint      RF_xSize;
extern char     *RF_rType;
extern char     *RF_xType;
extern uint     *RF_xLevelsCnt;
extern uint     *RF_rTarget;
extern uint      RF_rTargetCount;
extern uint      RF_timeIndex;
extern uint      RF_statusIndex;
extern uint      RF_rFactorCount;
extern uint     *RF_rFactorMap;
extern uint     *RF_rFactorIndex;
extern uint     *RF_rFactorSize;
extern uint      RF_xFactorCount;
extern uint     *RF_xFactorMap;
extern uint     *RF_xFactorIndex;
extern uint     *RF_xFactorSize;
extern Factor ***RF_factorList;
extern NodeBase    **RF_root;
extern NodeBase   ***RF_nodeMembership;
extern NodeBase   ***RF_fnodeMembership;
extern NodeBase   ***RF_pNodeMembership;
extern NodeBase   ***RF_pNodeList;
extern TerminalBase   ***RF_pTermMembership;
extern TerminalBase   ***RF_tTermList;
extern TerminalBase   ***RF_pTermList;
extern uint      RF_ntree;
extern int       RF_numThreads;
extern uint     *RF_brnodeID_;
extern uint     **RF_fsrecID_;
extern double   *RF_timeInterest;
extern uint      RF_timeInterestSize;
extern uint      RF_ytry;
extern double   *RF_xWeightStat;
extern double   *RF_xWeight;
extern double   *RF_yWeight;
extern uint      RF_subjSize;
extern double   *RF_subjWeight;
extern uint      RF_bootstrapSize;
extern uint    **RF_bootstrapIn;
extern uint    **RF_bootMembershipIndex;
extern uint      RF_splitRule;
extern uint      RF_nsplit;
extern uint      RF_nodeSize;
extern uint      RF_mtry;
extern double   *RF_masterTime;
extern uint      RF_masterTimeSize;
extern uint      RF_sortedTimeInterestSize;
extern uint     *RF_startMasterTimeIndexIn;
extern uint     *RF_masterTimeIndexIn;
extern uint     *RF_masterToInterestTimeMap;
extern uint     *RF_yIndex;
extern uint      RF_ySizeProxy;
extern uint     *RF_yIndexZero;
extern uint      RF_yIndexZeroSize;
extern uint      RF_frSize;
extern uint      RF_ptnCount;
extern double  **RF_fresponseIn;
extern double  **RF_responseIn;
extern double  **RF_observationIn;
extern uint      RF_fobservationSize;
extern double  **RF_fobservationIn;
extern uint     *RF_rTargetFactor;
extern uint      RF_rTargetFactorCount;
extern uint      RF_rTargetNonFactorCount;
extern uint     *RF_rTargetNonFactor;
extern uint      RF_rNonFactorCount;
extern uint     *RF_rNonFactorMap;
extern uint     *RF_rNonFactorIndex;
extern uint      RF_xNonFactorCount;
extern uint     *RF_xNonFactorMap;
extern uint     *RF_xNonFactorIndex;
extern uint      RF_rMaxFactorLevel;
extern uint      RF_xMaxFactorLevel;
extern uint      RF_maxFactorLevel;
extern uint      RF_startTimeIndex;
extern uint      RF_crWeightSize;
extern double   *RF_crWeight;
extern uint     *RF_mRecordMap;
extern uint     *RF_fmRecordMap;
extern uint      RF_mRecordSize;
extern uint      RF_fmRecordSize;
extern int     **RF_mpSign;
extern int     **RF_fmpSign;
extern uint     *RF_subjIn;
extern uint     *RF_fsubjIn;
extern uint      RF_fsubjSize;
extern uint     *RF_xLevelsMax;
extern uint    **RF_xLevels;
extern uint     *RF_holdBLKptr;
extern uint     *RF_xtType;
extern uint     *RF_stType;
extern uint    *RF_oobSize;
extern uint    *RF_ibgSize;
extern uint    *RF_nodeCount;
extern uint    *RF_pLeafCount;
extern uint    *RF_maxDepth;
extern LeafLinkedObj ***RF_hTermMembership;
extern uint    **RF_bootMembershipIndex;
extern uint     *RF_identityMembershipIndex;
extern uint     *RF_fidentityMembershipIndex;
extern uint      RF_identityMembershipIndexSize;
extern uint      RF_fidentityMembershipIndexSize;
extern char    **RF_bootMembershipFlag;
extern uint    **RF_bootMembershipCount;
extern char    **RF_oobMembershipFlag;
extern uint    **RF_ibgMembershipIndex;
extern uint    **RF_oobMembershipIndex;
extern uint     *RF_getTree;
extern uint     *RF_orderedTreeIndex;
extern uint     *RF_serialTreeIndex;
extern uint      RF_serialTreeID;
extern uint      RF_serialBlockID;
extern uint      RF_perfBlockCount;
extern uint      RF_perfBlock;
extern uint      RF_ensembleUpdateCount;
extern uint     *RF_nodeCountSyth;
extern uint     *RF_getTreeIndex;
extern uint      RF_getTreeCount;
extern uint      RF_subjWeightType;
extern uint     *RF_subjWeightSorted;
extern uint      RF_subjWeightDensitySize;
extern uint      RF_eventTypeSize;
extern uint      RF_feventTypeSize;
extern uint      RF_mStatusSize;
extern uint     *RF_eventType;
extern uint     *RF_eventTypeIndex;
extern uint     *RF_eIndividualSize;
extern uint    **RF_eIndividualIn;
extern uint     *RF_subjSlot;
extern uint     *RF_subjSlotCount;
extern uint    **RF_subjList;
extern uint     *RF_caseMap;
extern uint     *RF_subjMap;
extern uint      RF_subjCount;
extern uint      *RF_classLevelSize;
extern uint     **RF_classLevel;
extern uint     **RF_classLevelIndex;
extern uint      RF_intrPredictorSize;
extern uint     *RF_intrPredictor;
extern char     *RF_importanceFlag;   
extern uint  **RF_RMBR_ID_ptr;
extern uint  **RF_TN_RCNT_ptr;
extern uint     *RF_RMBR_ID_;
extern uint     *RF_AMBR_ID_;
extern uint     *RF_OMBR_ID_;
extern uint     *RF_IMBR_ID_;
extern uint     *RF_TN_RCNT_;
extern uint     *RF_TN_ACNT_;
extern uint     *RF_TN_OCNT_;
extern uint     *RF_TN_ICNT_;
extern uint     *RF_OOB_SZ_;
extern uint     *RF_IBG_SZ_;
extern double   *RF_TN_SURV_;
extern double   *RF_TN_MORT_;
extern double   *RF_TN_NLSN_;
extern double   *RF_TN_CSHZ_;
extern double   *RF_TN_CIFN_;
extern double   *RF_TN_KHZF_;
extern double   *RF_TN_REGR_;
extern uint     *RF_TN_CLAS_;
extern double  ***RF_TN_SURV_ptr;
extern double  ***RF_TN_MORT_ptr;
extern double  ***RF_TN_NLSN_ptr;
extern double ****RF_TN_CSHZ_ptr;
extern double ****RF_TN_CIFN_ptr;
extern double  ***RF_TN_KHZF_ptr;
extern double  ***RF_TN_REGR_ptr;
extern uint   ****RF_TN_CLAS_ptr;
extern uint  **RF_BOOT_CT_ptr;
extern uint   **RF_mwcpCT;
extern double   *RF_spltST_;
extern uint     *RF_dpthST_;
extern ulong     RF_totalTermCount;
extern uint     *RF_restoreTreeID;
extern ulong     RF_totalNodeCount_;
extern uint     *RF_tLeafCount_;
extern uint     *RF_rLevelsMax;
extern uint     *RF_rLevelsCnt;
extern uint    **RF_rLevels;
extern double   *RF_rFactorThreshold;
extern uint     *RF_rFactorMinority;
extern uint     *RF_rFactorMajority;
extern char     *RF_rFactorMinorityFlag;
extern uint RF_incomingStackCount;
extern int      *RF_seed_;
extern double ***RF_observation;
extern double ***RF_fobservation;
extern double  **RF_status;
extern double  **RF_time;
extern double  **RF_startTime;
extern double ***RF_response;
extern double ***RF_fresponse;
extern char      RF_mStatusFlag;
extern char      RF_mTimeFlag;
extern char      RF_mResponseFlag;
extern char      RF_mPredictorFlag;
extern uint    **RF_startMasterTimeIndex;
extern uint    **RF_masterTimeIndex;
extern double   *RF_oobEnsembleCLS_;
extern double   *RF_fullEnsembleCLS_;
extern double ***RF_oobEnsembleCLSptr;
extern double ***RF_fullEnsembleCLSptr;
extern double ***RF_oobEnsembleCLSnum;
extern double ***RF_fullEnsembleCLSnum;
extern double   *RF_oobEnsembleRGR_;
extern double   *RF_fullEnsembleRGR_;
extern double  **RF_oobEnsembleRGRptr;
extern double  **RF_fullEnsembleRGRptr;
extern double  **RF_oobEnsembleRGRnum;
extern double  **RF_fullEnsembleRGRnum;
extern double   *RF_oobEnsembleDen;
extern double   *RF_fullEnsembleDen;
extern double   *RF_perfCLS_;
extern double   *RF_perfRGR_;
extern double  ***RF_perfCLSptr;
extern double   **RF_perfRGRptr;
extern uint     *RF_tLeafCount;
extern int      *RF_seed;
extern uint     *RF_optLoGrow_;
extern uint      RF_optLoGrow;
#ifdef _OPENMP
extern omp_lock_t ***RF_lockCLSoens;
extern omp_lock_t ***RF_lockCLSfens;
extern omp_lock_t   *RF_lockDENoens;
extern omp_lock_t   *RF_lockDENfens;
extern omp_lock_t    RF_lockPerf;
extern omp_lock_t    RF_lockEnsbUpdtCount;
#endif

#endif
