mask_forbidden: Apply the 'forbidden' sentinel to a cost matrix

View source: R/utils.R

mask_forbiddenR Documentation

Apply the forbidden sentinel to a cost matrix

Description

Every front door that documents a forbidden argument masks with this one, so lap_solve(), lap_solve_batch() and lap_solve_kbest() read the same sentinel the same way. NA and Inf cells are forbidden to the solvers already, so forbidden = NA is the identity.

Usage

mask_forbidden(cost_matrix, forbidden = NA)

Value

The cost matrix with sentinel cells replaced by Inf.


couplr documentation built on Sept. 17, 2026, 1:08 a.m.