MCPcopy Create free account
hub / github.com/OriginQ/QPanda-2 / JacobiPrecondition

Function JacobiPrecondition

Applications/HHL_Algorithm/preconditionByOrigin.cpp:289–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287}
288
289SparseQMatrix<double> JacobiPrecondition(SparseQMatrix<double> &Ae, VectorXd &b) {
290
291 auto diagonal = GetJacobiPrecondition(Ae);
292
293 SparseQMatrix<double> MA = JacobiMatrixMatrixProduct(diagonal.data(), Ae);
294
295#pragma omp parallel for
296 for (int i = 0; i < b.size(); i++)
297 b(i) = diagonal[i] * b(i);
298
299 return MA;
300}
301
302SparseQMatrix<double> JacobiPrecondition(SparseQMatrix<double>& Ae, vector<double>& b) {
303

Callers 1

preconditionFunction · 0.85

Calls 4

GetJacobiPreconditionFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected