Merge pull request #1 from vrabaud/master

fix compilation issues
convenience
speedup computation