public class SortedOutcomeSpace extends OutcomeSpace
allBids, utilitySpace
Constructor and Description |
---|
SortedOutcomeSpace(AbstractUtilitySpace utilSpace)
Instantiates a SortedOutcomeSpace: an enumeration of all possible bids in
the domain which can be efficiently searched using the provided methods.
|
Modifier and Type | Method and Description |
---|---|
BidDetails |
getBidNearUtility(double utility)
Gets a BidDetails which is close to the utility
|
java.util.List<BidDetails> |
getBidsinRange(Range r)
gets a list of BidDetails that have a utility within the range
|
int |
getIndexOfBidNearUtility(double utility)
Gets a BidDetails which is close to the utility
|
BidDetails |
getMaxBidPossible() |
BidDetails |
getMinBidPossible() |
int |
searchIndexWith(double value)
Binary search of a BidDetails with a particular value if there is no
BidDetails with the exact value gives the last index because this is the
closest BidDetails to the value
|
generateAllBids, getAllBidsWithoutUtilities, getAllOutcomes, toString
public SortedOutcomeSpace(AbstractUtilitySpace utilSpace)
utilSpace
- utilityspace of the agent.public java.util.List<BidDetails> getBidsinRange(Range r)
getBidsinRange
in class OutcomeSpace
r
- public BidDetails getBidNearUtility(double utility)
getBidNearUtility
in class OutcomeSpace
utility
- public int getIndexOfBidNearUtility(double utility)
getIndexOfBidNearUtility
in class OutcomeSpace
utility
- public int searchIndexWith(double value)
value
- public BidDetails getMaxBidPossible()
getMaxBidPossible
in class OutcomeSpace
public BidDetails getMinBidPossible()
getMinBidPossible
in class OutcomeSpace