<commit_before><?php
    require_once('./algorithms/dijkstra.php');

    // Simple relations
    $relations = [
        1 => [ // point 1 relations
            [2, 1],  // to point 2 - distance 1
            [4, 2],  // to point 4 - distance 2
        ],  # 1
        2 => [ // point 2 relations
            [1, 1],  // to point 1 - distance 1
            [3, 3],  // to point 3 - distance 3
            [4, 3],  // to point 4 - distance 3
        ],  # 2
        3 => [ // point 3 relations
            [2, 3],  // to point 2 - distance 3
            [4, 1],  // to point 4 - distance 1
            [5, 5],  // to point 5 - distance 5
        ],  # 3
        4 => [ // point 4 relations
            [1, 2],  // to point 1 - distance 2
            [2, 3],  // to point 2 - distance 3
            [3, 1],  // to point 3 - distance 1
            [5, 1],  // to point 5 - distance 1
        ],  # 4
        5 => [ // point 5 relations
            [3, 5],  // to point 3 - distance 5
            [4, 1],  // to point 4 - distance 1
        ],  # 5
    ]; # $relations

    $dijkstra = new algorithms\dijkstra($relations);
	var_dump($dijkstra->distances(1, 1)); // all distances from point 1 to other points
    var_dump($dijkstra->generate()); // all distances from all points to all points<commit_msg>Demo.php fix<commit_after><?php
    require_once('./algorithms/dijkstra.php');

    // Simple relations
    $relations = [
        1 => [ // point 1 relations
            [2, 1],  // to point 2 - distance 1
            [4, 2],  // to point 4 - distance 2
        ],  # 1
        2 => [ // point 2 relations
            [1, 1],  // to point 1 - distance 1
            [3, 3],  // to point 3 - distance 3
            [4, 3],  // to point 4 - distance 3
        ],  # 2
        3 => [ // point 3 relations
            [2, 3],  // to point 2 - distance 3
            [4, 1],  // to point 4 - distance 1
            [5, 5],  // to point 5 - distance 5
        ],  # 3
        4 => [ // point 4 relations
            [1, 2],  // to point 1 - distance 2
            [2, 3],  // to point 2 - distance 3
            [3, 1],  // to point 3 - distance 1
            [5, 1],  // to point 5 - distance 1
        ],  # 4
        5 => [ // point 5 relations
            [3, 5],  // to point 3 - distance 5
            [4, 1],  // to point 4 - distance 1
        ],  # 5
    ]; # $relations

    $dijkstra = new algorithms\dijkstra($relations);
	var_dump($dijkstra->distances(1)); // all distances from point 1 to other points
    var_dump($dijkstra->generate()); // all distances from all points to all points
{'fraction_non_alphanumeric': 0.14583333333333334, 'fraction_numerical': 0.056712962962962965, 'mean_word_length': 1.2705779334500875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3029384', 'n_tokens_mistral': 898, 'n_tokens_neox': 781, 'n_words': 301}