Last change
on this file was 127, checked in by Wouter Pasman, 6 years ago |
#41 ROLL BACK of rev.126 . So this version is equal to rev. 125
|
File size:
538 bytes
|
Rev | Line | |
---|
[127] | 1 | package agents.anac.y2010.AgentFSEGA;
|
---|
| 2 |
|
---|
| 3 | public abstract class Hypothesis implements Comparable<Hypothesis>
|
---|
| 4 | {
|
---|
| 5 | private double dProbability;
|
---|
| 6 |
|
---|
| 7 | public double getProbability()
|
---|
| 8 | {
|
---|
| 9 | return dProbability;
|
---|
| 10 | }
|
---|
| 11 |
|
---|
| 12 | public void setProbability(double probability)
|
---|
| 13 | {
|
---|
| 14 | dProbability = probability;
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | //allows hypothesis compare by utility
|
---|
| 18 | public int compareTo(Hypothesis o)
|
---|
| 19 | {
|
---|
| 20 | if(getProbability() > o.getProbability())
|
---|
| 21 | return 1;
|
---|
| 22 | else if(getProbability() < o.getProbability())
|
---|
| 23 | return -1;
|
---|
| 24 | else
|
---|
| 25 | return 0;
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.