Java icon indicating copy to clipboard operation
Java copied to clipboard

Welsh Powell algorithm code analysis

Open straf10 opened this issue 1 year ago • 0 comments

hello, I've run a code analysis on the two classes i had previously wrote and merged, WelshPowell Graph and wanted to share the results with you.

The metrics have been produced by an intellij idea plugin and regard the : cognitive complexity, cyclomatic complexity, wmc, rfc, dit, cbo, lcom.

All the values for the 4 methods i had implemented and the 2 classes in general are inside the thresholds except one. The welshPowellColouring method is equal to the limit of cyclomatic complexity and exceeds the limit of cognitive complexity(19>15).

This means that the code can be slightly improved.

  • [x] I have read CONTRIBUTING.md.
  • [x] This pull request is all my own work -- I have not plagiarized it.
  • [x] All filenames are in PascalCase.
  • [x] All functions and variable names follow Java naming conventions.
  • [x] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • [x] All new code is formatted with clang-format -i --style=file path/to/your/file.java

straf10 avatar May 21 '24 19:05 straf10