Click here to Skip to main content
15,884,537 members
Articles / Programming Languages / C#

Back to Basics - Generic Data Structures and Algorithms In .NET 2.0

Rate me:
Please Sign up or sign in to vote.
4.96/5 (93 votes)
23 Apr 2007Ms-PL15 min read 278.7K   2.6K   300  
Implementations of generic data structures and algorithms in .NET 2.0.
1.0 Release
-----------
	- Fixed :
		- Spelling mistake : BreathFirstSearch on GeneralTree and BinaryTree instead of BreadthFirstSearch.		
		
	- Added Stuff :
		- Sorters :
			- CombSorter
			- CocktailSorter
			- OddEvenTransportSorter 
			- ShakerSorter		
		- DataStructures :
			- SkipList
		- Algorithms :
			- Djikstra's shortest path algorithm
	
	- Changed Stuff :
		- Changed PriorityQueue to take a PriorityQueueType parameter on 
		  construction, to specify whether it's a min priority queue or
	      a max priority queue.
	    - Split the IVisitable portion from the IVisitableCollection interface,
	      and introduced the IVisitableDictionary interface.	 
	    - Added a Weight field on the Vertex<T> class to accommodate vertex-weighted graphs.
	

1.0 Beta 2
----------
	- Graph data structure added.
	- Modified Singleton to have an internal setter for testing purposes,
	  as per M.Holmgren's  suggestion.
	- Heap now takes a HeapType parameter at construction to specify whether
	  it's a MinHeap or a MaxHeap.
	- Priority Queue is now implemented using a MaxHeap instead of a SortedList,
	  thanks to a suggestion by CastorTiu.
	- Removed the abstract VisitableCollection class.  All datastructures now
	  implement the IVisitableCollection interface instead of inheriting from
	  the abstract VisitableCollection class.  While this does force the 
	  implementation  a couple of mundane methods multiple times, I feel that 
	  the interface is a much cleaner approach, since I can now "hide" methods 
	  through explicit implementation instead of just throwing a 
	  NotSupportedException.
	- SortedList now implements IList<T>.
	- Removed Visitor abstract class - all visitors now implement the IVisitor<T>
	  interface and the Accept method on the IVisitableCollection<T> interface
	  now takes a IVisitor<T> parameter.
	- Extracted interfaces for the following data structures :
		- IDeque for the Deque class.
		- IBag for the Bag class.
		- ISet for the Pascalset class.
		- IStack for the VisitableStack class.
		- ITree interface for the BinaryTree and GeneralTree classes.
		- IHeap interface for the Heap class.
		
	- Added Sorters :
		- ShellSorter
		- QuickSorter
		- BucketSorter
	

1.0 Beta 1
----------

Initial Release

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Web Developer
South Africa South Africa
The author is a software consultant in South Africa, specializing in bespoke software solutions.

Comments and Discussions