Last change
on this file since 80 was 73, checked in by Bart Vastenhouw, 3 years ago |
Fix for IssueValue hashcode.
|
File size:
1.0 KB
|
Rev | Line | |
---|
[73] | 1 |
|
---|
| 2 | from geniusweb.issuevalue.Bid import Bid
|
---|
| 3 | from geniusweb.profile.Profile import Profile
|
---|
| 4 |
|
---|
| 5 | class 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 ≥ b (every bid is better or equal to itself)
|
---|
| 22 | <li>If b1≥b2 and b2≥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≥b2 and b2≥b3 then
|
---|
| 26 | b1≥b3.
|
---|
| 27 | </ul>
|
---|
| 28 | ''' |
---|
Note:
See
TracBrowser
for help on using the repository browser.