ngme random walk model of order 1

rw1(mesh, cyclic = FALSE, ...)

Arguments

mesh

mesh for build the model

cyclic

whether the mesh is circular, i.e. the first one is connected to the last if it is circular, we will treat the 1st location and the last location as neigbour, with distance of average distance.

...

additional arguments

Value

a list

Examples

r1 <- rw1(1:7, cyclic = TRUE); r1$K
#> 7 x 7 sparse Matrix of class "dgCMatrix"
#>                          
#> [1,]  1 -1  .  .  .  .  .
#> [2,]  .  1 -1  .  .  .  .
#> [3,]  .  .  1 -1  .  .  .
#> [4,]  .  .  .  1 -1  .  .
#> [5,]  .  .  .  .  1 -1  .
#> [6,]  .  .  .  .  .  1 -1
#> [7,] -1  .  .  .  .  .  1