A B+tree simple implementation in C - c

I'm working on a fun project where I need a simple key/value store that uses B+Trees. I studied them some years ago, and to be honest, I don't want to reinvent the wheel, so I'm looking for a simple implementation in C of b+tree that I can just include in my project.
I know of sqlite's, dbm's and tokyocabinet's ones but they're a little too "complicated" for my needs. Is there any (even pedagogical) work on this you can refer me to? Do you have some code to share?
Thanks a lot!

There's one listed in the wikipedia article:
Interactive B+ Tree Implementation in C
Perhaps you can edit out the "interactive" parts?

I think there are many links where you can read and implement for yourself(which is the best way since it helps you learn).
But if you dont have time you can see one forum here.
You can customize it to your needs
http://www.codeguru.com/forum/showthread.php?t=453150

Related

How Can I use the GtkPlug/GtkSocket in GTK+

I'm a newbie to GTK+, I want to use GtkPlug/GtkSocket to embed another application with my application. I referred to Devhelp, but only a few introduction about these two class. I also searched many days, but I failed to find a demo.
Can somebody show me how to use GtkPlug/GtkSocket? complete source code and explanation is better. Thank you all.
There used to be a section in the GTKmm tutorial, here is the content that is no longer present: https://gitlab.gnome.org/GNOME/gtkmm-documentation/-/commit/2c11fad94458d4e72998e13aa1de8d7f742ce74b
Even though it is in C++, it gives a good example of how to write a simple plug-socket system. However, since I originally wrote this answer 10 years ago, the best practice has changed to "don't do this".

Modelling C Programs

I have done some research on this question and most answers are a few years old or suggest just using text.
I need to model some C code I have developed for an embedded system. It is not massively complex but there are a great number of functions and UML does not appear to cover it as this is working on the pretense that the language to be modeled is object orientated.
Whilst I have read that it isn't far fetched to modify this and still use it to try and model C I wondered what thoughts people had on this or if anyone had any suggestions for how I could professionally document or model my code?
You should take a look at the Gtk documentation and the GTK-Doc tool:
http://www.gtk.org/documentation.html
It is a big API and it is pure C.

What do you think about Mobile Robotics Programming Toolkit?

Did anyone use Mobile Robotics Programming Toolkit? What do you think about it?
I am currently studying the SLAM problem (I am quite new in this area) and I am planning to implement a Mono Slam solution based on Extended Kalman Filter (C++). Do you recommend to implement my solution on top of Mobile Robotics Programming Toolkit, or it would be better to start from scratch?
Well, I'd say it depends. Why would you use it? Does it provide anything special that you need, like feature extraction or visualization? Since it's for learning purposes, I'm assume their monoslam implementation is of little interest.
If not, why bother? Once you have your measurements, you pretty much only need a decent linear algebra library. I recommend Eigen; it's easy to use and does everything you need.
Disclaimer: I haven't actually used MRPT.
FYI, Eigen is also included in MRPT. I am starting to use MRPT as well. It's quite a good tool for SLAM beginner->advanced I think.

pure c support/util library

I am searching a library in C/pragma/.. for basic programming tasks.
Something for handling and creating Lists and hasmaps and arrays and souch stuff.
So i dont have to reinvent the wheel again and again and write the same structures again and again.
But has to be pure C library.
Thanks for any help.
You might want to retag your question and remove the C++ tag, as your question is a little strange with the tag.
If you need something implemented in C, then look at Glib, which is part of GTK+, and it implements data structures like linked lists and trees.
Alternatively, the Apache Portable Runtime is a project from Apache which is also written in C, and is used in the Apache web server.
In plain c projects I tend to use the APR.
Maybe it covers all the things you need. And it provides a nice abstraction of the OS too.
Glib
In addition to the other answers, you might take a look at the source code accompanying the book C Interfaces and Implentations.

How does Wolfram Alpha work?

Behind the tables and tables of raw data, how does Wolfram Alpha work?
I imagine there are various artificial intelligence mechanisms driving the site but I can't fathom how anyone would put something like this together. Are there any explanations that would help a programmer understand how something like this is created? Does the knowledge base learn on its own or is it taught very specific details in a very organized manner? What kind of structure and language is used to store this type of data?
Obviously this is a huge question and can't fully be answered here but some of the general concepts would be nice to know so I can build off of them and do my own research.
Does the knowledge base learn on its
own or is it taught very specific
details in a very organized manner?
AI systems are usually something distinctly in between. The system will usually learn in a directed way, where the developers can apply a metric that measures the quality of the learning, and the system learns by attempting to maximise that metric. Where the expertise comes in is in developing efficient and effective representations of the data, so that it lends itself to this learning process and to the measurement of how well the learning is going.
Take a look at the API
This official blog post has some portion of the explanation: the language Mathematica.
Looks like a large number of algorithms from which some that might be relevant are selected by pattern matching.

Resources