This question is probably quite different from what you are used to reading here - I hope it can provide a fun challenge.
Essentially I have an algorithm that uses 5(or more) variables to compute a single value, called outcome
. Now I have to implement this algorithm on an embedded device which has no memory limitations, but has very harsh processing constraints.
Because of this, I would like to run a calculation engine which computes outcome
for, say, 20 different values of each variable and stores this information in a file. You may think of this as a 5(or more)-dimensional matrix or 5(or more)-dimensional array, each dimension being 20 entries long.
In any modern language, filling this array is as simple as having 5(or more) nested for
loops. The tricky part is that I need to dump these values into a file that can then be placed onto the embedded device so that the device can use it as a lookup table.
The questions now, are:
- What format(s) might be acceptable for storing the data?
- What programs (MATLAB, C#, etc) might be best suited to compute the data?
- C# must be used to import the data on the device - is this possible given your answer to #1?
Edit: Is it possible to read from my lookup table file without reading the entire file into memory? Can you explain how that might be done in C#?