|
|
Useful Code
I'm a fan of reusable components and generic programming. I think boost is awesome. I try to write code that's as readable, maintainable and reusable as possible. (Yes, I know: good luck doing that with research code. But even research code uses a lot of non-experimental algorithms.)
Various bits of possibly useful standalone code (all in C++) I've written:
- Hodgkin-Huxley neuron simulator
Using chapter 5 of Dayan & Abbott, Theoretical Neuroscience. Write matlab-readable simulation traces.
- Clustering algorithms
K-means, GMM clustering, hierarchical agglomerative clustering, mean-shift clustering and spectral clustering. With example driver files.
- Mouse navigator widget for 3-d gui components
Took me a few tries to get a usable combination of navigation controls. I settled on (1) rotating about the look-at point, (2) zooming, (3) moving the look-at point and eye position orthogonally to the line of sight. This particular widget is written for Qt, but changing that should be easy.
- Qt image viewer widgets
Based on a QScrollArea, like the Qt image viewer example program, but more usable than that one. With programmatic zoom.
- Config file reader
With an include directive for other config files, variable interpolation and comments.
- MATLAB-like tuple assignment
Allow a syntax equivalent to the MATLAB function [a, b, c] = f()...; [d, e] = f(); %ignores c.
As far as a license: do whatever you want, but if you make whatever you use my code for publicly available, please give me credit (eg "Hodgkin-Huxley simulator originally written by").
|