C# (CSharp) SharpNeat.Network CyclicNetworkTest - 2개의 예제가 발견되었습니다. 이것들은 오픈소스 프로젝트에서 추출된 C# (CSharp)의 SharpNeat.Network.CyclicNetworkTest에 대한 실세계 최고 등급의 예제들입니다. 예제들을 평가하여 예제의 품질 향상에 도움을 줄 수 있습니다.
An algorithm for testing for the presence of at least one connectivity cycle within a network. Method. ======= 1) We loop over all nodes in the network and perform a depth-first traversal from each node. (Note. the order that the nodes are traversed does not affect the correctness of the method) 2) Each traversal keeps track of its ancestor nodes (the path to the current node) for each step in the traversal. Thus if the traversal encounters an ancestor node then a cycle has been detected. 3) A set of visited nodes is maintained. This persists between traversals and allows each traversal to avoid traversing into nodes that have already been traversed. Note. We must traverse from each node rather then just e.g. the input nodes, because the network may have connectivity dead ends or even isolated connectivity that therefore would not be traversed into by following connectivity from the input nodes only, hence we perform a traversal from each node and attempt to maintain algorithmic efficiency by avoiding traversal into nodes that have already been traversed into.