source: geniuswebcore/geniusweb/profile/FullOrdering.py@ 96

Last change on this file since 96 was 96, checked in by Bart Vastenhouw, 2 years ago

Fixed small issues in domaineditor.

File size: 1.0 KB
Line 
1from geniusweb.issuevalue.Bid import Bid
2from geniusweb.profile.PartialOrdering import PartialOrdering
3
4class FullOrdering (PartialOrdering):
5 '''
6 As {@link PartialOrdering}, but with more strict requirement on
7 {@link #isPreferredOrEqual(geniusweb.issuevalue.Bid, geniusweb.issuevalue.Bid)}
8
9 '''
10 def isPreferredOrEqual(self, bid1: Bid , bid2: Bid )->bool:
11 '''
12 @param bid1 the first item's utility/preference
13 @param bid2 the second item's utility/preference
14 @return true iff bid1 is considered better or equal (≥) than bid 2. In
15 all other cases false is returned.
16
17 This predicate should be implemented such that
18 <ul>
19 <li>For all b1 and b2, either b1 &ge; b2 or b2 &ge; b1.
20 <li>b &ge; b (every bid is better or equal to itself)
21 <li>If b1&ge;b2 and b2&ge;b1 then the two bids are considered
22 equally good. Note that this differes from a partial order in
23 mathematics.
24 <li>it behaves transitive: if b1&ge;b2 and b2&ge;b3 then
25 b1&ge;b3.
26 </ul>
27 '''
28
Note: See TracBrowser for help on using the repository browser.