Last change
on this file since 345 was 202, checked in by Katsuhide Fujita, 6 years ago |
Add ANAC 2019 agents (3)
|
-
Property svn:executable
set to
*
|
File size:
652 bytes
|
Line | |
---|
1 | package agents.anac.y2019.fsega2019.fsegaoppmodel;
|
---|
2 |
|
---|
3 | import genius.core.Domain;
|
---|
4 |
|
---|
5 | public class WeightHypothesis extends Hypothesis
|
---|
6 | {
|
---|
7 | double dWeight[];
|
---|
8 |
|
---|
9 | public WeightHypothesis(Domain pDomain)
|
---|
10 | {
|
---|
11 | dWeight = new double[pDomain.getIssues().size()];
|
---|
12 | }
|
---|
13 |
|
---|
14 | public void setWeight(int index, double value)
|
---|
15 | {
|
---|
16 | dWeight[index] = value;
|
---|
17 | }
|
---|
18 |
|
---|
19 | public double getWeight(int index)
|
---|
20 | {
|
---|
21 | return dWeight[index];
|
---|
22 | }
|
---|
23 |
|
---|
24 | @Override
|
---|
25 | public String toString()
|
---|
26 | {
|
---|
27 | String lResult = "WeightHypothesis[";
|
---|
28 | for(double iWeight : dWeight)
|
---|
29 | {
|
---|
30 | lResult += String.format("%1.2f; ", iWeight);
|
---|
31 | }
|
---|
32 | lResult += "]";
|
---|
33 |
|
---|
34 | return lResult;
|
---|
35 | }
|
---|
36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.