File: cycle_detection.rs

package info (click to toggle)
rust-pathfinding 4.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,024 kB
  • sloc: sh: 19; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 227 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
use pathfinding::directed::cycle_detection::*;

#[test]
fn floyd_works() {
    assert_eq!(floyd(-10, |x| (x + 5) % 6 + 3), (3, 6, 2));
}

#[test]
fn brent_works() {
    assert_eq!(brent(-10, |x| (x + 5) % 6 + 3), (3, 6, 2));
}