@@ -284,10 +284,10 @@ int print_helper() {
284
284
std::cout << " Usage: vpmr [options]\n\n " ;
285
285
std::cout << " Options:\n\n " ;
286
286
std::cout << " -n <int> number of terms (default: 10)\n " ;
287
+ std::cout << " -c <int> maximum exponent (default: 4)\n " ;
287
288
std::cout << " -d <int> number of precision bits (default: 512)\n " ;
288
289
std::cout << " -q <int> quadrature order (default: 500)\n " ;
289
290
std::cout << " -m <float> precision multiplier (default: 1.5)\n " ;
290
- std::cout << " -nc <int> controls the maximum exponent (default: 4)\n " ;
291
291
std::cout << " -e <float> tolerance (default: 1E-8)\n " ;
292
292
std::cout << " -k <string> file name of kernel function (default: exp(-t^2/4))\n " ;
293
293
std::cout << " -s print singular values\n " ;
@@ -307,7 +307,7 @@ int main(const int argc, const char** argv) {
307
307
308
308
bool has_digit = false ;
309
309
for (auto I = 1 ; I < argc; ++I) {
310
- if (const auto token = std::string (argv[I]); token == " -nc " )
310
+ if (const auto token = std::string (argv[I]); token == " -c " )
311
311
NC = std::max (1 , std::stoi (argv[++I]));
312
312
else if (token == " -n" )
313
313
N = std::max (1 , std::stoi (argv[++I]));
@@ -376,12 +376,13 @@ int main(const int argc, const char** argv) {
376
376
std::cout << std::scientific << std::setprecision (4 );
377
377
378
378
std::cout << " Using the following parameters:\n " ;
379
- std::cout << " nc = " << NC << " .\n " ;
380
- std::cout << " n = " << N << " .\n " ;
381
- std::cout << " order = " << QUAD_ORDER << " .\n " ;
382
- std::cout << " precision = " << DIGIT << " .\n " ;
383
- std::cout << " tolerance = " << (2 * TOL).toDouble () << " .\n " ;
384
- std::cout << " kernel = " << KERNEL << " .\n\n " ;
379
+ std::cout << " terms = " << N << " .\n " ;
380
+ std::cout << " exponent = " << NC << " .\n " ;
381
+ std::cout << " precision = " << DIGIT << " .\n " ;
382
+ std::cout << " order = " << QUAD_ORDER << " .\n " ;
383
+ std::cout << " multiplier = " << SCALE << " .\n " ;
384
+ std::cout << " tolerance = " << (2 * TOL).toDouble () << " .\n " ;
385
+ std::cout << " kernel = " << KERNEL << " .\n\n " ;
385
386
386
387
try {
387
388
// run VPMR algorithm
@@ -410,12 +411,12 @@ int main(const int argc, const char** argv) {
410
411
#include < pybind11/stl.h>
411
412
412
413
std::tuple<std::vector<std::complex<double >>, std::vector<std::complex<double >>> vpmr_wrapper (
413
- const int n, const int d, const int q, const double m, const int nc , const double e, const std::string& k) {
414
+ const int n, const int d, const int q, const double m, const int c , const double e, const std::string& k) {
414
415
N = std::max (1 , n);
415
416
DIGIT = std::max (1 , d);
416
417
QUAD_ORDER = std::max (1 , q);
417
418
SCALE = std::max (1.5 , m);
418
- NC = std::max (1 , nc );
419
+ NC = std::max (1 , c );
419
420
TOL = mpreal (e);
420
421
if (!k.empty ()) KERNEL = k;
421
422
@@ -462,13 +463,13 @@ PYBIND11_MODULE(_pyvpmr, m) {
462
463
463
464
m.def (
464
465
" vpmr" , &vpmr_wrapper, pybind11::call_guard<pybind11::gil_scoped_release>(),
465
- pybind11::kw_only (), pybind11::arg (" n" ) = 10 , pybind11::arg (" d" ) = 0 , pybind11::arg (" q" ) = 500 , pybind11::arg (" m" ) = 1.5 , pybind11::arg (" nc " ) = 4 , pybind11::arg (" e" ) = 1E-8 , pybind11::arg (" k" ) = " " ,
466
+ pybind11::kw_only (), pybind11::arg (" n" ) = 10 , pybind11::arg (" d" ) = 0 , pybind11::arg (" q" ) = 500 , pybind11::arg (" m" ) = 1.5 , pybind11::arg (" c " ) = 4 , pybind11::arg (" e" ) = 1E-8 , pybind11::arg (" k" ) = " " ,
466
467
" The VPMR Algorithm.\n\n "
467
468
" :param n: number of terms (default: 10)\n "
469
+ " :param c: maximum exponent (default: 4)\n "
468
470
" :param d: number of precision bits (default: 512)\n "
469
471
" :param q: quadrature order (default: 500)\n "
470
472
" :param m: precision multiplier (default: 1.5)\n "
471
- " :param nc: maximum exponent (default: 4)\n "
472
473
" :param e: tolerance (default: 1E-8)\n "
473
474
" :param k: kernel function (default: exp(-t^2/4))\n "
474
475
" :return: M, S\n " );
0 commit comments