This is intended a light weight Sparse Grid implementation focused mostly on density estimation. This is a WIP and this readme will be filled with up to date comments about the process.
26/06/13: Change of plans - No longer going to rely on c++11 for the smart pointer and instead will be doing the memory management of this pointer myself. The reason to this is that it seems difficult to get the c++11 libraries to build on a osx right now, and integrating with distutils is a pain
Also, have updated the 'install' section.
25/06/14: A note on tests. I have decided to use the google c++ testing framework. I'm going to call this a hard dependency to support building of tests. Test builds will fail without gtests paths.
25/06/14: After struggling with a swig error for 3-4 days, and debugging my new basic functionality I think I finally have the basics working again ...
The roadmap from here in my mind is
-
Tests for the basic functionality: Make sure it is working for arbitrary dimensions and with and without grid. Add checks for file not found etc.
-
Add combination technique class and basic combination technique construction. Test
-
Implement generalized sparse grid combination technique, to allow for adaptivity in dimension at least.
-
Implment a tree structure for a dimensionally adaptive PDF at least.
-
Add spatial adaptivity ... this will be a big job.
-
Plus somewhere in there add a heat solve.
20/06/14: I have finished a major reorganization of the code. Unfortunately things are probably a little slower and less general now, but hopefully it is more readable, and will be easier to extend to the point I need.
New build instructions.
19/06/14: I have made the following design choices for now
-
C++11 : For the time being the library will be written for C++11. The reason to use C++ is so that I have access to both Eigen (a C++ template library for linear algebra) and std library containers. The reason to use C++11 is that this allows me to use shared_ptr without requiring boost. Eventually if it seems feasible I will try and copy in my own implementation of the required elements to try and move closer to C.
-
RegularGrid: I have decided that I will first focus on getting algoirthms working for the regular grid, then for the combination grid, then finally for a full SparseGrid. This may make a regular Sparse Grid difficult to implement if it becomes needed, but there are other libraries for this, and starting from that point seems top heavy when I hope for this to be a light weight implementation
-
Avoiding Recursion: I have decided to try and avoid recursion in algorithms where possible. I do not have a good reason for this, other than that it might be faster, and seems like a fun thing to try...
Comments: I appreciate any comments on the current state of the code, but do keep in mind two things:
- This is a WIP, and 2) this is as much a project to learn as anything else.
26/06/14:
To install change directory to the main project directory and call
make
If you have swig avaliable then you can build the python interface with
make swig
Note - this will require either working in a virtual environment or having admin access, as it runs a call to setup.py
. This installs the pysglite
python module with can be imported. Instructions on using this do not exist yet.
There are a number of tests built in the tests
folder. For the time being these are undocumented, but as I work there will be a readme in the tests folder explaining the various tests and how to visualise results.
** end current install instructions **
20/06/14: calling 'make' should build the libraries and install a python module (generated by swig) called 'sparsepad'. There are some minor problems with inpt and output right now, but will add a demo example tomorrow.