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

Function AddNZeroIndex

Applications/HHL_Algorithm/BasicFunctionByOrigin.cpp:397–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397void AddNZeroIndex(vector<int>& TotalIndex, int jadd) {
398 auto index_add = No0Index[jadd];
399 TotalIndex.insert(TotalIndex.end(), index_add.begin(), index_add.end());
400 sort(TotalIndex.begin(), TotalIndex.end());
401 TotalIndex.erase(unique(TotalIndex.begin(), TotalIndex.end()), TotalIndex.end());
402}
403
404void FastGetSubMatrixRight(MatrixXd &subA, const vector<int> &TotalIndex, const vector<int> &Sp, SparseQMatrix<double>& Ae) {
405

Callers 1

Calls 5

sortFunction · 0.85
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected