source: geniuswebcore/geniusweb/profile/PartialOrdering.py@ 63

Last change on this file since 63 was 59, checked in by Wouter Pasman, 3 years ago

#44 manual commit of first public release, because this will cause the dist directory to move

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