source: src/main/java/agents/anac/y2018/condagent/WeightHypothesis.java

Last change on this file was 343, checked in by Tim Baarslag, 4 years ago

Fixed all errors in all 2018 agents

File size: 644 bytes
RevLine 
[341]1package agents.anac.y2018.condagent;
2
3
[343]4import genius.core.Domain;
[341]5
6public class WeightHypothesis extends Hypothesis {
7 double[] fWeight;
8 double fAprioriProbability;
9
10 public WeightHypothesis(Domain pDomain) { fWeight = new double[pDomain.getIssues().size()]; }
11
12 public void setWeight(int index, double value) {
13 fWeight[index] = value;
14 }
15
16 public double getWeight(int index) { return fWeight[index]; }
17
18 public String toString() {
19 String lResult = "";
20 for (double lWeight : fWeight) {
21 lResult = lResult + String.format("%1.2f", new Object[] { Double.valueOf(lWeight) }) + ";";
22 }
23 return lResult;
24 }
25}
Note: See TracBrowser for help on using the repository browser.