Last change
on this file since 1 was 1, checked in by Wouter Pasman, 6 years ago |
Initial import : Genius 9.0.0
|
File size:
598 bytes
|
Rev | Line | |
---|
[1] | 1 | package agents.bayesianopponentmodel;
|
---|
| 2 |
|
---|
| 3 | import genius.core.Domain;
|
---|
| 4 |
|
---|
| 5 | public class WeightHypothesis extends Hypothesis {
|
---|
| 6 | double fWeight[];
|
---|
| 7 | double fAprioriProbability;
|
---|
| 8 | public WeightHypothesis (Domain pDomain) {
|
---|
| 9 | fWeight = new double[pDomain.getIssues().size()];
|
---|
| 10 | }
|
---|
| 11 | public void setWeight(int index, double value) {
|
---|
| 12 | fWeight[index] = value;
|
---|
| 13 | }
|
---|
| 14 | public double getWeight(int index) {
|
---|
| 15 | return fWeight[index];
|
---|
| 16 | }
|
---|
| 17 | public String toString() {
|
---|
| 18 | String lResult = "";
|
---|
| 19 | for(double lWeight : fWeight) {
|
---|
| 20 | lResult += String.format("%1.2f", lWeight) +";";
|
---|
| 21 | }
|
---|
| 22 | return lResult;
|
---|
| 23 | }
|
---|
| 24 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.