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)
Set the basic distribution of this iterator.
|
void |
setDistribution(int meanBundleSize,
double standardDeviation,
int iterations)
Deprecated.
|
void |
setIterations(int iterations)
Set the number of iterations of this iterator.
|
void |
setMaxIterations() |
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 setMaxIterations()
public void setIterations(int iterations)
iterations - : 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 void setDistribution(int meanBundleSize,
double standardDeviation)
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 deviation@Deprecated public void setDistribution(int meanBundleSize, double standardDeviation, int iterations)
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 © 2019. All rights reserved.