|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for lazy permutation/combination enumeration (ah-comb-generators.H). More...
#include <algorithm>#include <bit>#include <set>#include <stdexcept>#include <vector>#include <gtest/gtest.h>#include <ah-comb-generators.H>Go to the source code of this file.
Functions | |
| TEST (CombGenerators, PermutationsOfEmptyAndSingleton) | |
| TEST (CombGenerators, PermutationsMatchStdNextPermutationCount) | |
| TEST (CombGenerators, PermutationsMatchStdNextPermutationContent) | |
| TEST (CombGenerators, PermutationsWithDuplicatesCollapseLikeStd) | |
| TEST (CombGenerators, PermutationsAreDistinctAsMultiset) | |
| TEST (CombGenerators, PermutationsEarlyBreakStopsWork) | |
| TEST (CombGenerators, CombinationsKZeroYieldsOneEmptyCombination) | |
| TEST (CombGenerators, CombinationsKEqualsNYieldsWholeSetOnce) | |
| TEST (CombGenerators, CombinationsKGreaterThanNThrows) | |
| TEST (CombGenerators, CombinationsCountMatchesCombinationCount) | |
| TEST (CombGenerators, CombinationsMatchBruteForceBitmaskEnumeration) | |
| TEST (CombGenerators, CombinationsAreDistinct) | |
| TEST (CombGenerators, CombinationsPreserveRelativeOrderOfSource) | |
| TEST (CombGenerators, CombinationSnapshotsSurviveGeneratorAdvancement) | |
Tests for lazy permutation/combination enumeration (ah-comb-generators.H).
Property tests comparing lazy_permutations against std::next_permutation (the trusted eager reference) and lazy_combinations against combination_count / a brute-force bitmask enumeration: same count, same set of results, no duplicates. Also covers empty/single-element inputs, duplicate elements (ties), k == 0, k == n, and early break.
Definition in file ah_comb_generators_test.cc.
| TEST | ( | CombGenerators | , |
| CombinationsAreDistinct | |||
| ) |
Definition at line 215 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::combination_count(), Aleph::Array< T >::insert(), and Aleph::lazy_combinations().
| TEST | ( | CombGenerators | , |
| CombinationsCountMatchesCombinationCount | |||
| ) |
Definition at line 173 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::combination_count(), Aleph::count(), k, and Aleph::lazy_combinations().
| TEST | ( | CombGenerators | , |
| CombinationsKEqualsNYieldsWholeSetOnce | |||
| ) |
Definition at line 154 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::lazy_combinations().
| TEST | ( | CombGenerators | , |
| CombinationsKGreaterThanNThrows | |||
| ) |
Definition at line 163 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::lazy_combinations().
| TEST | ( | CombGenerators | , |
| CombinationsKZeroYieldsOneEmptyCombination | |||
| ) |
Definition at line 145 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::lazy_combinations().
| TEST | ( | CombGenerators | , |
| CombinationsMatchBruteForceBitmaskEnumeration | |||
| ) |
Definition at line 185 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), k, Aleph::lazy_combinations(), and Aleph::Array< T >::size().
| TEST | ( | CombGenerators | , |
| CombinationSnapshotsSurviveGeneratorAdvancement | |||
| ) |
Definition at line 233 of file ah_comb_generators_test.cc.
References Aleph::Generator< T >::begin(), Aleph::blossom_maximum_cardinality_matching(), and Aleph::lazy_combinations().
| TEST | ( | CombGenerators | , |
| CombinationsPreserveRelativeOrderOfSource | |||
| ) |
Definition at line 224 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::lazy_combinations().
| TEST | ( | CombGenerators | , |
| PermutationsAreDistinctAsMultiset | |||
| ) |
Definition at line 125 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::lazy_permutations().
| TEST | ( | CombGenerators | , |
| PermutationsEarlyBreakStopsWork | |||
| ) |
Definition at line 133 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::count(), and Aleph::lazy_permutations().
| TEST | ( | CombGenerators | , |
| PermutationsMatchStdNextPermutationContent | |||
| ) |
Definition at line 92 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::lazy_permutations().
| TEST | ( | CombGenerators | , |
| PermutationsMatchStdNextPermutationCount | |||
| ) |
Definition at line 76 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::lazy_permutations().
| TEST | ( | CombGenerators | , |
| PermutationsOfEmptyAndSingleton | |||
| ) |
Definition at line 63 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::count(), and Aleph::lazy_permutations().
| TEST | ( | CombGenerators | , |
| PermutationsWithDuplicatesCollapseLikeStd | |||
| ) |
Definition at line 108 of file ah_comb_generators_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::lazy_permutations().