public class BidHistory
extends java.lang.Object
Constructor and Description |
---|
BidHistory(UtilitySpace utilSpace)
BidHistory class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addMyBid(java.util.Map.Entry<java.lang.Double,Bid> pBid)
Adds a new bid
Map.Entry to the end of agent's own bids. |
void |
addOpponentBid(Bid pBid)
Adds a new bid
Map.Entry to the end of oppenent's bids. |
java.util.HashMap<java.lang.Integer,java.lang.Integer> |
BidDifference(Bid first,
Bid second)
receives two bids as arguments and returns a
HashMap that contains
for each issue whether or not its value is different between the
two bids. |
java.util.HashMap<java.lang.Integer,java.lang.Integer> |
BidDifferenceofOpponentsLastTwo()
For the last two bids of the opponent returns a
HashMap
that contains for each issue whether or not its value
is different between the two bids. |
java.util.Map.Entry<java.lang.Double,Bid> |
getMyBid(int pIndex)
retrieves a bid
Map.Entry from the agent's bid list |
int |
getMyBidCount() |
java.util.Map.Entry<java.lang.Double,Bid> |
getMyLastBid()
retrieves last bid
Map.Entry from the agent's bid list |
Bid |
getOpponentBid(int pIndex)
retrieves a bid from the opponent's bid list
|
int |
getOpponentBidCount() |
Bid |
getOpponentLastBid()
retrieves last bid from the opponent's bid list
|
Bid |
getOpponentSecondLastBid()
retrieves second last bid from the opponent's bid list
|
public BidHistory(UtilitySpace utilSpace)
utilSpace
- a UtilitySpace
to be set for utility calculations of stored bids.public void addMyBid(java.util.Map.Entry<java.lang.Double,Bid> pBid)
Map.Entry
to the end of agent's own bids.pBid
- passed bid entrypublic int getMyBidCount()
public java.util.Map.Entry<java.lang.Double,Bid> getMyBid(int pIndex)
Map.Entry
from the agent's bid listpIndex
- index of the bidpublic java.util.Map.Entry<java.lang.Double,Bid> getMyLastBid()
Map.Entry
from the agent's bid listpublic void addOpponentBid(Bid pBid)
Map.Entry
to the end of oppenent's bids.pBid
- passed bid entrypublic int getOpponentBidCount()
public Bid getOpponentBid(int pIndex)
pIndex
- index of the bidpublic Bid getOpponentLastBid()
public Bid getOpponentSecondLastBid()
public java.util.HashMap<java.lang.Integer,java.lang.Integer> BidDifference(Bid first, Bid second)
HashMap
that contains
for each issue whether or not its value is different between the
two bids.first
- second
- HashMap
with keys equal to issue IDs and with values 1 if different issue value observed and 0 if not.public java.util.HashMap<java.lang.Integer,java.lang.Integer> BidDifferenceofOpponentsLastTwo()
HashMap
that contains for each issue whether or not its value
is different between the two bids.HashMap
with keys equal to issue IDs and with values 1 if different issue value observed and 0 if not.