Skip to content

Commit

Permalink
chore: use iwyu on hashing/**.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
realstealthninja committed Sep 13, 2024
1 parent dabd6d2 commit 0c6611a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 20 deletions.
9 changes: 5 additions & 4 deletions hashing/chaining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
* @brief Implementation of [hash
* chains](https://en.wikipedia.org/wiki/Hash_chain).
*/
#include <cmath>
#include <iostream>
#include <memory>
#include <vector>
#include <bits/std_abs.h> // for abs
#include <stdlib.h> // for abs
#include <iostream> // for basic_ostream, operator<<, char_traits, cout
#include <memory> // for shared_ptr, __shared_ptr_access
#include <vector> // for vector

/**
* @brief Chain class with a given modulus
Expand Down
7 changes: 4 additions & 3 deletions hashing/double_hash_hash_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
* keys](https://en.wikipedia.org/wiki/Double_hashing).
* @note The implementation can be optimized by using OOP style.
*/
#include <iostream>
#include <memory>
#include <vector>
#include <cstddef> // for size_t
#include <functional> // for hash
#include <iostream> // for basic_ostream, operator<<, char_traits, cout
#include <vector> // for vector

/**
* @addtogroup open_addressing Open Addressing
Expand Down
6 changes: 4 additions & 2 deletions hashing/linear_probing_hash_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
* hash](https://en.wikipedia.org/wiki/Linear_probing) keys.
* @note The implementation can be optimized by using OOP style.
*/
#include <iostream>
#include <vector>
#include <cstddef> // for size_t
#include <functional> // for hash
#include <iostream> // for basic_ostream, operator<<, char_traits, cout
#include <vector> // for vector

/**
* @addtogroup open_addressing Open Addressing
Expand Down
8 changes: 5 additions & 3 deletions hashing/quadratic_probing_hash_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
* hash](https://en.wikipedia.org/wiki/Quadratic_probing) keys.
* @note The implementation can be optimized by using OOP style.
*/
#include <cmath>
#include <iostream>
#include <vector>
#include <cmath> // for round, pow
#include <cstddef> // for size_t
#include <functional> // for hash
#include <iostream> // for basic_ostream, operator<<, char_traits, cout
#include <vector> // for vector

/**
* @addtogroup open_addressing Open Addressing
Expand Down
19 changes: 11 additions & 8 deletions hashing/sha256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
* used for authenticating software packages and secure password hashing.
*/

#include <array> /// For std::array
#include <cassert> /// For assert
#include <cstdint> /// For uint8_t, uint32_t and uint64_t data types
#include <iomanip> /// For std::setfill and std::setw
#include <iostream> /// For IO operations
#include <sstream> /// For std::stringstream
#include <utility> /// For std::move
#include <vector> /// For std::vector
#include <array> // for array
#include <cassert> // for assert
#include <cstdint> // for uint32_t, uint8_t
#include <iomanip> // for operator<<, setfill, setw, _Setfill, _Setw
#include <iostream> // for char_traits, basic_ostream, operator<<, cout, hex
#include <sstream> // for basic_stringstream
#include <utility> // for move
#include <vector> // for allocator, vector
#include <cstddef> // for size_t
#include <stdexcept> // for out_of_range
#include <string> // for basic_string, string, operator==

/**
* @namespace hashing
Expand Down

0 comments on commit 0c6611a

Please sign in to comment.