public class SizeBasedUniqueRandomXOR<T extends Good> extends Object implements XORLanguage<T>
| Constructor and Description |
|---|
SizeBasedUniqueRandomXOR(Collection<T> goods,
RNGSupplier rngSupplier,
Bidder<T> bidder) |
| Modifier and Type | Method and Description |
|---|---|
Bidder<T> |
getBidder()
References back to the Bidder instance from whom this
Bidding language instance was created.
|
protected BigDecimal |
getValue(Bundle<T> goods) |
Iterator<XORValue<T>> |
iterator()
Throws a
MissingInformationException if the method
setDistribution(int, double, int) was not called before this operation. |
void |
setDefaultDistribution() |
void |
setDistribution(int meanBundleSize,
double standardDeviation,
int iterations)
Set the basic properties of this iterator.
|
public SizeBasedUniqueRandomXOR(Collection<T> goods, RNGSupplier rngSupplier, Bidder<T> bidder)
protected BigDecimal getValue(Bundle<T> goods)
public Bidder<T> getBidder()
BiddingLanguagegetBidder in interface BiddingLanguagepublic void setDefaultDistribution()
public void setDistribution(int meanBundleSize,
double standardDeviation,
int iterations)
meanBundleSize - : The mean bundle size of the randomly generated packages. Should by greater than 0 and less than or equal to the number of goods.standardDeviation - : The bundle size standard deviationiterations - : The number of iterations before iterator.hasNext() returns false. Note that setting this parameter
too high will result in a slow iterator and possibly cause a StackOverflowException while iterating.public Iterator<XORValue<T>> iterator()
MissingInformationException if the method
setDistribution(int, double, int) was not called before this operation.iterator in interface XORLanguage<T extends Good>Copyright © 2017. All rights reserved.