Can do. The cost matrix should have a particular structure though. Does that just need to be documented so the user can pass in an appropriate cost matrix?