public void put ( Var var , int state ) { if ( state < 0 || state >= var . getNumStates ( ) ) { throw new IllegalArgumentException ( "Invalid state idx " + state + " for var " + var ) ; } config . put ( var , state ) ; vars . add ( var ) ; }
Sets the state value to state for the given variable adding it if necessary .