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

Last change on this file since 341 was 341, checked in by Katsuhide Fujita, 5 years ago

Katsuhide Fujita added ANAC2018 agents.

File size: 643 bytes
Line 
1package agents.anac.y2018.condagent;
2
3
4import negotiator.Domain;
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.