Lines Matching +full:- +full:o
1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
25 ///@brief Find the off-diagonal index in row i whose absolute value is largest
29 /// @returns Index of absolute largest off-diagonal element in row i
39 /// uses the max_idx_row[] array to find the answer in O(n) time.
48 for (CeedInt i = 1; i < N - 1; i++) { in MaxEntry()
69 CeedScalar A_jj_ii = (A[j * N + j] - A[i * N + i]); in CalcRot()
71 // kappa = (A[j][j] - A[i][i]) / (2*A[i][j]) in CalcRot()
77 // t satisfies: t^2 + 2*t*kappa - 1 = 0 in CalcRot()
80 if (kappa < 0.0) rotmat_cst[2] = -rotmat_cst[2]; in CalcRot()
108 /// | -s ... c |
129 /// matrix elements in the upper-right triangle strictly above the diagonal.
157 A[i * N + i] -= rotmat_cst[2] * A[i * N + j]; in ApplyRot()
160 // A[i][i] = c*c*A[i][i] + s*s*A[j][j] - 2*s*c*A[i][j] in ApplyRot()
163 // Update the off-diagonal elements of A which will change (above the diagonal) in ApplyRot()
167 // compute A[w][i] and A[i][w] for all w!=i,considering above-diagonal elements in ApplyRot()
170 …A[w * N + i] = rotmat_cst[0] * A[w * N + i] - rotmat_cst[1] * A[w * N + j]; // A[w][i], A[w][j] f… in ApplyRot()
176 …A[i * N + w] = rotmat_cst[0] * A[i * N + w] - rotmat_cst[1] * A[w * N + j]; // A[i][w], A[w][j] f… in ApplyRot()
180 …A[i * N + w] = rotmat_cst[0] * A[i * N + w] - rotmat_cst[1] * A[j * N + w]; // A[i][w], A[j][w] f… in ApplyRot()
186 // compute A[w][j] and A[j][w] for all w!=j,considering above-diagonal elements in ApplyRot()
218 A[i * N + v] = rotmat_cst[0] * A[i * N + v] - rotmat_cst[1] * A[j * N + v]; in ApplyRotLeft()
232 for (CeedInt i = 0; i < N - 1; i++) { in SortRows()
266 /// on it, so divergence from normalized is due to finite-precision
276 … max_num_sweeps maximum number of iterations = max_num_sweeps * number of off-diagonals (N*(N-1)/2)
285 for (CeedInt i = 0; i < N - 1; i++) max_idx_row[i] = MaxEntryRow(A, N, i); in Diagonalize()
287 // -- Iteration -- in Diagonalize()
289 CeedInt max_num_iters = max_num_sweeps * N * (N - 1) / 2; in Diagonalize()