fixed iteration

This commit is contained in:
Marc Haubenstock 2022-10-22 21:26:09 +02:00
parent 81f1a6d87e
commit 9acaa35e33
1 changed files with 3 additions and 2 deletions

View File

@ -186,8 +186,9 @@ where
true => Some(Vec::<OVector<Complex<T>, D>>::with_capacity(number_of_complex_entries)), true => Some(Vec::<OVector<Complex<T>, D>>::with_capacity(number_of_complex_entries)),
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()));