Skip to contents

The ripple of each step: how many links of the complete graphs changed for each link of the minimal form (what was written, roughly) that changed. A ripple of 10 means that each written change had, on average, ten consequences: features far from the edit gained or lost dependencies or conflicts. Count the graphs together (the default): a written requirement also makes conflicts, which are inherited downwards (property P2).

Usage

vp_ripple(history, by_graph = FALSE)

Arguments

history

A history: the versions of a model, from vp_read_history() or vp_history(), oldest first.

by_graph

FALSE: one row per step, the graphs added up; TRUE: one row per step and graph.

Value

A tibble with step, from, to, (graph,) written_gained, written_lost (in the minimal forms), gained, lost (in the complete graphs) and ripple (complete changes over written changes; NA when nothing written changed).

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_ripple(history)
#> # A tibble: 4 × 8
#>    step from    to      written_gained written_lost gained  lost ripple
#>   <int> <fct>   <fct>            <int>        <int>  <int> <int>  <dbl>
#> 1     1 miband1 miband2              0            0      0     0  NA   
#> 2     2 miband2 miband3              7            2     20     0   2.22
#> 3     3 miband3 miband4              2            1     19    12  10.3 
#> 4     4 miband4 miband6              6            4     68     8   7.6