1 #ifndef HELPERFUNCTIONS_HODLR_SOLVER_HPP
2 #define HELPERFUNCTIONS_HODLR_SOLVER_HPP
15 #include <Eigen/Dense>
16 #include <Eigen/Sparse>
19 #include "HODLR_Matrix.hpp"
20 #include "user_IndexTree.hpp"
25 double quadraticKernel(
const double r);
28 double multiQuadraticKernel(
const double r);
31 double inverseQuadraticKernel(
const double r);
34 double inverseMultiQuadraticKernel(
const double r);
37 double gaussianKernel(
const double r);
40 double exponentialKernel(
const double r);
43 double logarithmicKernel(
const double r);
46 double oneOverRKernel(
const double r);
49 double oneOverSqRKernel(
const double r);
52 double logRKernel(
const double r);
57 std::vector<int> createUniqueRndIdx(
const int min,
const int max,
const int n);
59 std::vector<int> createSequentialVec(
const int min,
const int size);
70 Eigen::MatrixXd makeMatrixFrom1DInterval(
const std::vector<double> rowPts,
const std::vector<double> colPts,
const double diagValue ,
double (*kernel)(
const double));
86 Eigen::MatrixXd makeMatrix1DUniformPts(
const int minRowPt,
const int maxRowPt,
const int minColPt,
const int maxColPt,
const int numRows,
const int numCols,
const double diagValue,
double (*kernel)(
const double));
102 void testACASolverConv1DUnifromPts(
const double intervalMin,
const double intervalMax,
const int numPts,
const double diagValue, Eigen::VectorXd exactSoln, std::string outputFileName,
double (*kernel)(
const double r), std::string solverType =
"recLU");
117 void testACASolverSpeed1DUniformPts(
const double intervalMin,
const double intervalMax,
const double diagValue,
const double ACATolerance, std::string outputFileName,
double (*kernel)(
const double), std::string solverType =
"recLU");
132 void testACASolverSpeed1DUniformPts_FixedSize(
const double intervalMin,
const double intervalMax,
const double diagValue,
const double LR_Tolerance, std::string outputFileName,
double (*kernel)(
const double),
const int matrixSize, std::string solverType);
134 double eigenPartialPivLUSpeed(
const Eigen::MatrixXd & inputMatrix);
136 void testSolverSpeed(
const std::string inputFilePath,
const std::string outputFilePath,
const int sizeThreshold,std::string solverType,
user_IndexTree & usrTree);
138 void testBoundaryLRSolver(
const std::string inputMatrixFileName,
const std::string inputGraphFileName,
const std::string outputFileName,
const double iterInitTol,
const int sizeThreshold,
const int depth);
140 void testBoundaryLRSolver(
const std::string inputMatrixFileName,
const std::string inputGraphFileName,
const std::string outputFileName,
const double iterInitTol,
const int sizeThreshold,
const int depth,
user_IndexTree &usrTree);
142 void analyzeRank(
const std::string inputMatrixFileName,
const std::string inputGraphFileName,
const std::string outputFileName,
const int input_Min_i,
const int input_Min_j,
const int input_NumRows,
const int input_NumCols,std::string mode =
"default");
Definition: user_IndexTree.hpp:7