R/holds_respects.R
grapes-respects-grapes.RdCheck if Set or FormalContext respects an ImplicationSet
set %respects% imps(list of Sets, or a FormalContext) The sets of attributes to check whether they respect the ImplicationSet.
(ImplicationSet) The set of implications to check.
A logical matrix with as many rows as Sets and as many columns as implications in the ImplicationSet. A TRUE in element (i, j) of the result means that the i-th Set respects the j-th implication of the ImplicationSet.
fc <- FormalContext$new(planets)
fc$find_implications()
imps <- fc$implications$clone()
fc %respects% imps
#> 9 x 10 sparse Matrix of class "lgCMatrix"
#> [[ suppressing 10 column names ‘imp_01’, ‘imp_02’, ‘imp_03’ ... ]]
#>
#> set_1 | | | | | | | | | |
#> set_2 | | | | | | | | | |
#> set_3 | | | | | | | | | |
#> set_4 | | | | | | | | | |
#> set_5 | | | | | | | | | |
#> set_6 | | | | | | | | | |
#> set_7 | | | | | | | | | |
#> set_8 | | | | | | | | | |
#> set_9 | | | | | | | | | |