Archive for July, 2014

Tuesday, July 29th, 2014

Automatically generating IDL bindings

I have had multiple occasions where I needed to quickly generate bindings to an existing C library. The repetitive nature of creating these bindings calls out for a tool to automate this tool. For this purpose, I have written a class, MG_DLM, that allows: creating wrapper binding for routines from a header prototype declaration (with […]

No Comments » - Posted in IDL by

Tuesday, July 22nd, 2014

More on finding the n smallest values of array

Atle Borsholm recently posted a clever solution for finding the n-th smallest element in an array on the IDL Data Point. He compares this to a naive solution which simply sorts all the elements and grabs the n-th element: IDL> tic & x = ordinal_1(a, 123456) & toc % Time elapsed: 3.0336552 seconds. His solution […]

2 Comments » - Posted in IDL,Optimization by

Tuesday, July 8th, 2014

Visualizing algorithms

Mike Bostock has created some really great visualizations of sampling, shuffling, sorting, and maze generation algorithms. He ends with a quick discussion of using vision to think, using his NYTimes interactive graphic “Is It Better to Rent or Buy?” as an example: To fix this, we need to do more than output a single number. […]

No Comments » - Posted in Visualization by