Added `sim_fn` and `order` parameters to similarity functions and BeagleViewer methods. Added `row_acos` and `row_acos_mat` functions.