28 #ifndef ERGO_MAT_ACC_EXTRAPOLATE_HEADER
29 #define ERGO_MAT_ACC_EXTRAPOLATE_HEADER
39 template<
class Treal,
class Tworker>
44 void Scan(
const Tworker & worker,
49 Treal* errorList_frob_,
50 Treal* errorList_eucl_,
51 Treal* errorList_maxe_,
65 template<
class Treal,
class Tworker>
67 : matrix_size_block_info(matrix_size_block_info_)
71 template<
class Treal,
class Tworker>
79 baseThresh = firstParam;
80 threshList.resize(nSteps);
81 errorList_frob.resize(nSteps);
82 errorList_eucl.resize(nSteps);
83 errorList_maxe.resize(nSteps);
84 timeList.resize(nSteps);
89 matrix_size_block_info);
92 matrix_size_block_info);
95 matrix_size_block_info);
98 worker.ComputeMatrix(firstParam, accurateMatrix);
100 Treal currParam = firstParam;
101 for(
int i = 0; i < nSteps; i++)
103 currParam *= stepFactor;
104 time_t startTime, endTime;
106 worker.ComputeMatrix(currParam, otherMatrix);
108 timeList[i] = endTime - startTime;
109 threshList[i] = currParam;
111 errorMatrix = otherMatrix;
112 errorMatrix += (
ergo_real)(-1) * accurateMatrix;
115 errorList_frob[i] = errorMatrix.
frob();
117 Treal euclAcc = 1e-11;
118 errorList_eucl[i] = errorMatrix.
eucl(euclAcc);
126 template<
class Treal,
class Tworker>
129 Treal* errorList_frob_,
130 Treal* errorList_eucl_,
131 Treal* errorList_maxe_,
134 for(
int i = 0; i < nScanSteps; i++)
136 threshList_[i] = threshList[i];
137 errorList_frob_[i] = errorList_frob[i];
138 errorList_eucl_[i] = errorList_eucl[i];
139 errorList_maxe_[i] = errorList_maxe[i];
140 timeList_ [i] = timeList [i];