get_hasse_diag {rPref}R Documentation

Adjacency List of Hasse diagram

Description

Returns the adjacency list of the Hasse diagram of a preference as an (n x 2) matrix. This is the transitive reduction of the preference relation.

Usage

get_hasse_diag(df, pref)

Arguments

df

A data frame.

pref

A preference on the columns of df, see psel for details.

Details

A row (i, j) in the resulting matrix means that df[i,] is better than df[j,] with regard to the preference p. The matrix is the transitive reduction (Hasse diagram) of the induced relations, i.e., if (1,2) and (2,3) occur in the result, then (1,3) will not be contained. The number of rows in the result depends on the number of non-transitive Better-Than-Relationships in df w.r.t. p.

See Also

get_btg to plot the Hasse diagram.

Examples


get_hasse_diag(mtcars, low(mpg))


[Package rPref version 1.4.0 Index]