From 186ec04d2ac9e056ba3f69976531b623a89c5525 Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Mon, 23 Jun 2025 00:35:20 +0530 Subject: [PATCH 01/17] core: folder names changed --- .clang-tidy | 2 +- .github/workflows/datastructures-algorithms-ci-cd.yaml | 2 +- CMakeLists.txt | 8 ++++---- README.md | 6 +++--- SourceCodes/0001_Basics/Node.cc | 6 ------ {Headers => include}/0001_Basics/CMakeLists.txt | 0 {Headers => include}/0001_Basics/Node.h | 0 {Headers => include}/0002_Tree/0001_BinarySearchTree.h | 0 {Headers => include}/0002_Tree/CMakeLists.txt | 0 {Headers => include}/0003_Graph/0001_BreadthFirstSearch.h | 0 {Headers => include}/0003_Graph/0002_DepthFirstSearch.h | 0 {Headers => include}/0003_Graph/0003_TopologicalSort.h | 0 .../0003_Graph/0004_StronglyConnectedComponents.h | 0 .../0003_Graph/0005_HamiltonianPathAndCycle.h | 0 .../0003_Graph/0006_EulerianPathAndCircuit.h | 0 .../0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.h | 0 .../0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.h | 0 .../0003_Graph/0009_SingleSourceShortestPathBellmanFord.h | 0 .../0003_Graph/0010_DirectedAcyclicGraphShortestPath.h | 0 .../0003_Graph/0011_SingleSourceShortestPathDijkstra.h | 0 .../0003_Graph/0012_DifferenceConstraintsShortestPaths.h | 0 .../0003_Graph/0013_AllPairsShortestPathsFloydWarshall.h | 0 .../0003_Graph/0014_AllPairsShortestPathsJohnson.h | 0 .../0003_Graph/0015_MaximumFlowFordFulkerson.h | 0 .../0003_Graph/0016_MaximumFlowEdmondsKarp.h | 0 .../0003_Graph/0017_MaximumBipartiteMatching.h | 0 .../0018_MaximumFlowGoldbergGenericPushRelabel.h | 0 .../0003_Graph/0019_MaximumFlowRelabelToFront.h | 0 {Headers => include}/0003_Graph/CMakeLists.txt | 0 {Headers => include}/0004_GreedyAlgorithms/CMakeLists.txt | 0 .../0005_DynamicProgramming/CMakeLists.txt | 0 .../0006_BitwiseAlgorithms/CMakeLists.txt | 0 {Headers => include}/CMakeLists.txt | 0 {SourceCodes => source}/0001_Basics/CMakeLists.txt | 0 source/0001_Basics/Node.cc | 6 ++++++ .../0002_Tree/0001_BinarySearchTree.cc | 2 +- {SourceCodes => source}/0002_Tree/CMakeLists.txt | 0 .../0003_Graph/0001_BreadthFirstSearch.cc | 2 +- .../0003_Graph/0002_DepthFirstSearch.cc | 2 +- .../0003_Graph/0003_TopologicalSort.cc | 2 +- .../0003_Graph/0004_StronglyConnectedComponents.cc | 2 +- .../0003_Graph/0005_HamiltonianPathAndCycle.cc | 2 +- .../0003_Graph/0006_EulerianPathAndCircuit.cc | 2 +- .../0007_MinimumSpanningTreeKruskalAlgorithm.cc | 2 +- .../0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.cc | 2 +- .../0009_SingleSourceShortestPathBellmanFord.cc | 2 +- .../0003_Graph/0010_DirectedAcyclicGraphShortestPath.cc | 2 +- .../0003_Graph/0011_SingleSourceShortestPathDijkstra.cc | 2 +- .../0003_Graph/0012_DifferenceConstraintsShortestPaths.cc | 2 +- .../0003_Graph/0013_AllPairsShortestPathsFloydWarshall.cc | 2 +- .../0003_Graph/0014_AllPairsShortestPathsJohnson.cc | 2 +- .../0003_Graph/0015_MaximumFlowFordFulkerson.cc | 2 +- .../0003_Graph/0016_MaximumFlowEdmondsKarp.cc | 2 +- .../0003_Graph/0017_MaximumBipartiteMatching.cc | 2 +- .../0018_MaximumFlowGoldbergGenericPushRelabel.cc | 2 +- .../0003_Graph/0019_MaximumFlowRelabelToFront.cc | 2 +- {SourceCodes => source}/0003_Graph/CMakeLists.txt | 0 .../0004_GreedyAlgorithms/CMakeLists.txt | 0 .../0005_DynamicProgramming/CMakeLists.txt | 0 .../0006_BitwiseAlgorithms/CMakeLists.txt | 0 {SourceCodes => source}/CMakeLists.txt | 0 {Tests => test}/0000_CommonUtilities/CMakeLists.txt | 0 {Tests => test}/0000_CommonUtilities/UnitTestHelper.h | 0 {Tests => test}/0001_Basics/CMakeLists.txt | 0 {Tests => test}/0001_Basics/NodeTest.cc | 2 +- {Tests => test}/0002_Tree/0001_BinarySearchTreeTest.cc | 2 +- {Tests => test}/0002_Tree/CMakeLists.txt | 0 {Tests => test}/0003_Graph/0001_BreadthFirstSearchTest.cc | 2 +- {Tests => test}/0003_Graph/0002_DepthFirstSearchTest.cc | 2 +- {Tests => test}/0003_Graph/0003_TopologicalSortTest.cc | 2 +- .../0003_Graph/0004_StronglyConnectedComponentsTest.cc | 2 +- .../0003_Graph/0005_HamiltonianPathAndCycleTest.cc | 2 +- .../0003_Graph/0006_EulerianPathAndCircuitTest.cc | 2 +- .../0007_MinimumSpanningTreeKruskalAlgorithmTest.cc | 2 +- .../0008_MinimumSpanningTreePrimAlgorithmTest.cc | 2 +- .../0009_SingleSourceShortestPathBellmanFordTest.cc | 2 +- .../0010_DirectedAcyclicGraphShortestPathTest.cc | 2 +- .../0011_SingleSourceShortestPathDijkstraTest.cc | 2 +- .../0012_DifferenceConstraintsShortestPathsTest.cc | 2 +- .../0013_AllPairsShortestPathsFloydWarshallTest.cc | 2 +- .../0003_Graph/0014_AllPairsShortestPathsJohnsonTest.cc | 2 +- .../0003_Graph/0015_MaximumFlowFordFulkersonTest.cc | 2 +- .../0003_Graph/0016_MaximumFlowEdmondsKarpTest.cc | 2 +- .../0003_Graph/0017_MaximumBipartiteMatchingTest.cc | 2 +- .../0018_MaximumFlowGoldbergGenericPushRelabelTest.cc | 2 +- .../0003_Graph/0019_MaximumFlowRelabelToFrontTest.cc | 2 +- {Tests => test}/0003_Graph/CMakeLists.txt | 0 {Tests => test}/0004_GreedyAlgorithms/CMakeLists.txt | 0 {Tests => test}/0005_DynamicProgramming/CMakeLists.txt | 0 {Tests => test}/0006_BitwiseAlgorithms/CMakeLists.txt | 0 {Tests => test}/CMakeLists.txt | 0 91 files changed, 56 insertions(+), 56 deletions(-) delete mode 100644 SourceCodes/0001_Basics/Node.cc rename {Headers => include}/0001_Basics/CMakeLists.txt (100%) rename {Headers => include}/0001_Basics/Node.h (100%) rename {Headers => include}/0002_Tree/0001_BinarySearchTree.h (100%) rename {Headers => include}/0002_Tree/CMakeLists.txt (100%) rename {Headers => include}/0003_Graph/0001_BreadthFirstSearch.h (100%) rename {Headers => include}/0003_Graph/0002_DepthFirstSearch.h (100%) rename {Headers => include}/0003_Graph/0003_TopologicalSort.h (100%) rename {Headers => include}/0003_Graph/0004_StronglyConnectedComponents.h (100%) rename {Headers => include}/0003_Graph/0005_HamiltonianPathAndCycle.h (100%) rename {Headers => include}/0003_Graph/0006_EulerianPathAndCircuit.h (100%) rename {Headers => include}/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.h (100%) rename {Headers => include}/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.h (100%) rename {Headers => include}/0003_Graph/0009_SingleSourceShortestPathBellmanFord.h (100%) rename {Headers => include}/0003_Graph/0010_DirectedAcyclicGraphShortestPath.h (100%) rename {Headers => include}/0003_Graph/0011_SingleSourceShortestPathDijkstra.h (100%) rename {Headers => include}/0003_Graph/0012_DifferenceConstraintsShortestPaths.h (100%) rename {Headers => include}/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.h (100%) rename {Headers => include}/0003_Graph/0014_AllPairsShortestPathsJohnson.h (100%) rename {Headers => include}/0003_Graph/0015_MaximumFlowFordFulkerson.h (100%) rename {Headers => include}/0003_Graph/0016_MaximumFlowEdmondsKarp.h (100%) rename {Headers => include}/0003_Graph/0017_MaximumBipartiteMatching.h (100%) rename {Headers => include}/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.h (100%) rename {Headers => include}/0003_Graph/0019_MaximumFlowRelabelToFront.h (100%) rename {Headers => include}/0003_Graph/CMakeLists.txt (100%) rename {Headers => include}/0004_GreedyAlgorithms/CMakeLists.txt (100%) rename {Headers => include}/0005_DynamicProgramming/CMakeLists.txt (100%) rename {Headers => include}/0006_BitwiseAlgorithms/CMakeLists.txt (100%) rename {Headers => include}/CMakeLists.txt (100%) rename {SourceCodes => source}/0001_Basics/CMakeLists.txt (100%) create mode 100644 source/0001_Basics/Node.cc rename {SourceCodes => source}/0002_Tree/0001_BinarySearchTree.cc (99%) rename {SourceCodes => source}/0002_Tree/CMakeLists.txt (100%) rename {SourceCodes => source}/0003_Graph/0001_BreadthFirstSearch.cc (96%) rename {SourceCodes => source}/0003_Graph/0002_DepthFirstSearch.cc (96%) rename {SourceCodes => source}/0003_Graph/0003_TopologicalSort.cc (98%) rename {SourceCodes => source}/0003_Graph/0004_StronglyConnectedComponents.cc (97%) rename {SourceCodes => source}/0003_Graph/0005_HamiltonianPathAndCycle.cc (97%) rename {SourceCodes => source}/0003_Graph/0006_EulerianPathAndCircuit.cc (98%) rename {SourceCodes => source}/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.cc (97%) rename {SourceCodes => source}/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.cc (96%) rename {SourceCodes => source}/0003_Graph/0009_SingleSourceShortestPathBellmanFord.cc (97%) rename {SourceCodes => source}/0003_Graph/0010_DirectedAcyclicGraphShortestPath.cc (97%) rename {SourceCodes => source}/0003_Graph/0011_SingleSourceShortestPathDijkstra.cc (97%) rename {SourceCodes => source}/0003_Graph/0012_DifferenceConstraintsShortestPaths.cc (97%) rename {SourceCodes => source}/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.cc (97%) rename {SourceCodes => source}/0003_Graph/0014_AllPairsShortestPathsJohnson.cc (98%) rename {SourceCodes => source}/0003_Graph/0015_MaximumFlowFordFulkerson.cc (98%) rename {SourceCodes => source}/0003_Graph/0016_MaximumFlowEdmondsKarp.cc (98%) rename {SourceCodes => source}/0003_Graph/0017_MaximumBipartiteMatching.cc (99%) rename {SourceCodes => source}/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.cc (98%) rename {SourceCodes => source}/0003_Graph/0019_MaximumFlowRelabelToFront.cc (98%) rename {SourceCodes => source}/0003_Graph/CMakeLists.txt (100%) rename {SourceCodes => source}/0004_GreedyAlgorithms/CMakeLists.txt (100%) rename {SourceCodes => source}/0005_DynamicProgramming/CMakeLists.txt (100%) rename {SourceCodes => source}/0006_BitwiseAlgorithms/CMakeLists.txt (100%) rename {SourceCodes => source}/CMakeLists.txt (100%) rename {Tests => test}/0000_CommonUtilities/CMakeLists.txt (100%) rename {Tests => test}/0000_CommonUtilities/UnitTestHelper.h (100%) rename {Tests => test}/0001_Basics/CMakeLists.txt (100%) rename {Tests => test}/0001_Basics/NodeTest.cc (83%) rename {Tests => test}/0002_Tree/0001_BinarySearchTreeTest.cc (97%) rename {Tests => test}/0002_Tree/CMakeLists.txt (100%) rename {Tests => test}/0003_Graph/0001_BreadthFirstSearchTest.cc (95%) rename {Tests => test}/0003_Graph/0002_DepthFirstSearchTest.cc (98%) rename {Tests => test}/0003_Graph/0003_TopologicalSortTest.cc (98%) rename {Tests => test}/0003_Graph/0004_StronglyConnectedComponentsTest.cc (98%) rename {Tests => test}/0003_Graph/0005_HamiltonianPathAndCycleTest.cc (93%) rename {Tests => test}/0003_Graph/0006_EulerianPathAndCircuitTest.cc (93%) rename {Tests => test}/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithmTest.cc (94%) rename {Tests => test}/0003_Graph/0008_MinimumSpanningTreePrimAlgorithmTest.cc (94%) rename {Tests => test}/0003_Graph/0009_SingleSourceShortestPathBellmanFordTest.cc (98%) rename {Tests => test}/0003_Graph/0010_DirectedAcyclicGraphShortestPathTest.cc (92%) rename {Tests => test}/0003_Graph/0011_SingleSourceShortestPathDijkstraTest.cc (92%) rename {Tests => test}/0003_Graph/0012_DifferenceConstraintsShortestPathsTest.cc (93%) rename {Tests => test}/0003_Graph/0013_AllPairsShortestPathsFloydWarshallTest.cc (94%) rename {Tests => test}/0003_Graph/0014_AllPairsShortestPathsJohnsonTest.cc (95%) rename {Tests => test}/0003_Graph/0015_MaximumFlowFordFulkersonTest.cc (95%) rename {Tests => test}/0003_Graph/0016_MaximumFlowEdmondsKarpTest.cc (95%) rename {Tests => test}/0003_Graph/0017_MaximumBipartiteMatchingTest.cc (93%) rename {Tests => test}/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabelTest.cc (92%) rename {Tests => test}/0003_Graph/0019_MaximumFlowRelabelToFrontTest.cc (92%) rename {Tests => test}/0003_Graph/CMakeLists.txt (100%) rename {Tests => test}/0004_GreedyAlgorithms/CMakeLists.txt (100%) rename {Tests => test}/0005_DynamicProgramming/CMakeLists.txt (100%) rename {Tests => test}/0006_BitwiseAlgorithms/CMakeLists.txt (100%) rename {Tests => test}/CMakeLists.txt (100%) diff --git a/.clang-tidy b/.clang-tidy index 516f806..d975e69 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,7 @@ Checks: > WarningsAsErrors: '*' -HeaderFilterRegex: '(Headers/.*|SourceCodes/.*)' +HeaderFilterRegex: '(include/.*|source/.*)' CheckOptions: # Private member variables diff --git a/.github/workflows/datastructures-algorithms-ci-cd.yaml b/.github/workflows/datastructures-algorithms-ci-cd.yaml index 8fa8cb8..5380c92 100644 --- a/.github/workflows/datastructures-algorithms-ci-cd.yaml +++ b/.github/workflows/datastructures-algorithms-ci-cd.yaml @@ -24,7 +24,7 @@ jobs: - name: Run clang-tidy run: | - find Headers -name '*.h' -o -name '*.hpp' ; find SourceCodes -name '*.cpp' -o -name '*.cc' -o -name '*.cxx' | \ + find include -name '*.h' -o -name '*.hpp' ; find source -name '*.cpp' -o -name '*.cc' -o -name '*.cxx' | \ xargs clang-tidy -p build --warnings-as-errors=* - name: Build diff --git a/CMakeLists.txt b/CMakeLists.txt index c64ef51..b2cfc07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,10 +19,10 @@ if(CLANG_TIDY_EXE) ) endif() -include_directories(${CMAKE_SOURCE_DIR}/Headers) +include_directories(${CMAKE_SOURCE_DIR}/include) -add_subdirectory(Headers) -add_subdirectory(SourceCodes) +add_subdirectory(include) +add_subdirectory(source) cmake_policy(SET CMP0135 NEW) include(FetchContent) @@ -36,4 +36,4 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) enable_testing() -add_subdirectory(Tests) \ No newline at end of file +add_subdirectory(test) \ No newline at end of file diff --git a/README.md b/README.md index 10342c3..1513e74 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ This repository contains a collection of **data structures and algorithms** impl ```plain text datastructures-algorithms -├── Headers # Header Files -├── SourceCodes # Implementation of the solutions -├── Tests # Unit tests for implemented solutions +├── include # Header Files +├── source # Implementation of the solutions +├── test # Unit tests for implemented solutions └── CMakeLists.txt # CMake configuration file ``` diff --git a/SourceCodes/0001_Basics/Node.cc b/SourceCodes/0001_Basics/Node.cc deleted file mode 100644 index cba6cc9..0000000 --- a/SourceCodes/0001_Basics/Node.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "../Headers/0001_Basics/Node.h" - -Node::Node() -{ - value = 8; -} \ No newline at end of file diff --git a/Headers/0001_Basics/CMakeLists.txt b/include/0001_Basics/CMakeLists.txt similarity index 100% rename from Headers/0001_Basics/CMakeLists.txt rename to include/0001_Basics/CMakeLists.txt diff --git a/Headers/0001_Basics/Node.h b/include/0001_Basics/Node.h similarity index 100% rename from Headers/0001_Basics/Node.h rename to include/0001_Basics/Node.h diff --git a/Headers/0002_Tree/0001_BinarySearchTree.h b/include/0002_Tree/0001_BinarySearchTree.h similarity index 100% rename from Headers/0002_Tree/0001_BinarySearchTree.h rename to include/0002_Tree/0001_BinarySearchTree.h diff --git a/Headers/0002_Tree/CMakeLists.txt b/include/0002_Tree/CMakeLists.txt similarity index 100% rename from Headers/0002_Tree/CMakeLists.txt rename to include/0002_Tree/CMakeLists.txt diff --git a/Headers/0003_Graph/0001_BreadthFirstSearch.h b/include/0003_Graph/0001_BreadthFirstSearch.h similarity index 100% rename from Headers/0003_Graph/0001_BreadthFirstSearch.h rename to include/0003_Graph/0001_BreadthFirstSearch.h diff --git a/Headers/0003_Graph/0002_DepthFirstSearch.h b/include/0003_Graph/0002_DepthFirstSearch.h similarity index 100% rename from Headers/0003_Graph/0002_DepthFirstSearch.h rename to include/0003_Graph/0002_DepthFirstSearch.h diff --git a/Headers/0003_Graph/0003_TopologicalSort.h b/include/0003_Graph/0003_TopologicalSort.h similarity index 100% rename from Headers/0003_Graph/0003_TopologicalSort.h rename to include/0003_Graph/0003_TopologicalSort.h diff --git a/Headers/0003_Graph/0004_StronglyConnectedComponents.h b/include/0003_Graph/0004_StronglyConnectedComponents.h similarity index 100% rename from Headers/0003_Graph/0004_StronglyConnectedComponents.h rename to include/0003_Graph/0004_StronglyConnectedComponents.h diff --git a/Headers/0003_Graph/0005_HamiltonianPathAndCycle.h b/include/0003_Graph/0005_HamiltonianPathAndCycle.h similarity index 100% rename from Headers/0003_Graph/0005_HamiltonianPathAndCycle.h rename to include/0003_Graph/0005_HamiltonianPathAndCycle.h diff --git a/Headers/0003_Graph/0006_EulerianPathAndCircuit.h b/include/0003_Graph/0006_EulerianPathAndCircuit.h similarity index 100% rename from Headers/0003_Graph/0006_EulerianPathAndCircuit.h rename to include/0003_Graph/0006_EulerianPathAndCircuit.h diff --git a/Headers/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.h b/include/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.h similarity index 100% rename from Headers/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.h rename to include/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.h diff --git a/Headers/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.h b/include/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.h similarity index 100% rename from Headers/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.h rename to include/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.h diff --git a/Headers/0003_Graph/0009_SingleSourceShortestPathBellmanFord.h b/include/0003_Graph/0009_SingleSourceShortestPathBellmanFord.h similarity index 100% rename from Headers/0003_Graph/0009_SingleSourceShortestPathBellmanFord.h rename to include/0003_Graph/0009_SingleSourceShortestPathBellmanFord.h diff --git a/Headers/0003_Graph/0010_DirectedAcyclicGraphShortestPath.h b/include/0003_Graph/0010_DirectedAcyclicGraphShortestPath.h similarity index 100% rename from Headers/0003_Graph/0010_DirectedAcyclicGraphShortestPath.h rename to include/0003_Graph/0010_DirectedAcyclicGraphShortestPath.h diff --git a/Headers/0003_Graph/0011_SingleSourceShortestPathDijkstra.h b/include/0003_Graph/0011_SingleSourceShortestPathDijkstra.h similarity index 100% rename from Headers/0003_Graph/0011_SingleSourceShortestPathDijkstra.h rename to include/0003_Graph/0011_SingleSourceShortestPathDijkstra.h diff --git a/Headers/0003_Graph/0012_DifferenceConstraintsShortestPaths.h b/include/0003_Graph/0012_DifferenceConstraintsShortestPaths.h similarity index 100% rename from Headers/0003_Graph/0012_DifferenceConstraintsShortestPaths.h rename to include/0003_Graph/0012_DifferenceConstraintsShortestPaths.h diff --git a/Headers/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.h b/include/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.h similarity index 100% rename from Headers/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.h rename to include/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.h diff --git a/Headers/0003_Graph/0014_AllPairsShortestPathsJohnson.h b/include/0003_Graph/0014_AllPairsShortestPathsJohnson.h similarity index 100% rename from Headers/0003_Graph/0014_AllPairsShortestPathsJohnson.h rename to include/0003_Graph/0014_AllPairsShortestPathsJohnson.h diff --git a/Headers/0003_Graph/0015_MaximumFlowFordFulkerson.h b/include/0003_Graph/0015_MaximumFlowFordFulkerson.h similarity index 100% rename from Headers/0003_Graph/0015_MaximumFlowFordFulkerson.h rename to include/0003_Graph/0015_MaximumFlowFordFulkerson.h diff --git a/Headers/0003_Graph/0016_MaximumFlowEdmondsKarp.h b/include/0003_Graph/0016_MaximumFlowEdmondsKarp.h similarity index 100% rename from Headers/0003_Graph/0016_MaximumFlowEdmondsKarp.h rename to include/0003_Graph/0016_MaximumFlowEdmondsKarp.h diff --git a/Headers/0003_Graph/0017_MaximumBipartiteMatching.h b/include/0003_Graph/0017_MaximumBipartiteMatching.h similarity index 100% rename from Headers/0003_Graph/0017_MaximumBipartiteMatching.h rename to include/0003_Graph/0017_MaximumBipartiteMatching.h diff --git a/Headers/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.h b/include/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.h similarity index 100% rename from Headers/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.h rename to include/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.h diff --git a/Headers/0003_Graph/0019_MaximumFlowRelabelToFront.h b/include/0003_Graph/0019_MaximumFlowRelabelToFront.h similarity index 100% rename from Headers/0003_Graph/0019_MaximumFlowRelabelToFront.h rename to include/0003_Graph/0019_MaximumFlowRelabelToFront.h diff --git a/Headers/0003_Graph/CMakeLists.txt b/include/0003_Graph/CMakeLists.txt similarity index 100% rename from Headers/0003_Graph/CMakeLists.txt rename to include/0003_Graph/CMakeLists.txt diff --git a/Headers/0004_GreedyAlgorithms/CMakeLists.txt b/include/0004_GreedyAlgorithms/CMakeLists.txt similarity index 100% rename from Headers/0004_GreedyAlgorithms/CMakeLists.txt rename to include/0004_GreedyAlgorithms/CMakeLists.txt diff --git a/Headers/0005_DynamicProgramming/CMakeLists.txt b/include/0005_DynamicProgramming/CMakeLists.txt similarity index 100% rename from Headers/0005_DynamicProgramming/CMakeLists.txt rename to include/0005_DynamicProgramming/CMakeLists.txt diff --git a/Headers/0006_BitwiseAlgorithms/CMakeLists.txt b/include/0006_BitwiseAlgorithms/CMakeLists.txt similarity index 100% rename from Headers/0006_BitwiseAlgorithms/CMakeLists.txt rename to include/0006_BitwiseAlgorithms/CMakeLists.txt diff --git a/Headers/CMakeLists.txt b/include/CMakeLists.txt similarity index 100% rename from Headers/CMakeLists.txt rename to include/CMakeLists.txt diff --git a/SourceCodes/0001_Basics/CMakeLists.txt b/source/0001_Basics/CMakeLists.txt similarity index 100% rename from SourceCodes/0001_Basics/CMakeLists.txt rename to source/0001_Basics/CMakeLists.txt diff --git a/source/0001_Basics/Node.cc b/source/0001_Basics/Node.cc new file mode 100644 index 0000000..8bbfaa2 --- /dev/null +++ b/source/0001_Basics/Node.cc @@ -0,0 +1,6 @@ +#include "../include/0001_Basics/Node.h" + +Node::Node() +{ + value = 8; +} \ No newline at end of file diff --git a/SourceCodes/0002_Tree/0001_BinarySearchTree.cc b/source/0002_Tree/0001_BinarySearchTree.cc similarity index 99% rename from SourceCodes/0002_Tree/0001_BinarySearchTree.cc rename to source/0002_Tree/0001_BinarySearchTree.cc index 0016c69..bf98b9e 100644 --- a/SourceCodes/0002_Tree/0001_BinarySearchTree.cc +++ b/source/0002_Tree/0001_BinarySearchTree.cc @@ -1,4 +1,4 @@ -#include "../Headers/0002_Tree/0001_BinarySearchTree.h" +#include "../include/0002_Tree/0001_BinarySearchTree.h" #include #include using namespace std; diff --git a/SourceCodes/0002_Tree/CMakeLists.txt b/source/0002_Tree/CMakeLists.txt similarity index 100% rename from SourceCodes/0002_Tree/CMakeLists.txt rename to source/0002_Tree/CMakeLists.txt diff --git a/SourceCodes/0003_Graph/0001_BreadthFirstSearch.cc b/source/0003_Graph/0001_BreadthFirstSearch.cc similarity index 96% rename from SourceCodes/0003_Graph/0001_BreadthFirstSearch.cc rename to source/0003_Graph/0001_BreadthFirstSearch.cc index 0374ba2..3715577 100644 --- a/SourceCodes/0003_Graph/0001_BreadthFirstSearch.cc +++ b/source/0003_Graph/0001_BreadthFirstSearch.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0001_BreadthFirstSearch.h" +#include "../include/0003_Graph/0001_BreadthFirstSearch.h" #include #include #include diff --git a/SourceCodes/0003_Graph/0002_DepthFirstSearch.cc b/source/0003_Graph/0002_DepthFirstSearch.cc similarity index 96% rename from SourceCodes/0003_Graph/0002_DepthFirstSearch.cc rename to source/0003_Graph/0002_DepthFirstSearch.cc index 1bfba58..08e74d4 100644 --- a/SourceCodes/0003_Graph/0002_DepthFirstSearch.cc +++ b/source/0003_Graph/0002_DepthFirstSearch.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0002_DepthFirstSearch.h" +#include "../include/0003_Graph/0002_DepthFirstSearch.h" #include #include #include diff --git a/SourceCodes/0003_Graph/0003_TopologicalSort.cc b/source/0003_Graph/0003_TopologicalSort.cc similarity index 98% rename from SourceCodes/0003_Graph/0003_TopologicalSort.cc rename to source/0003_Graph/0003_TopologicalSort.cc index a266132..29343e1 100644 --- a/SourceCodes/0003_Graph/0003_TopologicalSort.cc +++ b/source/0003_Graph/0003_TopologicalSort.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0003_TopologicalSort.h" +#include "../include/0003_Graph/0003_TopologicalSort.h" #include #include #include diff --git a/SourceCodes/0003_Graph/0004_StronglyConnectedComponents.cc b/source/0003_Graph/0004_StronglyConnectedComponents.cc similarity index 97% rename from SourceCodes/0003_Graph/0004_StronglyConnectedComponents.cc rename to source/0003_Graph/0004_StronglyConnectedComponents.cc index 240726d..6a086e9 100644 --- a/SourceCodes/0003_Graph/0004_StronglyConnectedComponents.cc +++ b/source/0003_Graph/0004_StronglyConnectedComponents.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0004_StronglyConnectedComponents.h" +#include "../include/0003_Graph/0004_StronglyConnectedComponents.h" #include #include #include diff --git a/SourceCodes/0003_Graph/0005_HamiltonianPathAndCycle.cc b/source/0003_Graph/0005_HamiltonianPathAndCycle.cc similarity index 97% rename from SourceCodes/0003_Graph/0005_HamiltonianPathAndCycle.cc rename to source/0003_Graph/0005_HamiltonianPathAndCycle.cc index f60ef91..7ca3ac7 100644 --- a/SourceCodes/0003_Graph/0005_HamiltonianPathAndCycle.cc +++ b/source/0003_Graph/0005_HamiltonianPathAndCycle.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0005_HamiltonianPathAndCycle.h" +#include "../include/0003_Graph/0005_HamiltonianPathAndCycle.h" using namespace std; namespace HamiltonianPathAndCycle diff --git a/SourceCodes/0003_Graph/0006_EulerianPathAndCircuit.cc b/source/0003_Graph/0006_EulerianPathAndCircuit.cc similarity index 98% rename from SourceCodes/0003_Graph/0006_EulerianPathAndCircuit.cc rename to source/0003_Graph/0006_EulerianPathAndCircuit.cc index 3568181..d97ea4f 100644 --- a/SourceCodes/0003_Graph/0006_EulerianPathAndCircuit.cc +++ b/source/0003_Graph/0006_EulerianPathAndCircuit.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0006_EulerianPathAndCircuit.h" +#include "../include/0003_Graph/0006_EulerianPathAndCircuit.h" #include #include using namespace std; diff --git a/SourceCodes/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.cc b/source/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.cc similarity index 97% rename from SourceCodes/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.cc rename to source/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.cc index 0f67e58..280ac16 100644 --- a/SourceCodes/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.cc +++ b/source/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.h" +#include "../include/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.h" #include #include using namespace std; diff --git a/SourceCodes/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.cc b/source/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.cc similarity index 96% rename from SourceCodes/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.cc rename to source/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.cc index ce56ee1..c77da13 100644 --- a/SourceCodes/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.cc +++ b/source/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.h" +#include "../include/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.h" #include using namespace std; diff --git a/SourceCodes/0003_Graph/0009_SingleSourceShortestPathBellmanFord.cc b/source/0003_Graph/0009_SingleSourceShortestPathBellmanFord.cc similarity index 97% rename from SourceCodes/0003_Graph/0009_SingleSourceShortestPathBellmanFord.cc rename to source/0003_Graph/0009_SingleSourceShortestPathBellmanFord.cc index 5d2decf..267b788 100644 --- a/SourceCodes/0003_Graph/0009_SingleSourceShortestPathBellmanFord.cc +++ b/source/0003_Graph/0009_SingleSourceShortestPathBellmanFord.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0009_SingleSourceShortestPathBellmanFord.h" +#include "../include/0003_Graph/0009_SingleSourceShortestPathBellmanFord.h" #include #include using namespace std; diff --git a/SourceCodes/0003_Graph/0010_DirectedAcyclicGraphShortestPath.cc b/source/0003_Graph/0010_DirectedAcyclicGraphShortestPath.cc similarity index 97% rename from SourceCodes/0003_Graph/0010_DirectedAcyclicGraphShortestPath.cc rename to source/0003_Graph/0010_DirectedAcyclicGraphShortestPath.cc index da683fb..74056f6 100644 --- a/SourceCodes/0003_Graph/0010_DirectedAcyclicGraphShortestPath.cc +++ b/source/0003_Graph/0010_DirectedAcyclicGraphShortestPath.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0010_DirectedAcyclicGraphShortestPath.h" +#include "../include/0003_Graph/0010_DirectedAcyclicGraphShortestPath.h" #include #include using namespace std; diff --git a/SourceCodes/0003_Graph/0011_SingleSourceShortestPathDijkstra.cc b/source/0003_Graph/0011_SingleSourceShortestPathDijkstra.cc similarity index 97% rename from SourceCodes/0003_Graph/0011_SingleSourceShortestPathDijkstra.cc rename to source/0003_Graph/0011_SingleSourceShortestPathDijkstra.cc index 138899f..ecad826 100644 --- a/SourceCodes/0003_Graph/0011_SingleSourceShortestPathDijkstra.cc +++ b/source/0003_Graph/0011_SingleSourceShortestPathDijkstra.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0011_SingleSourceShortestPathDijkstra.h" +#include "../include/0003_Graph/0011_SingleSourceShortestPathDijkstra.h" #include #include using namespace std; diff --git a/SourceCodes/0003_Graph/0012_DifferenceConstraintsShortestPaths.cc b/source/0003_Graph/0012_DifferenceConstraintsShortestPaths.cc similarity index 97% rename from SourceCodes/0003_Graph/0012_DifferenceConstraintsShortestPaths.cc rename to source/0003_Graph/0012_DifferenceConstraintsShortestPaths.cc index 20b7784..74ca92d 100644 --- a/SourceCodes/0003_Graph/0012_DifferenceConstraintsShortestPaths.cc +++ b/source/0003_Graph/0012_DifferenceConstraintsShortestPaths.cc @@ -1,4 +1,4 @@ -#include"../Headers/0003_Graph/0012_DifferenceConstraintsShortestPaths.h" +#include"../include/0003_Graph/0012_DifferenceConstraintsShortestPaths.h" #include using namespace std; diff --git a/SourceCodes/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.cc b/source/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.cc similarity index 97% rename from SourceCodes/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.cc rename to source/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.cc index 53a6095..00516de 100644 --- a/SourceCodes/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.cc +++ b/source/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.h" +#include "../include/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.h" #include using namespace std; diff --git a/SourceCodes/0003_Graph/0014_AllPairsShortestPathsJohnson.cc b/source/0003_Graph/0014_AllPairsShortestPathsJohnson.cc similarity index 98% rename from SourceCodes/0003_Graph/0014_AllPairsShortestPathsJohnson.cc rename to source/0003_Graph/0014_AllPairsShortestPathsJohnson.cc index 199cc34..236bf87 100644 --- a/SourceCodes/0003_Graph/0014_AllPairsShortestPathsJohnson.cc +++ b/source/0003_Graph/0014_AllPairsShortestPathsJohnson.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0014_AllPairsShortestPathsJohnson.h" +#include "../include/0003_Graph/0014_AllPairsShortestPathsJohnson.h" #include using namespace std; diff --git a/SourceCodes/0003_Graph/0015_MaximumFlowFordFulkerson.cc b/source/0003_Graph/0015_MaximumFlowFordFulkerson.cc similarity index 98% rename from SourceCodes/0003_Graph/0015_MaximumFlowFordFulkerson.cc rename to source/0003_Graph/0015_MaximumFlowFordFulkerson.cc index b2090c8..6e5a602 100644 --- a/SourceCodes/0003_Graph/0015_MaximumFlowFordFulkerson.cc +++ b/source/0003_Graph/0015_MaximumFlowFordFulkerson.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0015_MaximumFlowFordFulkerson.h" +#include "../include/0003_Graph/0015_MaximumFlowFordFulkerson.h" #include using namespace std; diff --git a/SourceCodes/0003_Graph/0016_MaximumFlowEdmondsKarp.cc b/source/0003_Graph/0016_MaximumFlowEdmondsKarp.cc similarity index 98% rename from SourceCodes/0003_Graph/0016_MaximumFlowEdmondsKarp.cc rename to source/0003_Graph/0016_MaximumFlowEdmondsKarp.cc index f597b9b..dc0988e 100644 --- a/SourceCodes/0003_Graph/0016_MaximumFlowEdmondsKarp.cc +++ b/source/0003_Graph/0016_MaximumFlowEdmondsKarp.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0016_MaximumFlowEdmondsKarp.h" +#include "../include/0003_Graph/0016_MaximumFlowEdmondsKarp.h" #include #include using namespace std; diff --git a/SourceCodes/0003_Graph/0017_MaximumBipartiteMatching.cc b/source/0003_Graph/0017_MaximumBipartiteMatching.cc similarity index 99% rename from SourceCodes/0003_Graph/0017_MaximumBipartiteMatching.cc rename to source/0003_Graph/0017_MaximumBipartiteMatching.cc index 1e873a5..28cbe52 100644 --- a/SourceCodes/0003_Graph/0017_MaximumBipartiteMatching.cc +++ b/source/0003_Graph/0017_MaximumBipartiteMatching.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0017_MaximumBipartiteMatching.h" +#include "../include/0003_Graph/0017_MaximumBipartiteMatching.h" #include #include using namespace std; diff --git a/SourceCodes/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.cc b/source/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.cc similarity index 98% rename from SourceCodes/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.cc rename to source/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.cc index 55fdfbc..8c76b06 100644 --- a/SourceCodes/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.cc +++ b/source/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.h" +#include "../include/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.h" #include using namespace std; diff --git a/SourceCodes/0003_Graph/0019_MaximumFlowRelabelToFront.cc b/source/0003_Graph/0019_MaximumFlowRelabelToFront.cc similarity index 98% rename from SourceCodes/0003_Graph/0019_MaximumFlowRelabelToFront.cc rename to source/0003_Graph/0019_MaximumFlowRelabelToFront.cc index 0f5c20c..5b46b39 100644 --- a/SourceCodes/0003_Graph/0019_MaximumFlowRelabelToFront.cc +++ b/source/0003_Graph/0019_MaximumFlowRelabelToFront.cc @@ -1,4 +1,4 @@ -#include "../Headers/0003_Graph/0019_MaximumFlowRelabelToFront.h" +#include "../include/0003_Graph/0019_MaximumFlowRelabelToFront.h" #include #include using namespace std; diff --git a/SourceCodes/0003_Graph/CMakeLists.txt b/source/0003_Graph/CMakeLists.txt similarity index 100% rename from SourceCodes/0003_Graph/CMakeLists.txt rename to source/0003_Graph/CMakeLists.txt diff --git a/SourceCodes/0004_GreedyAlgorithms/CMakeLists.txt b/source/0004_GreedyAlgorithms/CMakeLists.txt similarity index 100% rename from SourceCodes/0004_GreedyAlgorithms/CMakeLists.txt rename to source/0004_GreedyAlgorithms/CMakeLists.txt diff --git a/SourceCodes/0005_DynamicProgramming/CMakeLists.txt b/source/0005_DynamicProgramming/CMakeLists.txt similarity index 100% rename from SourceCodes/0005_DynamicProgramming/CMakeLists.txt rename to source/0005_DynamicProgramming/CMakeLists.txt diff --git a/SourceCodes/0006_BitwiseAlgorithms/CMakeLists.txt b/source/0006_BitwiseAlgorithms/CMakeLists.txt similarity index 100% rename from SourceCodes/0006_BitwiseAlgorithms/CMakeLists.txt rename to source/0006_BitwiseAlgorithms/CMakeLists.txt diff --git a/SourceCodes/CMakeLists.txt b/source/CMakeLists.txt similarity index 100% rename from SourceCodes/CMakeLists.txt rename to source/CMakeLists.txt diff --git a/Tests/0000_CommonUtilities/CMakeLists.txt b/test/0000_CommonUtilities/CMakeLists.txt similarity index 100% rename from Tests/0000_CommonUtilities/CMakeLists.txt rename to test/0000_CommonUtilities/CMakeLists.txt diff --git a/Tests/0000_CommonUtilities/UnitTestHelper.h b/test/0000_CommonUtilities/UnitTestHelper.h similarity index 100% rename from Tests/0000_CommonUtilities/UnitTestHelper.h rename to test/0000_CommonUtilities/UnitTestHelper.h diff --git a/Tests/0001_Basics/CMakeLists.txt b/test/0001_Basics/CMakeLists.txt similarity index 100% rename from Tests/0001_Basics/CMakeLists.txt rename to test/0001_Basics/CMakeLists.txt diff --git a/Tests/0001_Basics/NodeTest.cc b/test/0001_Basics/NodeTest.cc similarity index 83% rename from Tests/0001_Basics/NodeTest.cc rename to test/0001_Basics/NodeTest.cc index 0e9b7a7..26c50fe 100644 --- a/Tests/0001_Basics/NodeTest.cc +++ b/test/0001_Basics/NodeTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0001_Basics/Node.h" +#include "../include/0001_Basics/Node.h" // Demonstrate some basic assertions. namespace NodeTesting diff --git a/Tests/0002_Tree/0001_BinarySearchTreeTest.cc b/test/0002_Tree/0001_BinarySearchTreeTest.cc similarity index 97% rename from Tests/0002_Tree/0001_BinarySearchTreeTest.cc rename to test/0002_Tree/0001_BinarySearchTreeTest.cc index 7a73afd..817e43b 100644 --- a/Tests/0002_Tree/0001_BinarySearchTreeTest.cc +++ b/test/0002_Tree/0001_BinarySearchTreeTest.cc @@ -1,6 +1,6 @@ #include #include -#include "../Headers/0002_Tree/0001_BinarySearchTree.h" +#include "../include/0002_Tree/0001_BinarySearchTree.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace BinarySearchTree diff --git a/Tests/0002_Tree/CMakeLists.txt b/test/0002_Tree/CMakeLists.txt similarity index 100% rename from Tests/0002_Tree/CMakeLists.txt rename to test/0002_Tree/CMakeLists.txt diff --git a/Tests/0003_Graph/0001_BreadthFirstSearchTest.cc b/test/0003_Graph/0001_BreadthFirstSearchTest.cc similarity index 95% rename from Tests/0003_Graph/0001_BreadthFirstSearchTest.cc rename to test/0003_Graph/0001_BreadthFirstSearchTest.cc index 26c731f..e918a1c 100644 --- a/Tests/0003_Graph/0001_BreadthFirstSearchTest.cc +++ b/test/0003_Graph/0001_BreadthFirstSearchTest.cc @@ -1,6 +1,6 @@ #include #include -#include "../Headers/0003_Graph/0001_BreadthFirstSearch.h" +#include "../include/0003_Graph/0001_BreadthFirstSearch.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace BreadthFirstSearch diff --git a/Tests/0003_Graph/0002_DepthFirstSearchTest.cc b/test/0003_Graph/0002_DepthFirstSearchTest.cc similarity index 98% rename from Tests/0003_Graph/0002_DepthFirstSearchTest.cc rename to test/0003_Graph/0002_DepthFirstSearchTest.cc index 9bb257b..0825bbf 100644 --- a/Tests/0003_Graph/0002_DepthFirstSearchTest.cc +++ b/test/0003_Graph/0002_DepthFirstSearchTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0002_DepthFirstSearch.h" +#include "../include/0003_Graph/0002_DepthFirstSearch.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace DepthFirstSearch diff --git a/Tests/0003_Graph/0003_TopologicalSortTest.cc b/test/0003_Graph/0003_TopologicalSortTest.cc similarity index 98% rename from Tests/0003_Graph/0003_TopologicalSortTest.cc rename to test/0003_Graph/0003_TopologicalSortTest.cc index 2447951..883af20 100644 --- a/Tests/0003_Graph/0003_TopologicalSortTest.cc +++ b/test/0003_Graph/0003_TopologicalSortTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0003_TopologicalSort.h" +#include "../include/0003_Graph/0003_TopologicalSort.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace TopologicalSort diff --git a/Tests/0003_Graph/0004_StronglyConnectedComponentsTest.cc b/test/0003_Graph/0004_StronglyConnectedComponentsTest.cc similarity index 98% rename from Tests/0003_Graph/0004_StronglyConnectedComponentsTest.cc rename to test/0003_Graph/0004_StronglyConnectedComponentsTest.cc index 0f58496..00513fa 100644 --- a/Tests/0003_Graph/0004_StronglyConnectedComponentsTest.cc +++ b/test/0003_Graph/0004_StronglyConnectedComponentsTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0004_StronglyConnectedComponents.h" +#include "../include/0003_Graph/0004_StronglyConnectedComponents.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace StronglyConnectedComponents diff --git a/Tests/0003_Graph/0005_HamiltonianPathAndCycleTest.cc b/test/0003_Graph/0005_HamiltonianPathAndCycleTest.cc similarity index 93% rename from Tests/0003_Graph/0005_HamiltonianPathAndCycleTest.cc rename to test/0003_Graph/0005_HamiltonianPathAndCycleTest.cc index d46a651..10b3ed5 100644 --- a/Tests/0003_Graph/0005_HamiltonianPathAndCycleTest.cc +++ b/test/0003_Graph/0005_HamiltonianPathAndCycleTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0005_HamiltonianPathAndCycle.h" +#include "../include/0003_Graph/0005_HamiltonianPathAndCycle.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace HamiltonianPathAndCycle diff --git a/Tests/0003_Graph/0006_EulerianPathAndCircuitTest.cc b/test/0003_Graph/0006_EulerianPathAndCircuitTest.cc similarity index 93% rename from Tests/0003_Graph/0006_EulerianPathAndCircuitTest.cc rename to test/0003_Graph/0006_EulerianPathAndCircuitTest.cc index 0edc671..9650b6f 100644 --- a/Tests/0003_Graph/0006_EulerianPathAndCircuitTest.cc +++ b/test/0003_Graph/0006_EulerianPathAndCircuitTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0006_EulerianPathAndCircuit.h" +#include "../include/0003_Graph/0006_EulerianPathAndCircuit.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace EulerianPathAndCircuit diff --git a/Tests/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithmTest.cc b/test/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithmTest.cc similarity index 94% rename from Tests/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithmTest.cc rename to test/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithmTest.cc index c559123..216f14e 100644 --- a/Tests/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithmTest.cc +++ b/test/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithmTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.h" +#include "../include/0003_Graph/0007_MinimumSpanningTreeKruskalAlgorithm.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace MinimumSpanningTreeKruskalAlgorithm diff --git a/Tests/0003_Graph/0008_MinimumSpanningTreePrimAlgorithmTest.cc b/test/0003_Graph/0008_MinimumSpanningTreePrimAlgorithmTest.cc similarity index 94% rename from Tests/0003_Graph/0008_MinimumSpanningTreePrimAlgorithmTest.cc rename to test/0003_Graph/0008_MinimumSpanningTreePrimAlgorithmTest.cc index 2016d04..aa378ac 100644 --- a/Tests/0003_Graph/0008_MinimumSpanningTreePrimAlgorithmTest.cc +++ b/test/0003_Graph/0008_MinimumSpanningTreePrimAlgorithmTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.h" +#include "../include/0003_Graph/0008_MinimumSpanningTreePrimAlgorithm.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace MinimumSpanningTreePrimAlgorithm diff --git a/Tests/0003_Graph/0009_SingleSourceShortestPathBellmanFordTest.cc b/test/0003_Graph/0009_SingleSourceShortestPathBellmanFordTest.cc similarity index 98% rename from Tests/0003_Graph/0009_SingleSourceShortestPathBellmanFordTest.cc rename to test/0003_Graph/0009_SingleSourceShortestPathBellmanFordTest.cc index f6bc452..5561fa6 100644 --- a/Tests/0003_Graph/0009_SingleSourceShortestPathBellmanFordTest.cc +++ b/test/0003_Graph/0009_SingleSourceShortestPathBellmanFordTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0009_SingleSourceShortestPathBellmanFord.h" +#include "../include/0003_Graph/0009_SingleSourceShortestPathBellmanFord.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace SingleSourceShortestPathBellmanFord diff --git a/Tests/0003_Graph/0010_DirectedAcyclicGraphShortestPathTest.cc b/test/0003_Graph/0010_DirectedAcyclicGraphShortestPathTest.cc similarity index 92% rename from Tests/0003_Graph/0010_DirectedAcyclicGraphShortestPathTest.cc rename to test/0003_Graph/0010_DirectedAcyclicGraphShortestPathTest.cc index 3a59445..5f156e4 100644 --- a/Tests/0003_Graph/0010_DirectedAcyclicGraphShortestPathTest.cc +++ b/test/0003_Graph/0010_DirectedAcyclicGraphShortestPathTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0010_DirectedAcyclicGraphShortestPath.h" +#include "../include/0003_Graph/0010_DirectedAcyclicGraphShortestPath.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace DirectedAcyclicGraphShortestPath diff --git a/Tests/0003_Graph/0011_SingleSourceShortestPathDijkstraTest.cc b/test/0003_Graph/0011_SingleSourceShortestPathDijkstraTest.cc similarity index 92% rename from Tests/0003_Graph/0011_SingleSourceShortestPathDijkstraTest.cc rename to test/0003_Graph/0011_SingleSourceShortestPathDijkstraTest.cc index 4f0be15..2e5164d 100644 --- a/Tests/0003_Graph/0011_SingleSourceShortestPathDijkstraTest.cc +++ b/test/0003_Graph/0011_SingleSourceShortestPathDijkstraTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0011_SingleSourceShortestPathDijkstra.h" +#include "../include/0003_Graph/0011_SingleSourceShortestPathDijkstra.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace SingleSourceShortestPathDijkstra diff --git a/Tests/0003_Graph/0012_DifferenceConstraintsShortestPathsTest.cc b/test/0003_Graph/0012_DifferenceConstraintsShortestPathsTest.cc similarity index 93% rename from Tests/0003_Graph/0012_DifferenceConstraintsShortestPathsTest.cc rename to test/0003_Graph/0012_DifferenceConstraintsShortestPathsTest.cc index 04b293e..df4757b 100644 --- a/Tests/0003_Graph/0012_DifferenceConstraintsShortestPathsTest.cc +++ b/test/0003_Graph/0012_DifferenceConstraintsShortestPathsTest.cc @@ -1,5 +1,5 @@ #include -#include"../Headers/0003_Graph/0012_DifferenceConstraintsShortestPaths.h" +#include"../include/0003_Graph/0012_DifferenceConstraintsShortestPaths.h" #include"../0000_CommonUtilities/UnitTestHelper.h" using namespace std; diff --git a/Tests/0003_Graph/0013_AllPairsShortestPathsFloydWarshallTest.cc b/test/0003_Graph/0013_AllPairsShortestPathsFloydWarshallTest.cc similarity index 94% rename from Tests/0003_Graph/0013_AllPairsShortestPathsFloydWarshallTest.cc rename to test/0003_Graph/0013_AllPairsShortestPathsFloydWarshallTest.cc index d14130f..de88688 100644 --- a/Tests/0003_Graph/0013_AllPairsShortestPathsFloydWarshallTest.cc +++ b/test/0003_Graph/0013_AllPairsShortestPathsFloydWarshallTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.h" +#include "../include/0003_Graph/0013_AllPairsShortestPathsFloydWarshall.h" #include"../0000_CommonUtilities/UnitTestHelper.h" using namespace std; diff --git a/Tests/0003_Graph/0014_AllPairsShortestPathsJohnsonTest.cc b/test/0003_Graph/0014_AllPairsShortestPathsJohnsonTest.cc similarity index 95% rename from Tests/0003_Graph/0014_AllPairsShortestPathsJohnsonTest.cc rename to test/0003_Graph/0014_AllPairsShortestPathsJohnsonTest.cc index 55610f2..c771282 100644 --- a/Tests/0003_Graph/0014_AllPairsShortestPathsJohnsonTest.cc +++ b/test/0003_Graph/0014_AllPairsShortestPathsJohnsonTest.cc @@ -1,5 +1,5 @@ #include -#include"../Headers/0003_Graph/0014_AllPairsShortestPathsJohnson.h" +#include"../include/0003_Graph/0014_AllPairsShortestPathsJohnson.h" #include"../0000_CommonUtilities/UnitTestHelper.h" using namespace std; diff --git a/Tests/0003_Graph/0015_MaximumFlowFordFulkersonTest.cc b/test/0003_Graph/0015_MaximumFlowFordFulkersonTest.cc similarity index 95% rename from Tests/0003_Graph/0015_MaximumFlowFordFulkersonTest.cc rename to test/0003_Graph/0015_MaximumFlowFordFulkersonTest.cc index b96b2ef..b476189 100644 --- a/Tests/0003_Graph/0015_MaximumFlowFordFulkersonTest.cc +++ b/test/0003_Graph/0015_MaximumFlowFordFulkersonTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0015_MaximumFlowFordFulkerson.h" +#include "../include/0003_Graph/0015_MaximumFlowFordFulkerson.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace MaximumFlowFordFulkerson diff --git a/Tests/0003_Graph/0016_MaximumFlowEdmondsKarpTest.cc b/test/0003_Graph/0016_MaximumFlowEdmondsKarpTest.cc similarity index 95% rename from Tests/0003_Graph/0016_MaximumFlowEdmondsKarpTest.cc rename to test/0003_Graph/0016_MaximumFlowEdmondsKarpTest.cc index fc1492c..09f105a 100644 --- a/Tests/0003_Graph/0016_MaximumFlowEdmondsKarpTest.cc +++ b/test/0003_Graph/0016_MaximumFlowEdmondsKarpTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0016_MaximumFlowEdmondsKarp.h" +#include "../include/0003_Graph/0016_MaximumFlowEdmondsKarp.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace MaximumFlowEdmondsKarp diff --git a/Tests/0003_Graph/0017_MaximumBipartiteMatchingTest.cc b/test/0003_Graph/0017_MaximumBipartiteMatchingTest.cc similarity index 93% rename from Tests/0003_Graph/0017_MaximumBipartiteMatchingTest.cc rename to test/0003_Graph/0017_MaximumBipartiteMatchingTest.cc index 506e2df..152ae9a 100644 --- a/Tests/0003_Graph/0017_MaximumBipartiteMatchingTest.cc +++ b/test/0003_Graph/0017_MaximumBipartiteMatchingTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0017_MaximumBipartiteMatching.h" +#include "../include/0003_Graph/0017_MaximumBipartiteMatching.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace MaximumBipartiteMatching diff --git a/Tests/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabelTest.cc b/test/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabelTest.cc similarity index 92% rename from Tests/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabelTest.cc rename to test/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabelTest.cc index 6c398be..6069930 100644 --- a/Tests/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabelTest.cc +++ b/test/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabelTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.h" +#include "../include/0003_Graph/0018_MaximumFlowGoldbergGenericPushRelabel.h" #include "../0000_CommonUtilities/UnitTestHelper.h" namespace MaximumFlowGoldbergGenericPushRelabel diff --git a/Tests/0003_Graph/0019_MaximumFlowRelabelToFrontTest.cc b/test/0003_Graph/0019_MaximumFlowRelabelToFrontTest.cc similarity index 92% rename from Tests/0003_Graph/0019_MaximumFlowRelabelToFrontTest.cc rename to test/0003_Graph/0019_MaximumFlowRelabelToFrontTest.cc index 0d40be0..269bf6d 100644 --- a/Tests/0003_Graph/0019_MaximumFlowRelabelToFrontTest.cc +++ b/test/0003_Graph/0019_MaximumFlowRelabelToFrontTest.cc @@ -1,5 +1,5 @@ #include -#include "../Headers/0003_Graph/0019_MaximumFlowRelabelToFront.h" +#include "../include/0003_Graph/0019_MaximumFlowRelabelToFront.h" #include "../0000_CommonUtilities/UnitTestHelper.h" using namespace std; diff --git a/Tests/0003_Graph/CMakeLists.txt b/test/0003_Graph/CMakeLists.txt similarity index 100% rename from Tests/0003_Graph/CMakeLists.txt rename to test/0003_Graph/CMakeLists.txt diff --git a/Tests/0004_GreedyAlgorithms/CMakeLists.txt b/test/0004_GreedyAlgorithms/CMakeLists.txt similarity index 100% rename from Tests/0004_GreedyAlgorithms/CMakeLists.txt rename to test/0004_GreedyAlgorithms/CMakeLists.txt diff --git a/Tests/0005_DynamicProgramming/CMakeLists.txt b/test/0005_DynamicProgramming/CMakeLists.txt similarity index 100% rename from Tests/0005_DynamicProgramming/CMakeLists.txt rename to test/0005_DynamicProgramming/CMakeLists.txt diff --git a/Tests/0006_BitwiseAlgorithms/CMakeLists.txt b/test/0006_BitwiseAlgorithms/CMakeLists.txt similarity index 100% rename from Tests/0006_BitwiseAlgorithms/CMakeLists.txt rename to test/0006_BitwiseAlgorithms/CMakeLists.txt diff --git a/Tests/CMakeLists.txt b/test/CMakeLists.txt similarity index 100% rename from Tests/CMakeLists.txt rename to test/CMakeLists.txt From b87d2f382cc6c41f2a384f0f3a51476eab82d8ee Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Mon, 23 Jun 2025 00:57:06 +0530 Subject: [PATCH 02/17] core: check only top level folders --- .clang-tidy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index d975e69..cd57302 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,7 @@ Checks: > WarningsAsErrors: '*' -HeaderFilterRegex: '(include/.*|source/.*)' +HeaderFilterRegex: '(^include/.*|^source/.*)' CheckOptions: # Private member variables From 9b814c90bfe94876ba5175ce3a47dc701c52f961 Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Mon, 23 Jun 2025 01:21:54 +0530 Subject: [PATCH 03/17] core: clang-tidy updated for local run check --- .clang-tidy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index cd57302..94ca645 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,7 @@ Checks: > WarningsAsErrors: '*' -HeaderFilterRegex: '(^include/.*|^source/.*)' +HeaderFilterRegex: '(^|.*/)include/.*|(^|.*/)source/.*' CheckOptions: # Private member variables From a5043453d435e546e4d6533bdcda2568752b0cf8 Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Mon, 23 Jun 2025 01:51:54 +0530 Subject: [PATCH 04/17] core: yml update check --- .clang-tidy | 2 +- .../workflows/datastructures-algorithms-ci-cd.yaml | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 94ca645..d975e69 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,7 @@ Checks: > WarningsAsErrors: '*' -HeaderFilterRegex: '(^|.*/)include/.*|(^|.*/)source/.*' +HeaderFilterRegex: '(include/.*|source/.*)' CheckOptions: # Private member variables diff --git a/.github/workflows/datastructures-algorithms-ci-cd.yaml b/.github/workflows/datastructures-algorithms-ci-cd.yaml index 5380c92..0d201e1 100644 --- a/.github/workflows/datastructures-algorithms-ci-cd.yaml +++ b/.github/workflows/datastructures-algorithms-ci-cd.yaml @@ -24,8 +24,15 @@ jobs: - name: Run clang-tidy run: | - find include -name '*.h' -o -name '*.hpp' ; find source -name '*.cpp' -o -name '*.cc' -o -name '*.cxx' | \ - xargs clang-tidy -p build --warnings-as-errors=* + find include -type f \( -name '*.h' -o -name '*.hpp' \) \ + ! -path '*/build/*' ! -path '*/_deps/*' ! -path '*/googletest/*' \ + -print | \ + xargs -r clang-tidy -p build --warnings-as-errors=* + + find source -type f \( -name '*.cpp' -o -name '*.cc' -o -name '*.cxx' \) \ + ! -path '*/build/*' ! -path '*/_deps/*' ! -path '*/googletest/*' \ + -print | \ + xargs -r clang-tidy -p build --warnings-as-errors=* - name: Build run: cmake --build build From b2847b59138cf38ddd080a9502bc2b8d16aa20c3 Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Mon, 23 Jun 2025 02:04:43 +0530 Subject: [PATCH 05/17] Revert "core: yml update check" This reverts commit a5043453d435e546e4d6533bdcda2568752b0cf8. --- .clang-tidy | 2 +- .../workflows/datastructures-algorithms-ci-cd.yaml | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index d975e69..94ca645 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,7 @@ Checks: > WarningsAsErrors: '*' -HeaderFilterRegex: '(include/.*|source/.*)' +HeaderFilterRegex: '(^|.*/)include/.*|(^|.*/)source/.*' CheckOptions: # Private member variables diff --git a/.github/workflows/datastructures-algorithms-ci-cd.yaml b/.github/workflows/datastructures-algorithms-ci-cd.yaml index 0d201e1..5380c92 100644 --- a/.github/workflows/datastructures-algorithms-ci-cd.yaml +++ b/.github/workflows/datastructures-algorithms-ci-cd.yaml @@ -24,15 +24,8 @@ jobs: - name: Run clang-tidy run: | - find include -type f \( -name '*.h' -o -name '*.hpp' \) \ - ! -path '*/build/*' ! -path '*/_deps/*' ! -path '*/googletest/*' \ - -print | \ - xargs -r clang-tidy -p build --warnings-as-errors=* - - find source -type f \( -name '*.cpp' -o -name '*.cc' -o -name '*.cxx' \) \ - ! -path '*/build/*' ! -path '*/_deps/*' ! -path '*/googletest/*' \ - -print | \ - xargs -r clang-tidy -p build --warnings-as-errors=* + find include -name '*.h' -o -name '*.hpp' ; find source -name '*.cpp' -o -name '*.cc' -o -name '*.cxx' | \ + xargs clang-tidy -p build --warnings-as-errors=* - name: Build run: cmake --build build From 01229c3c6d6125a5c221ca139a2d5df56828af72 Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Mon, 23 Jun 2025 02:30:30 +0530 Subject: [PATCH 06/17] core: build folder name changed --- .gitignore | 3 ++- CMakePresets.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3cd9e63..c7f410a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .vs/ -Build/ \ No newline at end of file +build/ +install/ \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json index 2a68574..f7709c7 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -5,8 +5,8 @@ "name": "windows-base", "hidden": true, "generator": "Ninja", - "binaryDir": "${sourceDir}/Build/build/${presetName}", - "installDir": "${sourceDir}/Build/install/${presetName}", + "binaryDir": "${sourceDir}/build/${presetName}", + "installDir": "${sourceDir}/install/${presetName}", "cacheVariables": { "CMAKE_C_COMPILER": "gcc", "CMAKE_CXX_COMPILER": "g++" From 69214f9922ab2e96328e6ebf25aa0927de20214c Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Mon, 23 Jun 2025 23:25:05 +0530 Subject: [PATCH 07/17] core: exclude header added in clang-tidy --- .clang-tidy | 3 ++- source/0001_Basics/CMakeLists.txt | 2 +- test/0001_Basics/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 94ca645..f1ef1e2 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,8 @@ Checks: > WarningsAsErrors: '*' -HeaderFilterRegex: '(^|.*/)include/.*|(^|.*/)source/.*' +HeaderFilterRegex: '(include/.*|source/.*)' +ExcludeHeaderFilterRegex: 'build/.*' CheckOptions: # Private member variables diff --git a/source/0001_Basics/CMakeLists.txt b/source/0001_Basics/CMakeLists.txt index feffaa0..199222f 100644 --- a/source/0001_Basics/CMakeLists.txt +++ b/source/0001_Basics/CMakeLists.txt @@ -4,4 +4,4 @@ set(0001BASICS_SOURCES ) # Create a library target -add_library(0001Basics ${0001BASICS_SOURCES}) \ No newline at end of file +add_library(0001BASICS ${0001BASICS_SOURCES}) \ No newline at end of file diff --git a/test/0001_Basics/CMakeLists.txt b/test/0001_Basics/CMakeLists.txt index 9daa05d..bfd76cd 100644 --- a/test/0001_Basics/CMakeLists.txt +++ b/test/0001_Basics/CMakeLists.txt @@ -23,7 +23,7 @@ target_link_libraries( target_link_libraries( 0001-Basics-Tests - 0001Basics + 0001BASICS ) From 95d1741ea0a55b17c8e8a6f3cb6e9c5754c16ad4 Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Mon, 23 Jun 2025 23:56:03 +0530 Subject: [PATCH 08/17] core: cmake upadted for exclude header regex --- .clang-tidy | 1 - CMakeLists.txt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index f1ef1e2..d975e69 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -4,7 +4,6 @@ Checks: > WarningsAsErrors: '*' HeaderFilterRegex: '(include/.*|source/.*)' -ExcludeHeaderFilterRegex: 'build/.*' CheckOptions: # Private member variables diff --git a/CMakeLists.txt b/CMakeLists.txt index b2cfc07..6015ce6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ if(CLANG_TIDY_EXE) "--config-file=${CMAKE_SOURCE_DIR}/.clang-tidy" "--extra-arg-before=-Wno-unknown-warning-option" "--extra-arg-before=-Wno-c++98-compat-pedantic" + "--exclude-header-filter=build/.*" "--quiet" ) endif() From b58442492abecbc26825db44154d44d5c76b5fb9 Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Tue, 24 Jun 2025 00:49:22 +0530 Subject: [PATCH 09/17] core: clang set to all flag --- .clang-tidy | 2 +- CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index d975e69..3a44ada 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,7 @@ Checks: > WarningsAsErrors: '*' -HeaderFilterRegex: '(include/.*|source/.*)' +HeaderFilterRegex: '.*' CheckOptions: # Private member variables diff --git a/CMakeLists.txt b/CMakeLists.txt index 6015ce6..b2cfc07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,6 @@ if(CLANG_TIDY_EXE) "--config-file=${CMAKE_SOURCE_DIR}/.clang-tidy" "--extra-arg-before=-Wno-unknown-warning-option" "--extra-arg-before=-Wno-c++98-compat-pedantic" - "--exclude-header-filter=build/.*" "--quiet" ) endif() From b0c9cfd8d3db60e9a5337f25fc0fdd8072041553 Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Tue, 24 Jun 2025 00:58:12 +0530 Subject: [PATCH 10/17] core: cmake update --- .clang-tidy | 2 -- CMakeLists.txt | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 3a44ada..66d23a1 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,8 +3,6 @@ Checks: > WarningsAsErrors: '*' -HeaderFilterRegex: '.*' - CheckOptions: # Private member variables - key: readability-identifier-naming.PrivateMemberPrefix diff --git a/CMakeLists.txt b/CMakeLists.txt index b2cfc07..613c20f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ if(CLANG_TIDY_EXE) "--config-file=${CMAKE_SOURCE_DIR}/.clang-tidy" "--extra-arg-before=-Wno-unknown-warning-option" "--extra-arg-before=-Wno-c++98-compat-pedantic" + "--header-filter=(include/.*|source/.*)" "--quiet" ) endif() From 46ac84f04a220fc39e490f4c16f1701304f3a73f Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Tue, 24 Jun 2025 01:07:14 +0530 Subject: [PATCH 11/17] core: folders path change in cmake --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 613c20f..2ca4ff8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ if(CLANG_TIDY_EXE) "--config-file=${CMAKE_SOURCE_DIR}/.clang-tidy" "--extra-arg-before=-Wno-unknown-warning-option" "--extra-arg-before=-Wno-c++98-compat-pedantic" - "--header-filter=(include/.*|source/.*)" + "--header-filter=(./include/.*|./source/.*)" "--quiet" ) endif() From 13237ad4bf91fc82dce90ad17e56ba35d26a118c Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Tue, 24 Jun 2025 01:22:35 +0530 Subject: [PATCH 12/17] core: cmake header regex update --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ca4ff8..0f8de87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ if(CLANG_TIDY_EXE) "--config-file=${CMAKE_SOURCE_DIR}/.clang-tidy" "--extra-arg-before=-Wno-unknown-warning-option" "--extra-arg-before=-Wno-c++98-compat-pedantic" - "--header-filter=(./include/.*|./source/.*)" + "--header-filter=include/.*|source/.*" "--quiet" ) endif() From 06c87323bd05157ea9f5f5dbac28e961dd9a5d4d Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Tue, 24 Jun 2025 21:09:06 +0530 Subject: [PATCH 13/17] core: header filter regex change --- .clang-tidy | 4 +++- CMakeLists.txt | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 66d23a1..161ee26 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,6 +3,8 @@ Checks: > WarningsAsErrors: '*' +HeaderFilterRegex: (^|.*/)(include/.*|source/.*) + CheckOptions: # Private member variables - key: readability-identifier-naming.PrivateMemberPrefix @@ -22,4 +24,4 @@ CheckOptions: - key: readability-identifier-naming.IgnoreFailures value: false - key: readability-identifier-naming.IgnoreFailedSplit - value: false + value: false \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f8de87..b2cfc07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,6 @@ if(CLANG_TIDY_EXE) "--config-file=${CMAKE_SOURCE_DIR}/.clang-tidy" "--extra-arg-before=-Wno-unknown-warning-option" "--extra-arg-before=-Wno-c++98-compat-pedantic" - "--header-filter=include/.*|source/.*" "--quiet" ) endif() From 845b2b73704dfb5e21a47bf60fd6c2f244ff98d3 Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Tue, 24 Jun 2025 21:22:43 +0530 Subject: [PATCH 14/17] core: target specific cmake clang-tidy --- .clang-tidy | 2 +- CMakeLists.txt | 2 +- test/0001_Basics/CMakeLists.txt | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 161ee26..b797f75 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,7 @@ Checks: > WarningsAsErrors: '*' -HeaderFilterRegex: (^|.*/)(include/.*|source/.*) +HeaderFilterRegex: '(include/.*|source/.*)' CheckOptions: # Private member variables diff --git a/CMakeLists.txt b/CMakeLists.txt index b2cfc07..fec43b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) find_program(CLANG_TIDY_EXE NAMES "clang-tidy") if(CLANG_TIDY_EXE) message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}") - set(CMAKE_CXX_CLANG_TIDY + set(CLANG_TIDY_COMMAND "${CLANG_TIDY_EXE}" "--config-file=${CMAKE_SOURCE_DIR}/.clang-tidy" "--extra-arg-before=-Wno-unknown-warning-option" diff --git a/test/0001_Basics/CMakeLists.txt b/test/0001_Basics/CMakeLists.txt index bfd76cd..dffefcf 100644 --- a/test/0001_Basics/CMakeLists.txt +++ b/test/0001_Basics/CMakeLists.txt @@ -26,6 +26,9 @@ target_link_libraries( 0001BASICS ) +if(CLANG_TIDY_EXE) + set_target_properties(0001BASICS PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}") +endif() include(GoogleTest) gtest_discover_tests(0001-Basics-Tests DISCOVERY_TIMEOUT 30) \ No newline at end of file From 346cd09d1672b0990ee04f6434abe24fa9032075 Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Tue, 24 Jun 2025 21:25:22 +0530 Subject: [PATCH 15/17] core: test to check the target clang-tidy --- include/0001_Basics/Node.h | 6 ++++-- source/0001_Basics/Node.cc | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/0001_Basics/Node.h b/include/0001_Basics/Node.h index dcee809..05a05bf 100644 --- a/include/0001_Basics/Node.h +++ b/include/0001_Basics/Node.h @@ -1,8 +1,10 @@ #pragma once -class Node +class node { +private: + int val; public: int value; - Node(); + node(); }; \ No newline at end of file diff --git a/source/0001_Basics/Node.cc b/source/0001_Basics/Node.cc index 8bbfaa2..0764c39 100644 --- a/source/0001_Basics/Node.cc +++ b/source/0001_Basics/Node.cc @@ -1,6 +1,7 @@ #include "../include/0001_Basics/Node.h" -Node::Node() +node::node() { + val = 1; value = 8; } \ No newline at end of file From d1d59dd3aa87e903db71277b9b93d0a52ee707f3 Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Tue, 24 Jun 2025 21:33:00 +0530 Subject: [PATCH 16/17] Revert "core: test to check the target clang-tidy" This reverts commit 346cd09d1672b0990ee04f6434abe24fa9032075. --- include/0001_Basics/Node.h | 6 ++---- source/0001_Basics/Node.cc | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/0001_Basics/Node.h b/include/0001_Basics/Node.h index 05a05bf..dcee809 100644 --- a/include/0001_Basics/Node.h +++ b/include/0001_Basics/Node.h @@ -1,10 +1,8 @@ #pragma once -class node +class Node { -private: - int val; public: int value; - node(); + Node(); }; \ No newline at end of file diff --git a/source/0001_Basics/Node.cc b/source/0001_Basics/Node.cc index 0764c39..8bbfaa2 100644 --- a/source/0001_Basics/Node.cc +++ b/source/0001_Basics/Node.cc @@ -1,7 +1,6 @@ #include "../include/0001_Basics/Node.h" -node::node() +Node::Node() { - val = 1; value = 8; } \ No newline at end of file From 11e974f11c3328e1c06039c5acb94c49af64e75a Mon Sep 17 00:00:00 2001 From: Debashis Nandi Date: Tue, 24 Jun 2025 21:57:10 +0530 Subject: [PATCH 17/17] core: target cmake updated for .clang-tidy --- CMakeLists.txt | 2 +- test/0001_Basics/CMakeLists.txt | 11 ++++------- test/0002_Tree/CMakeLists.txt | 10 ++++++++-- test/0003_Graph/CMakeLists.txt | 7 ++++++- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fec43b9..a70dda1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -# .clang-tidy settp +# .clang-tidy setup find_program(CLANG_TIDY_EXE NAMES "clang-tidy") if(CLANG_TIDY_EXE) message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}") diff --git a/test/0001_Basics/CMakeLists.txt b/test/0001_Basics/CMakeLists.txt index dffefcf..efa1008 100644 --- a/test/0001_Basics/CMakeLists.txt +++ b/test/0001_Basics/CMakeLists.txt @@ -13,22 +13,19 @@ FetchContent_MakeAvailable(googletest) enable_testing() add_executable( - 0001-Basics-Tests + 0001BasicsTests NodeTest.cc) target_link_libraries( - 0001-Basics-Tests + 0001BasicsTests GTest::gtest_main -) - -target_link_libraries( - 0001-Basics-Tests 0001BASICS ) +# Add .clang-tidy configuration to this library. if(CLANG_TIDY_EXE) set_target_properties(0001BASICS PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}") endif() include(GoogleTest) -gtest_discover_tests(0001-Basics-Tests DISCOVERY_TIMEOUT 30) \ No newline at end of file +gtest_discover_tests(0001BasicsTests DISCOVERY_TIMEOUT 30) \ No newline at end of file diff --git a/test/0002_Tree/CMakeLists.txt b/test/0002_Tree/CMakeLists.txt index 8d46663..aef689e 100644 --- a/test/0002_Tree/CMakeLists.txt +++ b/test/0002_Tree/CMakeLists.txt @@ -5,16 +5,17 @@ FetchContent_Declare( googletest URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip ) + # For Windows: Prevent overriding the parent project's compiler/linker settings set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) - enable_testing() add_executable( 0002TreeTests - 0001_BinarySearchTreeTest.cc) + 0001_BinarySearchTreeTest.cc +) target_link_libraries( 0002TreeTests @@ -22,5 +23,10 @@ target_link_libraries( 0002TREE ) +# Add .clang-tidy configuration to this library. +if(CLANG_TIDY_EXE) + set_target_properties(0002TREE PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}") +endif() + include(GoogleTest) gtest_discover_tests(0002TreeTests DISCOVERY_TIMEOUT 30) \ No newline at end of file diff --git a/test/0003_Graph/CMakeLists.txt b/test/0003_Graph/CMakeLists.txt index d81b116..275d4a8 100644 --- a/test/0003_Graph/CMakeLists.txt +++ b/test/0003_Graph/CMakeLists.txt @@ -5,11 +5,11 @@ FetchContent_Declare( googletest URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip ) + # For Windows: Prevent overriding the parent project's compiler/linker settings set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) - enable_testing() add_executable( @@ -41,5 +41,10 @@ target_link_libraries( 0003GRAPH ) +# Add .clang-tidy configuration to this library. +if(CLANG_TIDY_EXE) + set_target_properties(0003GRAPH PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}") +endif() + include(GoogleTest) gtest_discover_tests(0003GraphTests DISCOVERY_TIMEOUT 30) \ No newline at end of file pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy