These functions return the predecessors and successors in the Better-Than-Graph of a preference.
Note that the successors/predecessors can can be plotted via get_btg
.
Before any of the successor/predecessor functions can be used the initialization has to be called as follows:init_pred_succ(p, df)
There p
is a preference object and df
a dataframe. This statement calculates the Better-Than-Relation on df
w.r.t. p
.
Afterwards the subsequent predecessor and sucessor functions can be called.
The value of v
is a numeric vector within 1:nrow(df)
and characerizes a subset of tuples in df
.
The return value of these functions is again a numeric vector refering to the row numbers in df
and it is always ordered ascending, independent of the order of the indices in v
.
[object Object],[object Object],[object Object],[object Object]
If v
has length 1, then the value of intersect
does not matter, as there is nothing to intersect or join.
For scalar values x
and y
the following identities hold, where f
is one of the predecessor/successor functions:
f(p, c(x, y), intersect = FALSE) == union(f(p, x), f(p, y))
f(p, c(x, y), intersect = TRUE) == intersect(f(p, x), f(p, y))