Commit Graph

2 Commits (69966d7ac995436695b59ac8e9b736343308c277)

Author SHA1 Message Date
Tatsuhiro Tsujikawa 6ee913b0bc Simplified PieceStatMan and RarestPieceSelector.
Simplified PieceStatMan and RarestPieceSelector, but computation order
 to select piece index is still O(N) and unchanged.  Updating piece
 stat is improved to O(N) for bitfield update and O(1) for single
 index update, while old implementation needs O(NlogN) and O(N)
 respectively.
2011-08-10 21:29:01 +09:00
Tatsuhiro Tsujikawa 4da631bef6 2009-05-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Moved piece statistics stuff to new PieceStatMan class.
	Refactored PieceSelector interface.
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/LongestSequencePieceSelector.cc
	* src/LongestSequencePieceSelector.h
	* src/Makefile.am
	* src/PieceSelector.h
	* src/PieceStatMan.cc
	* src/PieceStatMan.h
	* src/RarestPieceSelector.cc
	* src/RarestPieceSelector.h
	* src/RequestGroup.cc
	* test/DefaultPieceStorageTest.cc
	* test/InOrderPieceSelector.h
	* test/Makefile.am
	* test/PieceStatManTest.cc
	* test/RarestPieceSelectorTest.cc
2009-05-06 07:49:22 +00:00