order4chain {rbmn}R Documentation

returns a topological order of a /chain/ or checks a proposed order.

Description

From a chain object returns one of the possible topological orders, through a permutation when is.null(ord). If not ord must be a proposed order to be checked given as a permutation if is.numeric(ord) or a vector of ordered names if is.character(ord).

Usage

order4chain(chain, ord=NULL)

Arguments

chain

the chain object to be considered.

ord

Indicates what must be done. NULL to get a topological order associated to the chain otherwise a permutation to be checked as one of the possible topological orders of the chain.

Details

For the moment the ord option is bad and an error message is returned when used.

Value

a permutation vector of the nodes of the /nbn/ or a named character with the nodes not having their parents before them; when it is of length zero this means that the check was successful.

Examples

 order4chain(rbmn0chain.02);
 order4chain(rbmn0chain.02, order4chain(rbmn0chain.02));

[Package rbmn version 0.9-6 Index]