edu.cuny.cat.market.matching
Class GradMaxVolumeShoutEngine

java.lang.Object
  extended by edu.cuny.cat.market.AuctioneerPolicy
      extended by edu.cuny.cat.market.matching.ShoutEngine
          extended by edu.cuny.cat.market.matching.FourHeapShoutEngine
              extended by edu.cuny.cat.market.matching.GradMaxVolumeShoutEngine
All Implemented Interfaces:
AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable, java.io.Serializable

public class GradMaxVolumeShoutEngine
extends FourHeapShoutEngine

TODO: has yet to be done !

This class provides a generic auction shout management framework. It differs from FourHeapShoutEngine in the sense that it out-sources the matching policy and the priority of shouts.

Version:
$Revision: 1.10 $
Author:
Jinzhong Niu
See Also:
Serialized Form

Field Summary
protected  edu.cuny.struct.SortedTreeList<Shout> asks
           
protected  edu.cuny.struct.SortedTreeList<Shout> bids
           
protected  edu.cuny.struct.SortedTreeList<Shout> shouts
          list of sums of demand and supply at shouted prices sorted by quantities
 
Fields inherited from class edu.cuny.cat.market.matching.FourHeapShoutEngine
bIn, bOut, sIn, sOut
 
Fields inherited from class edu.cuny.cat.market.matching.ShoutEngine
AscendingOrder, DescendingOrder
 
Fields inherited from class edu.cuny.cat.market.AuctioneerPolicy
auctioneer
 
Constructor Summary
GradMaxVolumeShoutEngine()
           
 
Method Summary
protected  void newAsk(Shout ask)
           
protected  void newBid(Shout bid)
          TODO: not finished yet !
 void reset()
          resets the state to be the same as the policy is created and initialized.
 
Methods inherited from class edu.cuny.cat.market.matching.FourHeapShoutEngine
ascendingAskIterator, askIterator, bidIterator, descendingBidIterator, displaceHighestMatchedAsk, displaceLowestMatchedBid, displaceShout, getHighestMatchedAsk, getHighestUnmatchedBid, getLowestMatchedBid, getLowestUnmatchedAsk, getMatchedAsks, getMatchedBids, getMatchedVolume, getNumOfMatchedAsks, getNumOfMatchedBids, getNumOfUnmatchedAsks, getNumOfUnmatchedBids, getUnmatchedAsks, getUnmatchedBids, getUnmatchedDemand, getUnmatchedSupply, insertUnmatchedAsk, insertUnmatchedBid, matchedAskIterator, matchedBidIterator, matchShouts, newShout, postRemovalProcessing, preRemovalProcessing, prettyPrint, printState, promoteHighestUnmatchedBid, promoteLowestUnmatchedAsk, promoteShout, reinsert, removeAsk, removeBid, removeShout, toString, unifyShout
 
Methods inherited from class edu.cuny.cat.market.matching.ShoutEngine
getMatchedShouts
 
Methods inherited from class edu.cuny.cat.market.AuctioneerPolicy
eventOccurred, getAuctioneer, initialize, setAuctioneer, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

shouts

protected edu.cuny.struct.SortedTreeList<Shout> shouts
list of sums of demand and supply at shouted prices sorted by quantities


asks

protected edu.cuny.struct.SortedTreeList<Shout> asks

bids

protected edu.cuny.struct.SortedTreeList<Shout> bids
Constructor Detail

GradMaxVolumeShoutEngine

public GradMaxVolumeShoutEngine()
Method Detail

reset

public void reset()
Description copied from class: AuctioneerPolicy
resets the state to be the same as the policy is created and initialized.

Specified by:
reset in interface edu.cuny.obj.Resetable
Overrides:
reset in class FourHeapShoutEngine

newBid

protected void newBid(Shout bid)
               throws DuplicateShoutException
TODO: not finished yet !

Overrides:
newBid in class FourHeapShoutEngine
Throws:
DuplicateShoutException

newAsk

protected void newAsk(Shout ask)
               throws DuplicateShoutException
Overrides:
newAsk in class FourHeapShoutEngine
Throws:
DuplicateShoutException