maciej-bendkowski / boltzmann-brain

Analytic sampler compiler for combinatorial systems
BSD 3-Clause "New" or "Revised" License
30 stars 5 forks source link

Turn to a sparse paganini specification format #4

Closed maciej-bendkowski closed 5 years ago

maciej-bendkowski commented 6 years ago

Currently, both bb and paganini use a rather "dense" input format. In the case of large combinatorial specifications such a format wastes a lot of space (and also time) as usually specifications are "sparse". With the new version, we should switch therefore to a more "eco-friendly" paganini specification.

maciej-bendkowski commented 5 years ago

A series of commits up to 9f513b2bc47f40ad21b04c8045dd605e481eb5fc provides a "sparse" input format for paganini, in which "empty" monomials are no longer written down. Instead, only non-zero entries with respective occurrences (indices) are encoded. It should be noted that, although such a representation is generally more efficient, internally, paganini uses dense matrices. Perhaps it's possible to switch to scipy's sparse matrices, instead.