Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ahAlgo.cc File Reference

Comprehensive test suite for ahAlgo.H. More...

#include <gtest/gtest.h>
#include <vector>
#include <ahAlgo.H>
#include <tpl_dynDlist.H>
#include <tpl_array.H>
Include dependency graph for ahAlgo.cc:

Go to the source code of this file.

Functions

 TEST (ForEach, SumElements)
 
 TEST (ForEach, ModifyElements)
 
 TEST (ForEach, EmptyRange)
 
 TEST (CountIf, CountEvenNumbers)
 
 TEST (CountIf, CountNone)
 
 TEST (CountIf, CountAll)
 
 TEST (Count, CountValue)
 
 TEST (Count, CountMissing)
 
 TEST (MinElement, FindMinimum)
 
 TEST (MinElement, EmptyRange)
 
 TEST (MaxElement, FindMaximum)
 
 TEST (FindIf, FindFirstEven)
 
 TEST (FindIf, FindNothing)
 
 TEST (Find, FindValue)
 
 TEST (Find, FindMissing)
 
 TEST (SearchN, FindConsecutive)
 
 TEST (SearchN, NotEnoughConsecutive)
 
 TEST (SearchN, ZeroCount)
 
 TEST (AdjacentFind, FindDuplicate)
 
 TEST (AdjacentFind, NoDuplicate)
 
 TEST (AdjacentFind, EmptyRange)
 
 TEST (Equal, EqualRanges)
 
 TEST (Equal, UnequalRanges)
 
 TEST (LexCompare, LessThan)
 
 TEST (LexCompare, GreaterThan)
 
 TEST (LexCompare, PrefixLessThan)
 
 TEST (Copy, BasicCopy)
 
 TEST (CopyBackward, BasicCopyBackward)
 
 TEST (Transform, UnaryTransform)
 
 TEST (Transform, BinaryTransform)
 
 TEST (SwapRanges, BasicSwap)
 
 TEST (Fill, FillRange)
 
 TEST (FillN, FillNElements)
 
 TEST (Generate, GenerateSequence)
 
 TEST (GenerateN, GenerateNElements)
 
 TEST (ReplaceIf, ReplaceEvenNumbers)
 
 TEST (Replace, ReplaceValue)
 
 TEST (ReplaceCopyIf, BasicReplaceCopy)
 
 TEST (Reverse, ReverseElements)
 
 TEST (Reverse, ReverseSingleElement)
 
 TEST (Reverse, ReverseEmpty)
 
 TEST (ReverseCopy, BasicReverseCopy)
 
 TEST (Rotate, RotateElements)
 
 TEST (LowerBound, FindPosition)
 
 TEST (LowerBound, ValueNotPresent)
 
 TEST (UpperBound, FindPosition)
 
 TEST (BinarySearch, ValueExists)
 
 TEST (BinarySearch, ValueMissing)
 
 TEST (EqualRange, FindRange)
 
 TEST (Includes, SubsetIncluded)
 
 TEST (Includes, SubsetNotIncluded)
 
 TEST (Includes, EmptySubset)
 
 TEST (Merge, MergeSortedRanges)
 
 TEST (Merge, MergeWithEmpty)
 
 TEST (Accumulate, SumElements)
 
 TEST (Accumulate, ProductElements)
 
 TEST (Accumulate, WithInitialValue)
 
 TEST (Accumulate, EmptyRange)
 
 TEST (InnerProduct, DotProduct)
 
 TEST (InnerProduct, CustomOperations)
 
 TEST (PartialSum, CumulativeSum)
 
 TEST (PartialSum, CustomOperation)
 
 TEST (PartialSum, EmptyRange)
 
 TEST (AdjacentDifference, ComputeDifferences)
 
 TEST (AdjacentDifference, CustomOperation)
 
 TEST (Unique, RemoveDuplicates)
 
 TEST (Unique, NoDuplicates)
 
 TEST (RemoveIf, RemoveEvenNumbers)
 
 TEST (Remove, RemoveValue)
 
 TEST (RemoveCopyIf, BasicCopy)
 
 TEST (UniqueCopy, BasicCopy)
 
 TEST (EdgeCases, SingleElement)
 
 TEST (EdgeCases, LargeRange)
 
 TEST (Mismatch, FindMismatch)
 
 TEST (Mismatch, NoMismatch)
 
 TEST (Search, FindSubsequence)
 
 TEST (Search, SubsequenceNotFound)
 

Detailed Description

Comprehensive test suite for ahAlgo.H.

Tests all STL-like algorithm implementations in Aleph-w.

Definition in file ahAlgo.cc.

Function Documentation

◆ TEST() [1/77]

TEST ( Accumulate  ,
EmptyRange   
)

◆ TEST() [2/77]

TEST ( Accumulate  ,
ProductElements   
)

◆ TEST() [3/77]

TEST ( Accumulate  ,
SumElements   
)

◆ TEST() [4/77]

TEST ( Accumulate  ,
WithInitialValue   
)

◆ TEST() [5/77]

TEST ( AdjacentDifference  ,
ComputeDifferences   
)

◆ TEST() [6/77]

TEST ( AdjacentDifference  ,
CustomOperation   
)

◆ TEST() [7/77]

TEST ( AdjacentFind  ,
EmptyRange   
)

◆ TEST() [8/77]

TEST ( AdjacentFind  ,
FindDuplicate   
)

◆ TEST() [9/77]

TEST ( AdjacentFind  ,
NoDuplicate   
)

◆ TEST() [10/77]

TEST ( BinarySearch  ,
ValueExists   
)

◆ TEST() [11/77]

TEST ( BinarySearch  ,
ValueMissing   
)

◆ TEST() [12/77]

TEST ( Copy  ,
BasicCopy   
)

Definition at line 256 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::copy().

◆ TEST() [13/77]

TEST ( CopyBackward  ,
BasicCopyBackward   
)

◆ TEST() [14/77]

TEST ( Count  ,
CountMissing   
)

Definition at line 84 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::count().

◆ TEST() [15/77]

TEST ( Count  ,
CountValue   
)

Definition at line 77 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::count().

◆ TEST() [16/77]

TEST ( CountIf  ,
CountAll   
)

Definition at line 69 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::count_if().

◆ TEST() [17/77]

TEST ( CountIf  ,
CountEvenNumbers   
)

Definition at line 53 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::count_if().

◆ TEST() [18/77]

TEST ( CountIf  ,
CountNone   
)

Definition at line 61 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::count_if().

◆ TEST() [19/77]

TEST ( EdgeCases  ,
LargeRange   
)

◆ TEST() [20/77]

TEST ( EdgeCases  ,
SingleElement   
)

◆ TEST() [21/77]

TEST ( Equal  ,
EqualRanges   
)

Definition at line 210 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::equal().

◆ TEST() [22/77]

TEST ( Equal  ,
UnequalRanges   
)

Definition at line 217 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::equal().

◆ TEST() [23/77]

TEST ( EqualRange  ,
FindRange   
)

◆ TEST() [24/77]

TEST ( Fill  ,
FillRange   
)

Definition at line 334 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::fill().

◆ TEST() [25/77]

TEST ( FillN  ,
FillNElements   
)

Definition at line 345 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::fill_n().

◆ TEST() [26/77]

TEST ( Find  ,
FindMissing   
)

Definition at line 147 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::find().

◆ TEST() [27/77]

TEST ( Find  ,
FindValue   
)

Definition at line 139 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::find().

◆ TEST() [28/77]

TEST ( FindIf  ,
FindFirstEven   
)

Definition at line 122 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::find_if().

◆ TEST() [29/77]

TEST ( FindIf  ,
FindNothing   
)

Definition at line 131 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::find_if().

◆ TEST() [30/77]

TEST ( ForEach  ,
EmptyRange   
)

◆ TEST() [31/77]

TEST ( ForEach  ,
ModifyElements   
)

Definition at line 30 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::for_each().

◆ TEST() [32/77]

TEST ( ForEach  ,
SumElements   
)

◆ TEST() [33/77]

TEST ( Generate  ,
GenerateSequence   
)

◆ TEST() [34/77]

TEST ( GenerateN  ,
GenerateNElements   
)

◆ TEST() [35/77]

TEST ( Includes  ,
EmptySubset   
)

Definition at line 579 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::includes().

◆ TEST() [36/77]

TEST ( Includes  ,
SubsetIncluded   
)

Definition at line 565 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::includes().

◆ TEST() [37/77]

TEST ( Includes  ,
SubsetNotIncluded   
)

Definition at line 572 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::includes().

◆ TEST() [38/77]

TEST ( InnerProduct  ,
CustomOperations   
)

◆ TEST() [39/77]

TEST ( InnerProduct  ,
DotProduct   
)

◆ TEST() [40/77]

TEST ( LexCompare  ,
GreaterThan   
)

◆ TEST() [41/77]

TEST ( LexCompare  ,
LessThan   
)

◆ TEST() [42/77]

TEST ( LexCompare  ,
PrefixLessThan   
)

◆ TEST() [43/77]

TEST ( LowerBound  ,
FindPosition   
)

◆ TEST() [44/77]

TEST ( LowerBound  ,
ValueNotPresent   
)

◆ TEST() [45/77]

TEST ( MaxElement  ,
FindMaximum   
)

◆ TEST() [46/77]

TEST ( Merge  ,
MergeSortedRanges   
)

Definition at line 590 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::merge().

◆ TEST() [47/77]

TEST ( Merge  ,
MergeWithEmpty   
)

Definition at line 606 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::merge().

◆ TEST() [48/77]

TEST ( MinElement  ,
EmptyRange   
)

◆ TEST() [49/77]

TEST ( MinElement  ,
FindMinimum   
)

◆ TEST() [50/77]

TEST ( Mismatch  ,
FindMismatch   
)

Definition at line 879 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::mismatch().

◆ TEST() [51/77]

TEST ( Mismatch  ,
NoMismatch   
)

Definition at line 890 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::mismatch().

◆ TEST() [52/77]

TEST ( PartialSum  ,
CumulativeSum   
)

◆ TEST() [53/77]

TEST ( PartialSum  ,
CustomOperation   
)

◆ TEST() [54/77]

TEST ( PartialSum  ,
EmptyRange   
)

◆ TEST() [55/77]

TEST ( Remove  ,
RemoveValue   
)

Definition at line 791 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::remove().

◆ TEST() [56/77]

TEST ( RemoveCopyIf  ,
BasicCopy   
)

◆ TEST() [57/77]

TEST ( RemoveIf  ,
RemoveEvenNumbers   
)

Definition at line 778 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::remove_if().

◆ TEST() [58/77]

TEST ( Replace  ,
ReplaceValue   
)

Definition at line 405 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::replace().

◆ TEST() [59/77]

TEST ( ReplaceCopyIf  ,
BasicReplaceCopy   
)

◆ TEST() [60/77]

TEST ( ReplaceIf  ,
ReplaceEvenNumbers   
)

◆ TEST() [61/77]

TEST ( Reverse  ,
ReverseElements   
)

Definition at line 441 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::reverse().

◆ TEST() [62/77]

TEST ( Reverse  ,
ReverseEmpty   
)

Definition at line 463 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::reverse().

◆ TEST() [63/77]

TEST ( Reverse  ,
ReverseSingleElement   
)

Definition at line 454 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::reverse().

◆ TEST() [64/77]

TEST ( ReverseCopy  ,
BasicReverseCopy   
)

◆ TEST() [65/77]

TEST ( Rotate  ,
RotateElements   
)

Definition at line 491 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::rotate().

◆ TEST() [66/77]

TEST ( Search  ,
FindSubsequence   
)

Definition at line 904 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::search().

◆ TEST() [67/77]

TEST ( Search  ,
SubsequenceNotFound   
)

Definition at line 915 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::search().

◆ TEST() [68/77]

TEST ( SearchN  ,
FindConsecutive   
)

Definition at line 158 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::search_n().

◆ TEST() [69/77]

TEST ( SearchN  ,
NotEnoughConsecutive   
)

Definition at line 166 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::search_n().

◆ TEST() [70/77]

TEST ( SearchN  ,
ZeroCount   
)

Definition at line 173 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::search_n().

◆ TEST() [71/77]

TEST ( SwapRanges  ,
BasicSwap   
)

◆ TEST() [72/77]

TEST ( Transform  ,
BinaryTransform   
)

Definition at line 297 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::transform().

◆ TEST() [73/77]

TEST ( Transform  ,
UnaryTransform   
)

Definition at line 284 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::transform().

◆ TEST() [74/77]

TEST ( Unique  ,
NoDuplicates   
)

Definition at line 766 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::unique().

◆ TEST() [75/77]

TEST ( Unique  ,
RemoveDuplicates   
)

Definition at line 754 of file ahAlgo.cc.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::unique().

◆ TEST() [76/77]

TEST ( UniqueCopy  ,
BasicCopy   
)

◆ TEST() [77/77]

TEST ( UpperBound  ,
FindPosition   
)