chore: use iwyu on numerical_methods/**.cpp

This commit is contained in:
realstealthninja
2024-09-13 15:39:02 +05:30
parent c47117ca3f
commit eff2f44a50
12 changed files with 72 additions and 61 deletions

View File

@@ -9,9 +9,10 @@
* @author [Ameya Chawla](https://github.com/ameyachawlaggsipu)
*/
#include <cassert> /// for assert
#include <cmath>
#include <iostream> /// for IO operations
#include <cassert> // for assert
#include <cmath> // for NAN
#include <iostream> // for operator<<, basic_ostream, cout
#include <algorithm> // for max, min
/**
* @namespace numerical_methods

View File

@@ -13,9 +13,9 @@
*
* \see newton_raphson_method.cpp, false_position.cpp, secant_method.cpp
*/
#include <cmath>
#include <iostream>
#include <limits>
#include <bits/std_abs.h> // for abs
#include <cmath> // for pow
#include <iostream> // for basic_ostream, char_traits, operator<<, cout
#define EPSILON \
1e-6 // std::numeric_limits<double>::epsilon() ///< system accuracy limit

View File

@@ -14,12 +14,14 @@
* \author [Krishna Vedala](https://github.com/kvedala)
*/
#define _USE_MATH_DEFINES ///< required for MS Visual C++
#include <cassert>
#include <cmath>
#include <cstdint> /// for integral typedefs
#include <functional>
#include <iostream>
#include <limits>
#include <bits/std_abs.h> // for abs
#include <cassert> // for assert
#include <cmath> // for sqrt, cos, pow, M_E, M_PI
#include <cstdint> // for uint32_t
#include <functional> // for function
#include <iostream> // for operator<<, basic_ostream, char_traits, cout
#include <limits> // for numeric_limits
#include <utility> // for swap
#define EPSILON \
std::sqrt( \

View File

@@ -35,14 +35,14 @@
*
*/
#include <cassert> /// for assert
#include <cmath> /// for math functions
#include <cmath>
#include <cstdint> /// for integer allocation
#include <cstdlib> /// for std::atof
#include <functional> /// for std::function
#include <iostream> /// for IO operations
#include <map> /// for std::map container
#include <cassert> // for assert
#include <cmath> // for log, sqrt, pow, exp, NAN, isnan
#include <cstdint> // for int32_t
#include <cstdlib> // for atof, atoi
#include <functional> // for function
#include <iostream> // for basic_ostream, char_traits, operator<<, cout
#include <map> // for map
#include <utility> // for pair
/**
* @namespace numerical_methods

View File

@@ -22,8 +22,8 @@
* \author Unknown author
* \author [Samruddha Patil](https://github.com/sampatil578)
*/
#include <cmath> /// for math operations
#include <iostream> /// for io operations
#include <stdint.h> // for int16_t
#include <iostream> // for basic_ostream, char_traits, operator<<, cout, endl
/**
* @namespace numerical_methods

View File

@@ -8,12 +8,14 @@
* \author [Krishna Vedala](https://github.com/kvedala)
*/
#define _USE_MATH_DEFINES //< required for MS Visual C++
#include <cassert>
#include <cmath>
#include <cstdint> /// for integral typedefs
#include <functional>
#include <iostream>
#include <limits>
#include <bits/std_abs.h> // for abs
#include <cassert> // for assert
#include <cmath> // for cos, pow, M_E, M_PI, sqrt
#include <cstdint> // for uint32_t
#include <functional> // for function
#include <iostream> // for operator<<, basic_ostream, char_traits, cout
#include <limits> // for numeric_limits
#include <utility> // for swap
#define EPSILON 1e-7 ///< solution accuracy limit

View File

@@ -28,12 +28,10 @@
* @author [Akanksha Gupta](https://github.com/Akanksha-Gupta920)
*/
#include <array> /// for std::array
#include <cassert> /// for assert
#include <cmath> /// for fabs
#include <iostream> /// for io operations
#include "math.h"
#include <array> // for array
#include <cassert> // for assert
#include <cmath> // for fabs, NAN
#include <iostream> // for operator<<, basic_ostream, char_traits, cout
/**
* @namespace numerical_methods

View File

@@ -18,13 +18,14 @@
*
* @author [ggkogkou](https://github.com/ggkogkou)
*/
#include <cassert> /// for assert
#include <cmath> /// for math functions
#include <cstdint> /// for integer allocation
#include <cstdlib> /// for std::atof
#include <functional> /// for std::function
#include <iostream> /// for IO operations
#include <map> /// for std::map container
#include <cassert> // for assert
#include <cmath> // for log, sqrt, pow, exp, NAN, isnan
#include <cstdint> // for int32_t
#include <cstdlib> // for atof, atoi
#include <functional> // for function
#include <iostream> // for basic_ostream, char_traits, operator<<, cout
#include <map> // for map
#include <utility> // for pair
/**
* @namespace numerical_methods

View File

@@ -12,11 +12,12 @@
* \author [Krishna Vedala](https://github.com/kvedala)
* \see bisection_method.cpp, false_position.cpp
*/
#include <cmath>
#include <cstdint> /// for integral typedefs
#include <ctime>
#include <iostream>
#include <limits>
#include <bits/std_abs.h> // for abs
#include <cmath> // for pow, NAN
#include <cstdint> // for INT16_MAX, int16_t
#include <ctime> // for time
#include <iostream> // for char_traits, basic_ostream, operator<<
#include <cstdlib> // for rand, srand
constexpr double EPSILON = 1e-10; ///< system accuracy limit
constexpr int16_t MAX_ITERATIONS = INT16_MAX; ///< Maximum number of iterations

View File

@@ -36,11 +36,13 @@
* \see ode_midpoint_euler.cpp, ode_semi_implicit_euler.cpp
*/
#include <cmath>
#include <ctime>
#include <fstream>
#include <iostream>
#include <valarray>
#include <cmath> // for cos, sin, NAN
#include <ctime> // for clock, clock_t, CLOCKS_PER_SEC, size_t
#include <fstream> // for operator<<, basic_ostream, char_traits, basic_of...
#include <iostream> // for cout, cin
#include <valarray> // for valarray, __multiplies, operator*, _BinClos
#include <cstdio> // for perror
#include <cstdlib> // for atof
/**
* @brief Problem statement for a system with first-order differential

View File

@@ -35,11 +35,13 @@
* \see ode_forward_euler.cpp, ode_semi_implicit_euler.cpp
*/
#include <cmath>
#include <ctime>
#include <fstream>
#include <iostream>
#include <valarray>
#include <cmath> // for cos, sin
#include <ctime> // for clock, clock_t, CLOCKS_PER_SEC, size_t
#include <fstream> // for operator<<, basic_ostream, char_traits, basic_of...
#include <iostream> // for cout, cin
#include <valarray> // for valarray, _BinClos, __multiplies, __plus, operator*
#include <cstdio> // for perror
#include <cstdlib> // for atof
/**
* @brief Problem statement for a system with first-order differential

View File

@@ -35,11 +35,13 @@
* \see ode_midpoint_euler.cpp, ode_forward_euler.cpp
*/
#include <cmath>
#include <ctime>
#include <fstream>
#include <iostream>
#include <valarray>
#include <cmath> // for cos, sin
#include <ctime> // for clock, clock_t, CLOCKS_PER_SEC, size_t
#include <fstream> // for operator<<, basic_ostream, char_traits, basic_of...
#include <iostream> // for cout, cin
#include <valarray> // for valarray, __multiplies, operator*, _BinClos
#include <cstdio> // for perror
#include <cstdlib> // for atof
/**
* @brief Problem statement for a system with first-order differential