|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Unit tests for Gen_Cartesian_Tree, Gen_Euler_Tour_LCA, and Gen_Cartesian_Tree_RMQ. More...
#include <gtest/gtest.h>#include <tpl_cartesian_tree.H>#include <tpl_sparse_table.H>#include <algorithm>#include <cstddef>#include <numeric>#include <random>#include <vector>Go to the source code of this file.
Functions | |
| TEST (GenCartesianTree, Empty) | |
| TEST (GenCartesianTree, SingleElement) | |
| TEST (GenCartesianTree, TwoElements) | |
| TEST (GenCartesianTree, HeapProperty) | |
| TEST (GenCartesianTree, InorderProperty) | |
| TEST (GenCartesianTree, ManualSmall) | |
| TEST (GenCartesianTree, DuplicateValues) | |
| TEST (GenCartesianTree, Sorted) | |
| TEST (GenCartesianTree, ReverseSorted) | |
| TEST (GenCartesianTree, AllEqual) | |
| TEST (GenCartesianTree, CustomComparatorMax) | |
| TEST (GenCartesianTree, FromArray) | |
| TEST (GenCartesianTree, FromVector) | |
| TEST (GenCartesianTree, FromInitList) | |
| TEST (GenCartesianTree, FromDynList) | |
| TEST (GenCartesianTree, Height) | |
| TEST (GenCartesianTree, CopyMoveSwap) | |
| TEST (GenCartesianTree, BoundsChecking) | |
| TEST (GenCartesianTree, StressRandom) | |
| TEST (EulerTourLCA, Empty) | |
| TEST (EulerTourLCA, SingleElement) | |
| TEST (EulerTourLCA, EulerTourSize) | |
| TEST (EulerTourLCA, LcaSelf) | |
| TEST (EulerTourLCA, LcaRootChildren) | |
| TEST (EulerTourLCA, ManualSmall) | |
| TEST (EulerTourLCA, DepthOf) | |
| TEST (EulerTourLCA, Distance) | |
| TEST (EulerTourLCA, LcaSymmetry) | |
| TEST (EulerTourLCA, LcaBoundsCheck) | |
| TEST (EulerTourLCA, StressVsBruteForce) | |
| TEST (CartesianTreeRMQ, Empty) | |
| TEST (CartesianTreeRMQ, SingleElement) | |
| TEST (CartesianTreeRMQ, QueryEntireRange) | |
| TEST (CartesianTreeRMQ, QuerySingleElement) | |
| TEST (CartesianTreeRMQ, QueryVsSparseTable) | |
| TEST (CartesianTreeRMQ, QueryIdx) | |
| TEST (CartesianTreeRMQ, MaxVariant) | |
| TEST (CartesianTreeRMQ, StressRandomVsBruteForce) | |
| TEST (CartesianTreeRMQ, BoundsCheck) | |
Unit tests for Gen_Cartesian_Tree, Gen_Euler_Tour_LCA, and Gen_Cartesian_Tree_RMQ.
Definition in file tpl_cartesian_tree_test.cc.
| TEST | ( | CartesianTreeRMQ | , |
| BoundsCheck | |||
| ) |
Definition at line 592 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | CartesianTreeRMQ | , |
| Empty | |||
| ) |
Definition at line 492 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | CartesianTreeRMQ | , |
| MaxVariant | |||
| ) |
Definition at line 557 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | CartesianTreeRMQ | , |
| QueryEntireRange | |||
| ) |
Definition at line 509 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | CartesianTreeRMQ | , |
| QueryIdx | |||
| ) |
Definition at line 543 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::Gen_Cartesian_Tree_RMQ< T, Comp >::query_idx().
| TEST | ( | CartesianTreeRMQ | , |
| QuerySingleElement | |||
| ) |
Definition at line 516 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | CartesianTreeRMQ | , |
| QueryVsSparseTable | |||
| ) |
Definition at line 523 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp(), l, N, Aleph::Gen_Sparse_Table< T, Op >::query(), r, and rng.
| TEST | ( | CartesianTreeRMQ | , |
| SingleElement | |||
| ) |
Definition at line 500 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | CartesianTreeRMQ | , |
| StressRandomVsBruteForce | |||
| ) |
Definition at line 565 of file tpl_cartesian_tree_test.cc.
References brute_min(), Aleph::divide_and_conquer_partition_dp(), l, N, r, and rng.
| TEST | ( | EulerTourLCA | , |
| DepthOf | |||
| ) |
Definition at line 416 of file tpl_cartesian_tree_test.cc.
References Aleph::Gen_Euler_Tour_LCA< T, Comp >::depth_of(), and Aleph::divide_and_conquer_partition_dp().
| TEST | ( | EulerTourLCA | , |
| Distance | |||
| ) |
Definition at line 429 of file tpl_cartesian_tree_test.cc.
References Aleph::Gen_Euler_Tour_LCA< T, Comp >::distance(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Gen_Euler_Tour_LCA< T, Comp >::size().
| TEST | ( | EulerTourLCA | , |
| Empty | |||
| ) |
Definition at line 351 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Gen_Euler_Tour_LCA< T, Comp >::is_empty(), and Aleph::Gen_Euler_Tour_LCA< T, Comp >::size().
| TEST | ( | EulerTourLCA | , |
| EulerTourSize | |||
| ) |
Definition at line 368 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::Gen_Euler_Tour_LCA< T, Comp >::euler_tour_size().
| TEST | ( | EulerTourLCA | , |
| LcaBoundsCheck | |||
| ) |
Definition at line 454 of file tpl_cartesian_tree_test.cc.
References Aleph::Gen_Euler_Tour_LCA< T, Comp >::depth_of(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Gen_Euler_Tour_LCA< T, Comp >::lca().
| TEST | ( | EulerTourLCA | , |
| LcaRootChildren | |||
| ) |
Definition at line 382 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Gen_Euler_Tour_LCA< T, Comp >::lca(), r, Aleph::Gen_Cartesian_Tree< T, Comp >::root(), and Aleph::Gen_Euler_Tour_LCA< T, Comp >::tree().
| TEST | ( | EulerTourLCA | , |
| LcaSelf | |||
| ) |
Definition at line 375 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Gen_Euler_Tour_LCA< T, Comp >::lca(), and Aleph::Gen_Euler_Tour_LCA< T, Comp >::size().
| TEST | ( | EulerTourLCA | , |
| LcaSymmetry | |||
| ) |
Definition at line 445 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Gen_Euler_Tour_LCA< T, Comp >::lca(), and Aleph::Gen_Euler_Tour_LCA< T, Comp >::size().
| TEST | ( | EulerTourLCA | , |
| ManualSmall | |||
| ) |
Definition at line 395 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::Gen_Euler_Tour_LCA< T, Comp >::lca().
| TEST | ( | EulerTourLCA | , |
| SingleElement | |||
| ) |
Definition at line 359 of file tpl_cartesian_tree_test.cc.
References Aleph::Gen_Euler_Tour_LCA< T, Comp >::depth_of(), Aleph::Gen_Euler_Tour_LCA< T, Comp >::distance(), Aleph::divide_and_conquer_partition_dp(), Aleph::Gen_Euler_Tour_LCA< T, Comp >::lca(), and Aleph::Gen_Euler_Tour_LCA< T, Comp >::size().
| TEST | ( | EulerTourLCA | , |
| StressVsBruteForce | |||
| ) |
Definition at line 462 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Gen_Euler_Tour_LCA< T, Comp >::lca(), N, rng, Aleph::Gen_Euler_Tour_LCA< T, Comp >::tree(), and w.
| TEST | ( | GenCartesianTree | , |
| AllEqual | |||
| ) |
Definition at line 239 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| BoundsChecking | |||
| ) |
Definition at line 319 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| CopyMoveSwap | |||
| ) |
Definition at line 302 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::Gen_Cartesian_Tree< T, Comp >::swap().
| TEST | ( | GenCartesianTree | , |
| CustomComparatorMax | |||
| ) |
Definition at line 246 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| DuplicateValues | |||
| ) |
Definition at line 210 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| Empty | |||
| ) |
Definition at line 136 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| FromArray | |||
| ) |
Definition at line 255 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| FromDynList | |||
| ) |
Definition at line 281 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| FromInitList | |||
| ) |
Definition at line 273 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| FromVector | |||
| ) |
Definition at line 264 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| HeapProperty | |||
| ) |
Definition at line 175 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| Height | |||
| ) |
Definition at line 290 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| InorderProperty | |||
| ) |
Definition at line 181 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| ManualSmall | |||
| ) |
Definition at line 187 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| ReverseSorted | |||
| ) |
Definition at line 229 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| SingleElement | |||
| ) |
Definition at line 148 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| Sorted | |||
| ) |
Definition at line 219 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | GenCartesianTree | , |
| StressRandom | |||
| ) |
Definition at line 330 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp(), N, and rng.
| TEST | ( | GenCartesianTree | , |
| TwoElements | |||
| ) |
Definition at line 164 of file tpl_cartesian_tree_test.cc.
References Aleph::divide_and_conquer_partition_dp().