listmat | R Documentation |
Transforms the cost matrix of the assignment problem in the corresponding list of suitable applicants for each job.
listmat(x)
x |
A cost matrix where entry (i,j) is the cost of assigning job i to applicant j. |
In statistical matching problems the input is usually the cost matrix while in assignment problems is the list of assignable elements. Functions matlist
and listmat
go back and forth these two representations of the input.
A list of suitable applicants. The i^{th} element of the list contains the suitable applicants for job i. These are all applicants with finite assignment cost. Note that if the cost matrix contains finite non zero values there is a loss of information in the transformation.
Massimo Cannas <massimo.cannas@unica.it>
See matlist
, the reverse function.
# a list of feasible applicants for five jobs M1<-c("A","B","C") M2<-c("A","C") M3<-c("B") M4<-c("A","C") M5<-c("A","D") M <-list(M1,M2,M3,M4,M5) M # list --> cost matrix m <- listmat(M) # cost matrix --> list l <- matlist(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.