edmc
edmc(D, method = "dpf", ...)
D | An nxn partial-distance matrix to be completed, with unkown entries set to NA. |
---|---|
method | The algorithm to be used to complete the distance matrix D. One of sdp, npf, dpf, snl, or grs |
... | The remaining input values required for the completion method specified in |
The return from edmc
depends on the method used. The help pages for each individual method
can be consulted for specific output.
Depending on the method called, a number of input values are possible.
set.seed(1337) D <- matrix(c(0,3,4,3,4,3, 3,0,1,NA,5,NA, 4,1,0,5,NA,5, 3,NA,5,0,1,NA, 4,5,NA,1,0,5, 3,NA,5,NA,5,0),byrow=TRUE, nrow=6) edmc(D,method = "dpf", d=3, toler=1e-8)#> $D #> [,1] [,2] [,3] [,4] [,5] [,6] #> [1,] 0 3.000000 4.000000 3.000000 4.000000 3.00000 #> [2,] 3 0.000000 1.000000 4.242738 5.000000 4.24788 #> [3,] 4 1.000000 0.000000 5.000000 5.656735 5.00000 #> [4,] 3 4.242738 5.000000 0.000000 1.000000 4.24077 #> [5,] 4 5.000000 5.656735 1.000000 0.000000 5.00000 #> [6,] 3 4.247880 5.000000 4.240770 5.000000 0.00000 #> #> $optval #> [1] 1.23048e-09 #>