H
Harold Howe
Having developed in C++ prior to learning C#, I have always felt like
..NET was missing something. Specifically, something that fills the role
of the STL.
With that in mind, I have launched an open source project to create an
STL like library in C# 2.0. The project is called CSTL, and is available
from sourceforge.net:
http://sourceforge.net/projects/cstl
The library is pre-alpha, incomplete and not ready for primetime use.
However, the concepts are pretty much in place.
Here is an example of the Count algorithm:
int [] values = new int[] {1,2,3,2,2,4,5,2};
int count = Algorithm.Count(values, 2);
Here is an example of the CopyIf algorithm and back insertion iterators
int [] values = new int[] {1,2,3,2,2,4,5,2};
List<int> dest = new List<int>();
Algorithm.CopyIf(values, IteratorUtil.BackInserter(dest)
delegate(int x) { return x>2;});
// dest now contains {3,4,5}
There are other projects like this out there. However, none of them seem
quite right to me. Usually, they don't have an iterator concept, or they
use C++ in non CLS compliant ways.
Feedback is welcome.
H^2
Remove .bounce from email address.
..NET was missing something. Specifically, something that fills the role
of the STL.
With that in mind, I have launched an open source project to create an
STL like library in C# 2.0. The project is called CSTL, and is available
from sourceforge.net:
http://sourceforge.net/projects/cstl
The library is pre-alpha, incomplete and not ready for primetime use.
However, the concepts are pretty much in place.
Here is an example of the Count algorithm:
int [] values = new int[] {1,2,3,2,2,4,5,2};
int count = Algorithm.Count(values, 2);
Here is an example of the CopyIf algorithm and back insertion iterators
int [] values = new int[] {1,2,3,2,2,4,5,2};
List<int> dest = new List<int>();
Algorithm.CopyIf(values, IteratorUtil.BackInserter(dest)
delegate(int x) { return x>2;});
// dest now contains {3,4,5}
There are other projects like this out there. However, none of them seem
quite right to me. Usually, they don't have an iterator concept, or they
use C++ in non CLS compliant ways.
Feedback is welcome.
H^2
Remove .bounce from email address.