rootChains method
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);
}