Skip to content

Commit

Permalink
Last fix vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
mhesselbarth committed Dec 21, 2023
1 parent 5b03d68 commit 8b37fde
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vignettes/articles/reconstruct_multi_patterns.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ marked_pattern <- as.ppp(random, W = owin(c(0, xr), c(0, yr)))
The point pattern must contain the following data An x and y coordinate, a metric mark (in metres) and a nominal mark defined as a factor. The order must be respected. Now the reconstruction with several marks can be started with the following code. Note that the maximum number of iterations has been set to max_steps = 10000 to keep the computation time for this example to a minimum. For an application, this value should be increased according to the number of points in the pattern.

```{r}
reconstruction <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 1, max_steps = 10000)
reconstruction <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 1, max_steps = 10000, issue = 5000)
```

As a result, you will receive a list containing a variety of information, for example, the reference pattern, the reconstructed pattern, the number of successful actions, the energy development and much more. If you wish to perform several reconstructions of the same reference pattern, you must increase n_repetitions to the desired number.

```{r}
reconstruction_2 <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 3, max_steps = 10000)
reconstruction_2 <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 3, max_steps = 10000, issue = 5000)
```

To activate a visualisation of the reconstruction that shows the changes in the pattern at the relevant time, you must proceed as follows.

```{r}
reconstruction_3 <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 1, max_steps = 10000, plot = TRUE)
reconstruction_3 <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 1, max_steps = 10000, issue = 5000, plot = TRUE)
```

Finally, you can use the `plot()` function to view different summary statistics of the reference pattern (dashed line) compared to the reconstructed pattern (solid line).

```{r}
plot(reconstruction)
plot(reconstruction, verbose = FALSE)
```

0 comments on commit 8b37fde

Please sign in to comment.