AIMA.Probability.Bayes.Exact.EliminationAsk.calculateVariables C# (CSharp) Method

calculateVariables() protected method

protected calculateVariables ( RandomVariable X, AssignmentProposition e, BayesianNetwork bn, Set hidden, List bnVARS ) : void
X RandomVariable
e AssignmentProposition
bn BayesianNetwork
hidden Set
bnVARS List
return void
        protected void calculateVariables(RandomVariable[] X,
                                          AssignmentProposition[] e, BayesianNetwork bn,
                                          Set<RandomVariable> hidden, List<RandomVariable> bnVARS)
        {

            bnVARS.AddRange(bn.getVariablesInTopologicalOrder());
            hidden.addAll(bnVARS);

            foreach (RandomVariable x in X)
            {
                hidden.remove(x);
            }
            foreach (AssignmentProposition ap in e)
            {
                hidden.removeAll(ap.getScope());
            }

            return;
        }