ioam / topographica

A general-purpose neural simulator focusing on topographic maps.
topographica.org
BSD 3-Clause "New" or "Revised" License
53 stars 32 forks source link

Sparse implementation #500

Closed philippjfr closed 11 years ago

philippjfr commented 11 years ago

Proposed Topographica sparse support for using Eigen3. Eigen3 auto-mirror added as submodule in external directory. Uses C++ and Cython wrappers to interface Eigen3 with SparseCFProjection and all files are in topo/sparse/. SparseConnectionField objects are views of the sparse matrix owned by the SparseCFProjection and support the normal interface for CFs.

Code has been tested for numeric accuracy and matches dense results identically if active_units_mask is disabled, otherwise matches to 7 dp. Supports sufficient functionality for real work but code may require further tidying.

Philipp & Jean-Luc

jbednar commented 11 years ago

Looks like a whole lot of work; glad I didn't have to do it! Looks very reasonable to me. I've made small comments in the code itself, but overall:

philippjfr commented 11 years ago

I've made most of the changes you suggested. What's still missing are tests comparing the sparse and dense implementations with and without the active_units_mask and a test for the CFSOF_Plugin but since the test data should be regenerated even for the dense version, I'd rather do that in a number of consecutive commits.