def isCyclic(graphManager: PricingGraphManager) = graphManager.nodes.exists(hasCycle(graphManager, _, Seq())) private def hasCycle(graphManager: PricingGraphManager, node:PricingGraphNode, visitedNodes:Seq[PricingGraphNode]) : Boolean = if (visitedNodes.contains(node)) true else node.children.exists(hasCycle(graphManager, _, node +: visitedNodes)
File generation with SBT
10 years ago
No comments:
Post a Comment