Class SizeBasedUniqueRandomXOR
- java.lang.Object
-
- org.spectrumauctions.sats.core.bidlang.xor.SizeBasedUniqueRandomXOR
-
- All Implemented Interfaces:
BiddingLanguage
public class SizeBasedUniqueRandomXOR extends java.lang.Object implements BiddingLanguage
-
-
Constructor Summary
Constructors Constructor Description SizeBasedUniqueRandomXOR(java.util.Collection<? extends License> goods, RNGSupplier rngSupplier, SATSBidder bidder)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SATSBiddergetBidder()References back to the SATSBidder instance from whom this Bidding language instance was created.protected java.math.BigDecimalgetValue(org.marketdesignresearch.mechlib.core.Bundle goods)java.util.Iterator<org.marketdesignresearch.mechlib.core.bidder.valuefunction.BundleValue>iterator()Throws aMissingInformationExceptionif the methodsetDistribution(int, double, int)was not called before this operation.voidsetDefaultDistribution()voidsetDistribution(int meanBundleSize, double standardDeviation)Set the basic distribution of this iterator.voidsetDistribution(int meanBundleSize, double standardDeviation, int iterations)Deprecated.voidsetIterations(int iterations)Set the number of iterations of this iterator.voidsetMaxIterations()
-
-
-
Constructor Detail
-
SizeBasedUniqueRandomXOR
public SizeBasedUniqueRandomXOR(java.util.Collection<? extends License> goods, RNGSupplier rngSupplier, SATSBidder bidder)
-
-
Method Detail
-
getValue
protected java.math.BigDecimal getValue(org.marketdesignresearch.mechlib.core.Bundle goods)
-
getBidder
public SATSBidder getBidder()
Description copied from interface:BiddingLanguageReferences back to the SATSBidder instance from whom this Bidding language instance was created.- Specified by:
getBidderin interfaceBiddingLanguage
-
setDefaultDistribution
public void setDefaultDistribution()
-
setMaxIterations
public void setMaxIterations()
-
setIterations
public void setIterations(int iterations)
Set the number of iterations of this iterator.- Parameters:
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.
-
setDistribution
public void setDistribution(int meanBundleSize, double standardDeviation)Set the basic distribution of this iterator. Note that the parameters are not checked for its validity and meaningfulness.- Parameters:
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
-
setDistribution
@Deprecated public void setDistribution(int meanBundleSize, double standardDeviation, int iterations)Deprecated.
-
iterator
public java.util.Iterator<org.marketdesignresearch.mechlib.core.bidder.valuefunction.BundleValue> iterator()
Throws aMissingInformationExceptionif the methodsetDistribution(int, double, int)was not called before this operation.- Specified by:
iteratorin interfaceBiddingLanguage
-
-