rootChains method

List<List<BayesVariable>> rootChains(
  1. List<BayesVariable> rootNodes
)

Returns all the chains until the rootNodes.

Implementation

List<List<BayesVariable>> rootChains(List<BayesVariable> rootNodes) {
  if (rootNodes.isEmpty) return <List<BayesVariable>>[];
  var selectedRootNodes = this.rootNodes;
  selectedRootNodes.retainAll(rootNodes);
  return _rootChainsImpl(selectedRootNodes);
}