This project demonstrates a C++ integration library with a demo application.
It uses CMake for building and supports outputting results to a CSV file.
├── apps/ # Demo applications
│ └── demo.cpp # Main demo application
├── build/ # CMake build folder (ignored by Git)
├── docs/ # Doxygen documentation source
├── include/ # Header files
├── src/ # Source files
├── CMakeLists.txt
├── Doxyfile
├── README.md
└── .gitignoreBuild Folder
├── build/ # CMake build folder (ignored by Git)
│ ├── cmake_install.cmake
│ ├── CMakeFiles
│ ├── Makefile
│ └── outputs # Generated CSV results
│ └── results.csvInclude Directory (Headers)
├── include/ # Header files
│ ├── core/ # Core abstractions
│ │ ├── Domain2D.hpp
│ │ ├── Function.hpp
│ │ ├── Function2D.hpp
│ │ ├── IntegrationResult.hpp
│ │ ├── Interval.hpp
│ │ └── Solver.hpp
│ ├── functions/ # 1D & 2D function implementations
│ │ ├── ExpXY2D.hpp
│ │ ├── InvSqrt.hpp
│ │ ├── LogX.hpp
│ │ ├── PolyX2Cos.hpp
│ │ ├── Power.hpp
│ │ ├── ProductXY2D.hpp
│ │ ├── SinXY2D.hpp
│ │ ├── SumSquaresXY2D.hpp
│ │ └── T2Transform.hpp
│ └── solvers/ # Integration solvers
│ ├── CompositeSimpson.hpp
│ ├── CompositeTrapezoid.hpp
│ ├── GaussLegendre.hpp
│ ├── GSLIntegrator.hpp
│ ├── MonteCarloUniform.hpp
│ └── NestedIntegral2D.hppSource Directory (Implementations)
├── src/ # Source files
│ ├── core/ # Core class implementations
│ │ ├── Domain2D.cpp
│ │ └── Interval.cpp
│ └── solvers/ # Solver implementations
│ ├── CompositeSimpson.cpp
│ ├── CompositeTrapezoid.cpp
│ ├── GaussLegendre.cpp
│ ├── GSLIntegrator.cpp
│ ├── MonteCarloUniform.cpp
│ └── NestedIntegral2D.cpp- C++17 compatible compiler
- CMake installed
- macOS users: recommended to install CMake via Homebrew:
brew install cmakeYou may have also to download GSL:
brew install gsl- Create and enter the build directory:
mkdir -p build
cd buildIf the directory already exists, please remove it with:
rm -rf build- Configure the project with CMake:
cmake ..- Build the project:
cmake --build .This will generate the demo executable inside the build/ folder
- Run Demo
From the build/ folder, run:
./demo --output ../outputs/results.csvThe results will be saved in the outputs/ directory.
To generate the full API documentation:
- Run Doxygen (at the project root) with the included Doxyfile:
doxygen Doxyfile- Open the documentation in your browser:
open docs/html/index.html # macOS
xdg-open docs/html/index.html # LinuxThis documentation includes:
- Core abstractions (Function, Solver, Domain2D)
- All numerical integration methods (1D & 2D)
- Mathematical formulas and constraints