separate cost computation for birth and death and a doctring fix
creates a `.mat` attribute for cost functions, `get_block()` should now be explicitly called