Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
Macros | Functions | Variables
main.cpp File Reference

Command-line interface for Monte Carlo integration and benchmarking. More...

#include <iostream>
#include <string>
#include <fstream>
#include <limits>
#include <array>
#include <vector>
#include <stdexcept>
#include <cstdint>
#include "apps/benchmarks.hpp"
#include <montecarlo/rng/rng_global.hpp>
#include <montecarlo/utils/plotter.hpp>
#include <montecarlo/integrators/MCintegrator.hpp>
#include <montecarlo/domains/polytope.hpp>
#include <montecarlo/geometry.hpp>
Include dependency graph for main.cpp:

Go to the source code of this file.

Macros

#define FUNCTION_FILE   "../function.txt"
 Path to user-defined integrand function.
 

Functions

std::string readFunctionFromFile (const std::string &filename)
 
template<int dim>
std::vector< mc::geom::Point< dim > > read_points_from_file (const std::string &filename)
 
template<int dim>
void read_normals_and_offsets_from_qhull_n (const std::string &filename, std::vector< std::array< double, dim > > &normals, std::vector< double > &offsets)
 
int main (int argc, char *argv[])
 

Variables

constexpr int dim = 2
 Default dimensionality for integration.
 

Detailed Description

Command-line interface for Monte Carlo integration and benchmarking.

Provides interactive access to six operational modes:

Supports seed control and OpenMP parallelization.

Definition in file main.cpp.

Macro Definition Documentation

◆ FUNCTION_FILE

#define FUNCTION_FILE   "../function.txt"

Path to user-defined integrand function.

Definition at line 33 of file main.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 54 of file main.cpp.

Here is the call graph for this function:

◆ read_normals_and_offsets_from_qhull_n()

template<int dim>
void read_normals_and_offsets_from_qhull_n ( const std::string &  filename,
std::vector< std::array< double, dim > > &  normals,
std::vector< double > &  offsets 
)

Definition at line 283 of file main.cpp.

◆ read_points_from_file()

template<int dim>
std::vector< mc::geom::Point< dim > > read_points_from_file ( const std::string &  filename)

Definition at line 240 of file main.cpp.

◆ readFunctionFromFile()

std::string readFunctionFromFile ( const std::string &  filename)

Definition at line 213 of file main.cpp.

Variable Documentation

◆ dim

constexpr int dim = 2
constexpr

Default dimensionality for integration.

Definition at line 36 of file main.cpp.