public class EnhancedBidHistory extends BidHistory
Constructor and Description |
---|
EnhancedBidHistory()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(BidDetails details)
Besides adding the bid to the BidHistory, also add the distance between
the bid to be added and the previous bid to the ArrayList.
|
double |
distance(Bid bid1,
Bid bid2)
Calculates the distance between two bids
|
double |
getToughness(int numberOfBids)
Return "toughness" of the bids in this BidHistory Toughness means the
average distance of the last x bids
|
java.lang.String |
toString() |
discountedFilterBetween, filterBetween, filterBetweenTime, filterBetweenUtility, filterUtility, getAverageDiscountedUtility, getAverageUtility, getBestBidDetails, getBestDiscountedBidDetails, getFirstBidDetails, getHistory, getLastBid, getLastBidDetails, getMedianUtilityBid, getNBestBids, getRandom, getRandom, getWorstBidDetails, isEmpty, size, sortToTime, sortToUtility
public void add(BidDetails details)
add
in class BidHistory
details
- offered bid.public double getToughness(int numberOfBids)
numberOfBids
- public double distance(Bid bid1, Bid bid2)
bid1
- bid2
- public java.lang.String toString()
toString
in class java.lang.Object