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