Skip to content

Add optional PLIWS#748

Open
Sneper-Breeze wants to merge 3 commits into
Desbordante:mainfrom
Sneper-Breeze:optional_pliws
Open

Add optional PLIWS#748
Sneper-Breeze wants to merge 3 commits into
Desbordante:mainfrom
Sneper-Breeze:optional_pliws

Conversation

@Sneper-Breeze

@Sneper-Breeze Sneper-Breeze commented May 2, 2026

Copy link
Copy Markdown
Collaborator

This PR makes Tane and AfdMetricCalc use PLIWS only when explicitly enabled via a boolean flag.

Changes:

  • In AfdMetricCalc (src/core/algorithms/fd/afd_metric):

    • Added methods to support computations with both PLI and PLIWS.
    • Rewrote ExecuteInternal logic using std::variant to select between PLI and PLIWS based on the use_pliws flag (default: false).
  • In TaneCommon:

    • Rewrote ComputeDependencies logic with std::variant to work with both PLI and PLIWS.

Behavior:

  • The public interface remains unchanged for existing callers. An optional use_pliws parameter (default false) can now be passed at algorithm creation.
  • Old code continues to work as before.

Testing:

  • Added new tests for AfdMetricCalc with and without PLIWS to verify correctness.
  • All existing tests still pass, confirming no regression.

Comment thread src/core/algorithms/fd/tane/tane_common.cpp Outdated
Comment thread src/core/algorithms/fd/afd_metric/afd_metric_calculator.cpp Outdated
Comment thread src/tests/unit/test_afd_metric_calculator.cpp Outdated
Comment thread src/core/algorithms/fd/afd_metric/afd_metric_calculator.cpp Outdated
Comment thread src/tests/unit/test_afd_metric_calculator.cpp Outdated
Comment thread src/core/algorithms/fd/afd_metric/afd_metric_calculator.cpp Outdated
Comment thread src/core/algorithms/fd/tane/tane.cpp Outdated
Comment thread src/tests/unit/test_afd_metric_calculator.cpp
Comment thread src/core/algorithms/fd/tane/tane_common.h Outdated
Comment thread src/core/config/use_pliws/option.cpp Outdated
Comment thread src/core/algorithms/fd/tane/tane_common.cpp
Comment thread src/core/algorithms/fd/afd_metric/afd_metric_calculator.cpp
Comment thread src/core/algorithms/fd/tane/tane_common.cpp
Comment thread src/core/algorithms/fd/afd_metric/afd_metric_calculator.cpp
Comment thread src/core/algorithms/fd/afd_metric/afd_metric_calculator.cpp Outdated
Comment thread src/tests/unit/test_afd_metric_calculator.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants