source: src/main/java/agents/anac/y2017/tucagent/WeightHypothesis.java@ 346

Last change on this file since 346 was 1, checked in by Wouter Pasman, 6 years ago

Initial import : Genius 9.0.0

File size: 619 bytes
Line 
1package agents.anac.y2017.tucagent;
2
3import genius.core.Domain;
4
5public 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.