| explain_dispatch | R Documentation |
method = "auto" selects, and whyassignment(method = "auto") picks a solver from a small set of rules
evaluated against one pass over the cost matrix. This reports the decision
without solving: which rule fired, the property that triggered it, the rules
that were tested first and did not fire, and the internal representation the
problem will be handed to the solver in.
explain_dispatch(
cost,
method = "auto",
maximize = FALSE,
cardinality = c("complete", "maximum", "fixed"),
n_matches = NULL,
unmatched_penalty = NULL
)
## S3 method for class 'dispatch_explanation'
print(x, ...)
cost |
Numeric matrix, as passed to |
method |
Character scalar. |
maximize, cardinality, n_matches, unmatched_penalty |
As in |
x |
A |
... |
Ignored. |
The same rule table drives the dispatch itself, so the report cannot drift from the behaviour.
An object of class dispatch_explanation, a list with elements:
method - the solver that will run.
explicit - TRUE when method was named rather than dispatched.
rule, condition, reason - the rule that fired under "auto".
considered - data frame of every rule tested, in order, with
whether it fired.
n, m, transposed - problem shape, and whether the solver sees
the transpose. Rectangular problems are transposed internally so the
solver always has at least as many columns as rows.
probe - the single-pass summary the rules read.
Invisibly returns x.
assignment()
explain_dispatch(matrix(runif(400), 20, 20))
explain_dispatch(matrix(sample(0:1, 400, TRUE), 20, 20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.