Last change
on this file since 30 was 1, checked in by Wouter Pasman, 7 years ago |
Initial import : Genius 9.0.0
|
File size:
1.1 KB
|
Line | |
---|
1 | package genius.gui.uncertainty;
|
---|
2 |
|
---|
3 | import genius.core.repository.ProfileRepItem;
|
---|
4 | import genius.core.uncertainty.UNCERTAINTYTYPE;
|
---|
5 | import genius.core.uncertainty.UncertainPreferenceContainer;
|
---|
6 | import genius.core.utility.AdditiveUtilitySpace;
|
---|
7 | import genius.core.utility.AdditiveUtilitySpaceWithPerturbation;
|
---|
8 | import genius.gui.panels.TextModel;
|
---|
9 |
|
---|
10 | public class PerturbationModel {
|
---|
11 | private ProfileRepItem profile;
|
---|
12 | private TextModel perturbationBox = new TextModel("0.0");
|
---|
13 |
|
---|
14 | public PerturbationModel(ProfileRepItem profile) {
|
---|
15 | this.profile = profile;
|
---|
16 | }
|
---|
17 |
|
---|
18 | public UncertainPreferenceContainer createContainer() {
|
---|
19 | AdditiveUtilitySpace realUtilitySpace = (AdditiveUtilitySpace) profile.create();
|
---|
20 | AdditiveUtilitySpaceWithPerturbation uspaceWithPerturbation = new AdditiveUtilitySpaceWithPerturbation(
|
---|
21 | realUtilitySpace, Double.parseDouble(perturbationBox.getText()));
|
---|
22 | return new UncertainPreferenceContainer(realUtilitySpace, UNCERTAINTYTYPE.PERCEIVEDUTILITY, uspaceWithPerturbation);
|
---|
23 | }
|
---|
24 |
|
---|
25 | public TextModel getPerturbationBox() {
|
---|
26 | return perturbationBox;
|
---|
27 | }
|
---|
28 |
|
---|
29 |
|
---|
30 | public ProfileRepItem getProfile() {
|
---|
31 | return profile;
|
---|
32 | }
|
---|
33 |
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.