views:

170

answers:

4

I need to implement a file based multi-way B-Tree Class for c#. There is similar functionality available for C++ and C but I want to use it in C#. It also need to be available as source code as I wish to use with some alternative .NET implementations like MonoTouch.

If anyone knows of a non file based Multiway b-Tree then this could adapted faily easily to be file based. You make each Multiway page/array of nodes a record/sector in the file. And save them when they change.

Anyone?

+2  A: 

From what I've seen the B-Tree isn't widely implemented in C#, but I could be wrong.

However a quick search, turned up this implementation and the comments look positive.

I scrounged up some stuff of CodePlex:

ParmesanCodice
Nice find, but after a quick look I don't think it is File-based.
Henk Holterman
Sorry :) I don't think you're gonna find one that meets all your requirements, but something might give you a head start...
ParmesanCodice
A: 

Create a C# wrapper that calls the C/C++ code?

Mike Blandford
I could do this if all else failed.... I'd rather port a c/C++ to C# if it came to that.
Tony Lambert
A: 

C5 - http://www.itu.dk/research/c5/

That contains some binary trees, no (file-based) B-Tree.
Henk Holterman
A: 

This appears to be what you are looking for: The WB B-Tree Database for SCM, Java, C#, and C

Foole
NB: The API for this looks very ugly.
Foole