| 63 | } |
| 64 | |
| 65 | void get_features ( |
| 66 | const state_type& state, |
| 67 | const action_type& action, |
| 68 | matrix<double,0,1>& feats |
| 69 | ) const |
| 70 | { |
| 71 | feats.set_size(num_features()); |
| 72 | feats = 0; |
| 73 | feats(state*2 + action) = 1; |
| 74 | if (have_prior) |
| 75 | feats(num_features()-1) = offset(state*2+action); |
| 76 | } |
| 77 | |
| 78 | }; |
| 79 |