violations          package:relations          R Documentation(utf8)

_V_i_o_l_a_t_i_o_n_s _o_f _R_e_l_a_t_i_o_n _P_r_o_p_e_r_t_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Computes a measure of remoteness of a relation from a specified
     property.

_U_s_a_g_e:

     relation_violations(x, family = c("T", "transitive",
                                       "S", "symmetric",
                                       "A", "antisymmetric",
                                       "C", "complete",
                                       "R", "reflexive"))

_A_r_g_u_m_e_n_t_s:

       x: an endorelation.

  family: a character string specifying one of the relation families
          for which the number of violations can be computed.

_V_a_l_u_e:

     The number of violations for the specified family, i.e. the
     minimum number of pairs (for transitive relations: triples) that
     must be modified/added/removed to make the relation comply to the
     families' restrictions.

_E_x_a_m_p_l_e_s:

     ## partial order:
     R <- as.relation(1:3)
     relation_incidence(R)
     ## R clearly is transitive, but not symmetric:
     relation_violations(R, "transitive")
     relation_violations(R, "symmetric")

     ## create a simple relation:
     R <- relation(domain = letters[1:2],
                   graph = set(pair("a","b"), pair("b","a")))
     relation_incidence(R)
     ## R is clearly symmetric, but not antisymmetric:
     relation_violations(R, "symmetric")
     relation_violations(R, "antisymmetric")

