A step of the RcppExports implementation. Called by morie_spatial_voting_smacof.
See the file header for the source the module follows.
Examples
D <- as.matrix(dist(cbind(c(0, 1, 0, 1), c(0, 0, 1, 1))))
set.seed(20)
X <- matrix(rnorm(8), 4, 2)
morie_spatial_smacof_step_cpp(X, D, W = matrix(1, 4, 4) - diag(4))
#> $coordinates
#> [,1] [,2]
#> [1,] 0.5029920 0.1756576
#> [2,] -0.3008885 0.6391200
#> [3,] 0.4714521 -0.6698285
#> [4,] -0.6735556 -0.1449491
#>
#> $stress
#> [1] 0.1627484
#>
#> $distances
#> [,1] [,2] [,3] [,4]
#> [1,] 0.0000000 0.9279123 0.8460742 1.2194478
#> [2,] 0.9279123 0.0000000 1.5198211 0.8681273
#> [3,] 0.8460742 1.5198211 0.0000000 1.2595796
#> [4,] 1.2194478 0.8681273 1.2595796 0.0000000
#>
