| result_accessors | R Documentation |
Accessors for the parts of a matching or assignment result that later analyses read.
certificate(x, ...)
potentials(x, ...)
unmatched_units(x, ...)
## S3 method for class 'cardinality_certificate'
print(x, ...)
## S3 method for class 'cardinality_certificate'
summary(object, ...)
## S3 method for class 'cardinality_certificate'
glance(x, ...)
## S3 method for class 'assignment_certificate'
glance(x, ...)
## S3 method for class 'flow_certificate'
glance(x, ...)
x, object |
A result of |
... |
Ignored. |
certificate() returns the checked optimality certificate, an
assignment_certificate or flow_certificate (see
verify_assignment()), or NULL when none was computed. A matching
carries one when it was solved with certify = TRUE or in implicit mode.
Cardinality matching returns a cardinality_certificate recording its
completed search and checked bounds. Its summary exposes the size,
balance, and distance stages and the constraint report.
potentials() returns the dual potentials as a list with elements
left and right (named by unit id) for a matching, or u and v for
an assignment of a cost matrix; NULL when the solver returned none and
no certificate was computed. A certified solve by a solver without
potentials carries the ones its certificate was checked against.
The values are double precision numbers. An exact certificate that reads
ā recovered potentialsā was decided on potentials that doubles cannot
hold; the certificate returns them as exact_u and exact_v (see
verify_assignment()), and the doubles of potentials() then meet the
conditions to rounding.
unmatched_units() returns the ids of the unmatched units as a list with
elements left and right, or the unmatched row indices of an
assignment.
glance() on a certificate returns one row with certified,
arithmetic, primal_objective, dual_objective, duality_gap and,
for an assignment certificate, max_suboptimality.
See Details.
set.seed(1)
cost <- matrix(runif(16), 4)
res <- assignment_duals(cost)
potentials(res)
certificate(assignment(cost, certify = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.