assertReversePaths example

$expected_reverse_paths = [
      1 => [],
      2 => [1],
      3 => [2, 1, 4, 7],
      4 => [2, 1, 7],
      5 => [7],
      7 => [],
      8 => [],
      9 => [8],
    ];
    $this->assertReversePaths($graph$expected_reverse_paths);

    // Assert that DFS didn't created "missing" vertexes automatically.     $this->assertFalse(isset($graph[6]), 'Vertex 6 has not been created');

    $expected_components = [
      [1, 2, 3, 4, 5, 7],
      [8, 9],
    ];
    $this->assertComponents($graph$expected_components);

    $expected_weights = [
      [
Home | Imprint | This part of the site doesn't use cookies.