Skip to content

Commit 5b65101

Browse files
Revert "chore: use iwyu on numerical_methods/**.cpp"
This reverts commit eff2f44.
1 parent 1694bde commit 5b65101

12 files changed

+61
-72
lines changed

numerical_methods/babylonian_method.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
* @author [Ameya Chawla](https://github.com/ameyachawlaggsipu)
1010
*/
1111

12-
#include <cassert> // for assert
13-
#include <cmath> // for NAN
14-
#include <iostream> // for operator<<, basic_ostream, cout
15-
#include <algorithm> // for max, min
12+
#include <cassert> /// for assert
13+
#include <cmath>
14+
#include <iostream> /// for IO operations
1615

1716
/**
1817
* @namespace numerical_methods

numerical_methods/bisection_method.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
*
1414
* \see newton_raphson_method.cpp, false_position.cpp, secant_method.cpp
1515
*/
16-
#include <bits/std_abs.h> // for abs
17-
#include <cmath> // for pow
18-
#include <iostream> // for basic_ostream, char_traits, operator<<, cout
16+
#include <cmath>
17+
#include <iostream>
18+
#include <limits>
1919

2020
#define EPSILON \
2121
1e-6 // std::numeric_limits<double>::epsilon() ///< system accuracy limit

numerical_methods/brent_method_extrema.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
* \author [Krishna Vedala](https://github.com/kvedala)
1515
*/
1616
#define _USE_MATH_DEFINES ///< required for MS Visual C++
17-
#include <bits/std_abs.h> // for abs
18-
#include <cassert> // for assert
19-
#include <cmath> // for sqrt, cos, pow, M_E, M_PI
20-
#include <cstdint> // for uint32_t
21-
#include <functional> // for function
22-
#include <iostream> // for operator<<, basic_ostream, char_traits, cout
23-
#include <limits> // for numeric_limits
24-
#include <utility> // for swap
17+
#include <cassert>
18+
#include <cmath>
19+
#include <cstdint> /// for integral typedefs
20+
#include <functional>
21+
#include <iostream>
22+
#include <limits>
2523

2624
#define EPSILON \
2725
std::sqrt( \

numerical_methods/composite_simpson_rule.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@
3535
*
3636
*/
3737

38-
#include <cassert> // for assert
39-
#include <cmath> // for log, sqrt, pow, exp, NAN, isnan
40-
#include <cstdint> // for int32_t
41-
#include <cstdlib> // for atof, atoi
42-
#include <functional> // for function
43-
#include <iostream> // for basic_ostream, char_traits, operator<<, cout
44-
#include <map> // for map
45-
#include <utility> // for pair
38+
#include <cassert> /// for assert
39+
#include <cmath> /// for math functions
40+
#include <cmath>
41+
#include <cstdint> /// for integer allocation
42+
#include <cstdlib> /// for std::atof
43+
#include <functional> /// for std::function
44+
#include <iostream> /// for IO operations
45+
#include <map> /// for std::map container
4646

4747
/**
4848
* @namespace numerical_methods

numerical_methods/false_position.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
* \author Unknown author
2323
* \author [Samruddha Patil](https://github.com/sampatil578)
2424
*/
25-
#include <stdint.h> // for int16_t
26-
#include <iostream> // for basic_ostream, char_traits, operator<<, cout, endl
25+
#include <cmath> /// for math operations
26+
#include <iostream> /// for io operations
2727

2828
/**
2929
* @namespace numerical_methods

numerical_methods/golden_search_extrema.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
* \author [Krishna Vedala](https://github.com/kvedala)
99
*/
1010
#define _USE_MATH_DEFINES //< required for MS Visual C++
11-
#include <bits/std_abs.h> // for abs
12-
#include <cassert> // for assert
13-
#include <cmath> // for cos, pow, M_E, M_PI, sqrt
14-
#include <cstdint> // for uint32_t
15-
#include <functional> // for function
16-
#include <iostream> // for operator<<, basic_ostream, char_traits, cout
17-
#include <limits> // for numeric_limits
18-
#include <utility> // for swap
11+
#include <cassert>
12+
#include <cmath>
13+
#include <cstdint> /// for integral typedefs
14+
#include <functional>
15+
#include <iostream>
16+
#include <limits>
1917

2018
#define EPSILON 1e-7 ///< solution accuracy limit
2119

numerical_methods/gram_schmidt.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@
2828
* @author [Akanksha Gupta](https://github.com/Akanksha-Gupta920)
2929
*/
3030

31-
#include <array> // for array
32-
#include <cassert> // for assert
33-
#include <cmath> // for fabs, NAN
34-
#include <iostream> // for operator<<, basic_ostream, char_traits, cout
31+
#include <array> /// for std::array
32+
#include <cassert> /// for assert
33+
#include <cmath> /// for fabs
34+
#include <iostream> /// for io operations
35+
36+
#include "math.h"
3537

3638
/**
3739
* @namespace numerical_methods

numerical_methods/midpoint_integral_method.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@
1818
*
1919
* @author [ggkogkou](https://github.com/ggkogkou)
2020
*/
21-
#include <cassert> // for assert
22-
#include <cmath> // for log, sqrt, pow, exp, NAN, isnan
23-
#include <cstdint> // for int32_t
24-
#include <cstdlib> // for atof, atoi
25-
#include <functional> // for function
26-
#include <iostream> // for basic_ostream, char_traits, operator<<, cout
27-
#include <map> // for map
28-
#include <utility> // for pair
21+
#include <cassert> /// for assert
22+
#include <cmath> /// for math functions
23+
#include <cstdint> /// for integer allocation
24+
#include <cstdlib> /// for std::atof
25+
#include <functional> /// for std::function
26+
#include <iostream> /// for IO operations
27+
#include <map> /// for std::map container
2928

3029
/**
3130
* @namespace numerical_methods

numerical_methods/newton_raphson_method.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
* \author [Krishna Vedala](https://github.com/kvedala)
1313
* \see bisection_method.cpp, false_position.cpp
1414
*/
15-
#include <bits/std_abs.h> // for abs
16-
#include <cmath> // for pow, NAN
17-
#include <cstdint> // for INT16_MAX, int16_t
18-
#include <ctime> // for time
19-
#include <iostream> // for char_traits, basic_ostream, operator<<
20-
#include <cstdlib> // for rand, srand
15+
#include <cmath>
16+
#include <cstdint> /// for integral typedefs
17+
#include <ctime>
18+
#include <iostream>
19+
#include <limits>
2120

2221
constexpr double EPSILON = 1e-10; ///< system accuracy limit
2322
constexpr int16_t MAX_ITERATIONS = INT16_MAX; ///< Maximum number of iterations

numerical_methods/ode_forward_euler.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@
3636
* \see ode_midpoint_euler.cpp, ode_semi_implicit_euler.cpp
3737
*/
3838

39-
#include <cmath> // for cos, sin, NAN
40-
#include <ctime> // for clock, clock_t, CLOCKS_PER_SEC, size_t
41-
#include <fstream> // for operator<<, basic_ostream, char_traits, basic_of...
42-
#include <iostream> // for cout, cin
43-
#include <valarray> // for valarray, __multiplies, operator*, _BinClos
44-
#include <cstdio> // for perror
45-
#include <cstdlib> // for atof
39+
#include <cmath>
40+
#include <ctime>
41+
#include <fstream>
42+
#include <iostream>
43+
#include <valarray>
4644

4745
/**
4846
* @brief Problem statement for a system with first-order differential

0 commit comments

Comments
 (0)