Generation

generate functionSat, 12 Nov 2022

find eigenvalues

/** * @param a - the matrix to find eigenvalues of * * @return a vector with eigenvalues of matrix a */ std::vector<double> eigenvalues(std::vector<std::vector<double>> a) { //... } int main() { ... std::vector<std::vector<double>> a = {{1,2,3},{4,5,6},{7,8,9}}; std::vector<double> eigs = eigenvalues(a); ... }

Questions about programming?Chat with your personal AI assistant