fixed iteration

This commit is contained in:
Marc Haubenstock 2022-10-22 21:26:09 +02:00
parent 81f1a6d87e
commit 9acaa35e33

View File

@ -187,7 +187,8 @@ where
false => None false => None
}; };
for mut c in 0..number_of_elements_value { let mut c = 0;
while c < number_of_elements_value {
if self.eigenvalues_im[c] != T::zero() { if self.eigenvalues_im[c] != T::zero() {
//Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. //Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first.
eigenvalues.push(Complex::<T>::new(self.eigenvalues_re[c].clone(), self.eigenvalues_im[c].clone())); eigenvalues.push(Complex::<T>::new(self.eigenvalues_re[c].clone(), self.eigenvalues_im[c].clone()));