Skip to content

Commit

Permalink
Add using std::size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
lxylxy123456 committed May 15, 2021
1 parent 1f19363 commit 60f60a5
Show file tree
Hide file tree
Showing 96 changed files with 192 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/ActivitySelector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <iostream>
#include <vector>

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/AllPairsShortestPaths.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "Graph.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/AnySegmentsIntersect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "RedBlackTree.hpp"
#include "SegmentsIntersect.hpp"

using std::size_t;

namespace algorithms {

/*
Expand Down
2 changes: 2 additions & 0 deletions include/ApproxMinWeightVC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "Graph.hpp"
#include "Simplex.hpp"

using std::size_t;

namespace algorithms {

template <typename GT, typename T, typename WT>
Expand Down
2 changes: 2 additions & 0 deletions include/ApproxTSPTour.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "MST.hpp"
#include "SegmentsIntersect.hpp"

using std::size_t;

namespace algorithms {

template <typename GT, typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/ApproxVertexCover.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "Graph.hpp"

using std::size_t;

namespace algorithms {

template <typename GT, typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/BFS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "Graph.hpp"
#include "Queue.hpp"

using std::size_t;

namespace algorithms {

enum BFSColor { bfs_white, bfs_gray, bfs_black };
Expand Down
2 changes: 2 additions & 0 deletions include/BTree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <string>
#include <vector>

using std::size_t;

namespace algorithms {

size_t debug;
Expand Down
2 changes: 2 additions & 0 deletions include/BellmanFord.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "Graph.hpp"

using std::size_t;

namespace algorithms {

template <typename T, typename WT>
Expand Down
2 changes: 2 additions & 0 deletions include/BinaryCounter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <vector>

using std::size_t;

namespace algorithms {

class BinaryCounter {
Expand Down
2 changes: 2 additions & 0 deletions include/BinarySearchTree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "output_integers.hpp"
#include "print_ptr.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/BinaryTree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "print_tree.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/BucketSort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

#include "InsertSort.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/ChainedHash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "LinkedList.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/ClosestPairPoints.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#include "SegmentsIntersect.hpp"

using std::size_t;

namespace algorithms {

#define uset_vec typename std::unordered_set<Vector<T>, VectorHash<T>>
Expand Down
2 changes: 2 additions & 0 deletions include/CountingSort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <vector>

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/CutRod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <map>
#include <vector>

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/DFS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "Graph.hpp"

using std::size_t;

namespace algorithms {

enum DFSColor { dfs_white, dfs_gray, dfs_black };
Expand Down
2 changes: 2 additions & 0 deletions include/DagShortestPaths.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "BellmanFord.hpp"
#include "TopologicalSort.hpp"

using std::size_t;

namespace algorithms {

template <typename GT, typename T, typename WT>
Expand Down
2 changes: 2 additions & 0 deletions include/Dijkstra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "BellmanFord.hpp"
#include "FibHeap.hpp"

using std::size_t;

namespace algorithms {

template <typename GT, typename T, typename WT>
Expand Down
2 changes: 2 additions & 0 deletions include/DirectAddress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <cstddef>

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/DisjointSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "Graph.hpp"
#include "ProtovEB.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/DynamicTable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <algorithm>
#include <vector>

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/Euclid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef ALGORITHMS_EUCLID
#define ALGORITHMS_EUCLID

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/Fib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <thread>

using std::size_t;

namespace algorithms {

size_t Fib(size_t n) {
Expand Down
2 changes: 2 additions & 0 deletions include/FibHeap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#include "RedBlackTree.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/FindMaximumSubarray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <algorithm>
#include <vector>

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/FiniteAutomatonMatcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "NaiveStringMatcher.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/FloydWarshall.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "Graph.hpp"

using std::size_t;

namespace algorithms {

void PrintAllPairsShortestPath(Matrix<T_ptr<size_t>>& PI, size_t i, size_t j,
Expand Down
2 changes: 2 additions & 0 deletions include/FordFulkerson.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "BFS.hpp"

using std::size_t;

namespace algorithms {

template <typename GT, typename T, typename WT>
Expand Down
2 changes: 2 additions & 0 deletions include/GrahamScan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "SegmentsIntersect.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/Graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include "SquareMatrixMultiply.hpp"
#include "random_integers.hpp"

using std::size_t;

namespace algorithms {

#define uset typename std::unordered_set
Expand Down
2 changes: 2 additions & 0 deletions include/Greedy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <map>
#include <set>

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/GreedySetCover.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <set>
#include <vector>

using std::size_t;

namespace algorithms {

#define set_T typename std::set<T>
Expand Down
2 changes: 2 additions & 0 deletions include/Hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "random_integers.hpp"

using std::size_t;

namespace algorithms {

class DivisionHash {
Expand Down
2 changes: 2 additions & 0 deletions include/HireAssistant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <cassert>
#include <vector>

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/Huffman.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#include "MaxHeap.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/InsertSort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <vector>

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/IntervalTree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

#include "RedBlackTree.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/IterativeFFT.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "RecursiveFFT.hpp"

using std::size_t;

namespace algorithms {

size_t rev(size_t k, size_t n) {
Expand Down
2 changes: 2 additions & 0 deletions include/JarvisMarch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "SegmentsIntersect.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/Johnson.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "Dijkstra.hpp"
#include "SquareMatrixMultiply.hpp"

using std::size_t;

namespace algorithms {

template <typename GT, typename T, typename WT>
Expand Down
2 changes: 2 additions & 0 deletions include/KMPMatcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "NaiveStringMatcher.hpp"

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/LCSLength.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <iostream>
#include <vector>

using std::size_t;

namespace algorithms {

template <typename T>
Expand Down
Loading

0 comments on commit 60f60a5

Please sign in to comment.