Skip to content

Automated execution from csv of algorithm modules (with no errors) #1048

Description

@wilsonmar

Generate file algorithms-001.csv to list each the 393 modules here
so that new module in src/utils/run-algorithms.rs sequentially executes them to:

  • recompile after module dependency upgrades
  • identify coding errors
  • identify function issues
  • identify version issues (using crate-audit)
  • identify performance issues

run-algorithms.rs is added to this repo's Cargo.toml.

The file contains these fields:

  • seq - run sequence.
  • category1 — top-level module (e.g., Backtracking), with Category / Subcategory for nested entries like Data Structures / Probabilistic or Machine Learning / Loss Function
  • category2 field allow these modules to be in a second category
  • name — display name from the markdown link (e.g., All Combinations of Size K)
  • filename — the .rs source file (e.g., all_combination_of_size_k.rs). The name used to invoke modules.
  • wikipedia to provide the url to a description

The 22 categories are listed in the lib.rs file.

mod.rs files are not in the .csv file because they're in every category folder.

Categories with sub-categories:

  • data_structures/probabilistic
  • general/permutations
  • machine_learning/loss_function
  • machine_learning/optimization

The category2 field allow these modules to be in a second category:

  • burrows_wheeler_transform.rs — in both compression/ and string/
  • catalan_numbers.rs — in both dynamic_programming/ and math/
  • hamming_distance.rs — in both bit_manipulation/ and string/
  • huber_loss.rs — in both machine_learning/loss_function/ and math/
  • huffman_encoding.rs — in both compression/ and general/
  • interest.rs — in both financial/ and math/
  • run_length_encoding.rs — in both compression/ and string/
  • subset_sum.rs — in both backtracking/ and dynamic_programming/

File DIRECTORY.md had these discrepancies:

  • ciphers/gronsfeld.rs - Gronsfeld cipher - added to DIRECTORY.md
  • greedy/minimum_coin_change.rs - extra s in .rs name in DIRECTORY.md
  • data_structures/skip_list.rs - Skip list - added to DIRECTORY.md
    Several mod.rs files are not in the spreadsheet:
  • big_integer/mod.rs Module root

The discrepancies are fixed in the 393 modules listed in the .csv file.

During testing, an error was found in data_structures/floyds_algorithm.rs,
described in a separate issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions