001    /*
002     * Created on Dec 28, 2004
003     *
004     */
005    package aima.probability;
006    
007    import java.util.Hashtable;
008    
009    /**
010     * @author Ravi Mohan
011     * 
012     */
013    
014    public class Query {
015    
016            private String queryVariable;
017    
018            private Hashtable<String, Boolean> evidenceVariables;
019    
020            public Query(String queryVariable, String[] evidenceVariables,
021                            boolean[] evidenceValues) {
022                    this.queryVariable = queryVariable;
023                    this.evidenceVariables = new Hashtable<String, Boolean>();
024                    for (int i = 0; i < evidenceVariables.length; i++) {
025                            this.evidenceVariables.put(evidenceVariables[i], new Boolean(
026                                            evidenceValues[i]));
027                    }
028            }
029    
030            public Hashtable<String, Boolean> getEvidenceVariables() {
031                    return evidenceVariables;
032            }
033    
034            public String getQueryVariable() {
035                    return queryVariable;
036            }
037    }