diff --git a/sgi2018/src/follower/transform.h b/sgi2018/src/follower/transform.h index bd3909873dcf08de59ec8fc118df512c71e3db6f..d7a8f5a81568391efd000022ed57bdfcde00aad2 100644 --- a/sgi2018/src/follower/transform.h +++ b/sgi2018/src/follower/transform.h @@ -40,20 +40,21 @@ namespace Transform { // NOTE: identical to the previous function but dumps all eigenvalues produced, not just targets, to outCsv // + ComplexMatrix res(xiVector.size(), startIndexes.size()); + for(unsigned int i = 0; i < xiVector.size(); i ++){ + Point endPoint(startPoint.omega, startPoint.size, xiVector[startIndexes[i]]); + std::vector<unsigned int> indexesResult = Follow::adaptativStep(startPoint, endPoint, startIndexes, distanceThreshold, minstepsize); + ComplexVector v(indexesResult.size()); + outCsv.write( (ComplexVector) phaseSpeed(startPoint.omega, startPoint.formatedEigenvalues) ); + for(unsigned int j = 0; j < indexesResult.size(); j ++){ + v(j) = endPoint.formatedEigenvalues(indexesResult[j]); + } + res.row(i) = v; + // + // to follow several targets from a point to another, you can use : + } + return res; // to output the eigenvalues of a point, you can use : - // ComplexMatrix res(xiVector.size(), startIndexes.size()); - // outCsv.write( (ComplexVector) phaseSpeed(startPoint.omega, startPoint.formatedEigenvalues) ); - // for(unsigned int i = 0; i < xiVector.size(); i ++){ - // Point endPoint(startPoint.omega, startPoint.size, xiVector[i]); - // outCsv.write( (ComplexVector) phaseSpeed(startPoint.omega, point.formatedEigenvalues) ); - // // - // // to follow several targets from a point to another, you can use : - // if(i in startIndexes){ - // std::vector<unsigned int> indexesResult = Follow::adaptativStep(startPoint, endPoint, startIndexes, distanceThreshold, minstepsize); - // res.col(i) = indexesResult; - // } - // } - // return res; // // WARNING: you will need some sort of locking mechanism to export values while running in parallel