question: public BCInference ( int [ ] [ ] cases , int [ ] nodeDimension ) { this . cases = cases ; this . nodeDimension = nodeDimension ; this . numberOfNodes = nodeDimension . length - 2 ; this . numberOfCases = cases . length - 1 ; this . maxCases = numberOfCases ; this . maxNodes = numberOfNodes ; this . maxValues = findMaxValue ( nodeDimension ) ; this . maxLogFact = ( 2 * maxCases ) + maxValues ; this . scoreFn = 1 ; this . logfact = new double [ maxLogFact + 1 ] ; int [ ] _nodeDimension = Arrays . copyOf ( nodeDimension , nodeDimension . length ) ; Arrays . sort ( _nodeDimension ) ; int g1 = _nodeDimension [ _nodeDimension . length - 1 ] ; int g2 = _nodeDimension [ _nodeDimension . length - 2 ] ; maxCells = maxParents * g1 * g2 * maxCases ; this . parents = new int [ maxNodes + 2 ] [ maxParents + 1 ] ; this . countsTree = new int [ maxCells + 1 ] ; this . counts = new int [ maxCells + 1 ] ; this . scores = new double [ maxCases + 1 ] [ 4 ] ; }
target:  Cases is a two-dimensional array dataset. If the dataset is M x N, the size of the two-dimensional array is (M + 2) x (N + 2). In other words, the size of the array is always 2 more of the number of data. Likewise, if the data for nodeDimension is N then the size of the array is N + 2. <p/> The case array index starts from 1 (not zero) to numberOfCases. The nodeDimension array index start from 1 (not zero) to numberOfNodes. <p/> nodeDimension array contains values denote the number of discrete values that Node can have (e.g., 2 for a binary variable).