From 6327b2f528f3890e185fe62486db0086570a1f44 Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 8 Apr 2025 04:36:29 +0000 Subject: [PATCH 01/35] init commit lanczos solver which argument --- .../raft/sparse/solver/detail/lanczos.cuh | 602 +++++++++++++++++- .../raft/sparse/solver/lanczos_types.hpp | 4 + cpp/include/raft/spectral/eigen_solvers.cuh | 4 +- cpp/tests/linalg/eigen_solvers.cu | 6 +- cpp/tests/sparse/solver/lanczos.cu | 10 +- .../pylibraft/sparse/linalg/lanczos.pyx | 45 +- 6 files changed, 651 insertions(+), 20 deletions(-) diff --git a/cpp/include/raft/sparse/solver/detail/lanczos.cuh b/cpp/include/raft/sparse/solver/detail/lanczos.cuh index 72c76858b7..76fe0090b2 100644 --- a/cpp/include/raft/sparse/solver/detail/lanczos.cuh +++ b/cpp/include/raft/sparse/solver/detail/lanczos.cuh @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -60,6 +61,7 @@ #include #include #include +#include #include @@ -1499,6 +1501,105 @@ RAFT_KERNEL kernel_clamp_down_vector(T* vec, T threshold, int size) if (idx < size) { vec[idx] = (fabs(vec[idx]) < threshold) ? 0 : vec[idx]; } } + +template +RAFT_KERNEL select_smallest_magnitude_kernel( + const ValueTypeT* eigenvalues, + const ValueTypeT* eigenvectors, + ValueTypeT* sm_eigenvalues, + ValueTypeT* sm_eigenvectors, + int ncv, int nEigVecs) +{ + // Find index closest to zero + int zero_idx = 0; + ValueTypeT min_abs_val = fabsf(eigenvalues[0]); + + for (int i = 1; i < ncv; i++) { + ValueTypeT abs_val = fabsf(eigenvalues[i]); + if (abs_val < min_abs_val) { + min_abs_val = abs_val; + zero_idx = i; + } + } + + // Two-pointer approach + int left = zero_idx - 1; + int right = zero_idx; + int dest_idx = 0; + + // Start with the value closest to zero + sm_eigenvalues[dest_idx] = eigenvalues[right]; + for (int i = 0; i < ncv; i++) { + sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[right * ncv + i]; + } + right++; + dest_idx++; + + // Expand outward + while (dest_idx < nEigVecs) { + // Handle cases where one or both pointers might be out of bounds + if (left < 0 && right >= ncv) { + // Both pointers out of bounds - we're done + break; + } + else if (left < 0) { + // Only right pointer is valid - use it + sm_eigenvalues[dest_idx] = eigenvalues[right]; + for (int i = 0; i < ncv; i++) { + sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[right * ncv + i]; + } + right++; + } + else if (right >= ncv) { + // Only left pointer is valid - use it + sm_eigenvalues[dest_idx] = eigenvalues[left]; + for (int i = 0; i < ncv; i++) { + sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[left * ncv + i]; + } + left--; + } + else { + // Both pointers are valid - compare them + if (fabsf(eigenvalues[left]) < fabsf(eigenvalues[right])) { + // Left value has smaller magnitude + sm_eigenvalues[dest_idx] = eigenvalues[left]; + for (int i = 0; i < ncv; i++) { + sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[left * ncv + i]; + } + left--; + } else { + // Right value has smaller magnitude + sm_eigenvalues[dest_idx] = eigenvalues[right]; + for (int i = 0; i < ncv; i++) { + sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[right * ncv + i]; + } + right++; + } + } + dest_idx++; + } +} + + +template +RAFT_KERNEL copy_by_indices_kernel( + const ValueTypeT* eigenvalues, + const ValueTypeT* eigenvectors, + const int* indices, + ValueTypeT* sm_eigenvalues, + ValueTypeT* sm_eigenvectors, + int ncv, int nEigVecs) +{ + for (int i = 0; i < nEigVecs; i++) { + int idx = indices[i]; + sm_eigenvalues[i] = eigenvalues[idx]; + + for (int j = 0; j < ncv; j++) { + sm_eigenvectors[i * ncv + j] = eigenvectors[idx * ncv + j]; + } + } +} + template void lanczos_solve_ritz( raft::resources const& handle, @@ -1698,6 +1799,7 @@ auto lanczos_smallest( int maxIter, int restartIter, ValueTypeT tol, + LANCZOS_WHICH which, ValueTypeT* eigVals_dev, ValueTypeT* eigVecs_dev, ValueTypeT* v0, @@ -1769,10 +1871,249 @@ auto lanczos_smallest( eigenvectors.view(), eigenvalues.view()); - auto eigenvectors_k = raft::make_device_matrix_view( - eigenvectors.data_handle(), ncv, nEigVecs); - auto eigenvalues_k = - raft::make_device_vector_view(eigenvalues.data_handle(), nEigVecs); + // auto eigenvectors_k = raft::make_device_matrix_view( + // eigenvectors.data_handle(), ncv, nEigVecs); + // auto eigenvalues_k = + // raft::make_device_vector_view(eigenvalues.data_handle(), nEigVecs); + + // auto eigenvectors_k = raft::make_device_matrix_view( + // eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); + // auto eigenvalues_k = + // raft::make_device_vector_view(eigenvalues.data_handle() + (ncv - nEigVecs), nEigVecs); + + + // Allocate memory for the largest magnitude eigenvalues and eigenvectors + // auto lm_eigenvalues = raft::make_device_vector(handle, nEigVecs); + // auto lm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); + + // // Two-pointer approach to find largest magnitude eigenvalues + // int left = 0; // Points to most negative values (start) + // int right = ncv - 1; // Points to most positive values (end) + // int dest_idx = 0; // Index in destination arrays + + // // Continue until we've collected nEigVecs eigenvalues + // while (dest_idx < nEigVecs && left <= right) { + // // Get absolute values at both ends + // ValueTypeT left_val, right_val; + // raft::copy(&left_val, eigenvalues.data_handle() + left, 1, stream); + // raft::copy(&right_val, eigenvalues.data_handle() + right, 1, stream); + + // // Compare absolute magnitudes + // if (std::abs(left_val) > std::abs(right_val)) { + // // Left value has larger magnitude + // raft::copy(lm_eigenvalues.data_handle() + dest_idx, + // eigenvalues.data_handle() + left, + // 1, stream); + // raft::copy(lm_eigenvectors.data_handle() + dest_idx * ncv, + // eigenvectors.data_handle() + left * ncv, + // ncv, stream); + // left++; + // } else { + // // Right value has larger magnitude + // raft::copy(lm_eigenvalues.data_handle() + dest_idx, + // eigenvalues.data_handle() + right, + // 1, stream); + // raft::copy(lm_eigenvectors.data_handle() + dest_idx * ncv, + // eigenvectors.data_handle() + right * ncv, + // ncv, stream); + // right--; + // } + // dest_idx++; + // } + + + // auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); + // auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); + + // // Use a device-side kernel for finding smallest magnitude eigenvalues + // select_smallest_magnitude_kernel<<<1, 1, 0, stream>>>( + // eigenvalues.data_handle(), + // eigenvectors.data_handle(), + // sm_eigenvalues.data_handle(), + // sm_eigenvectors.data_handle(), + // ncv, nEigVecs); + + + + // Now copy the eigenvalues and eigenvectors based on these indices + // copy_by_indices_kernel<<<1, 1, 0, stream>>>( + // eigenvalues.data_handle(), + // eigenvectors.data_handle(), + // selected_indices.data_handle(), + // sm_eigenvalues.data_handle(), + // sm_eigenvectors.data_handle(), + // ncv, nEigVecs); + + + // Replace custom kernel for eigenvalues + // raft::matrix::gather(handle, + // raft::make_device_matrix_view(eigenvalues.data_handle(), 1, ncv), + // raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), + // raft::make_device_matrix_view(sm_eigenvalues.data_handle(), 1, nEigVecs)); + + // // For row-major eigenvectors + // raft::matrix::gather(handle, + // raft::make_device_matrix_view( + // eigenvectors.data_handle(), ncv, ncv), + // raft::make_device_vector_view( + // selected_indices.data_handle(), nEigVecs), + // raft::make_device_matrix_view( + // sm_eigenvectors.data_handle(), nEigVecs, ncv)); + + + raft::device_matrix_view eigenvectors_k; + raft::device_vector_view eigenvalues_k; + raft::device_matrix_view eigenvectors_k_slice; + + auto indices = raft::make_device_vector(handle, ncv); + auto selected_indices = raft::make_device_vector(handle, nEigVecs); + + auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); + auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); + + + if (which == LANCZOS_WHICH::SA) { + eigenvectors_k = raft::make_device_matrix_view(eigenvectors.data_handle(), ncv, nEigVecs); + eigenvalues_k = raft::make_device_vector_view(eigenvalues.data_handle(), nEigVecs); + eigenvectors_k_slice = raft::make_device_matrix_view(eigenvectors.data_handle(), ncv, nEigVecs); + } + else if (which == LANCZOS_WHICH::LA) { + eigenvectors_k = raft::make_device_matrix_view(eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); + eigenvalues_k = raft::make_device_vector_view(eigenvalues.data_handle() + (ncv - nEigVecs), nEigVecs); + eigenvectors_k_slice = raft::make_device_matrix_view(eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); + } + else if (which == LANCZOS_WHICH::SM) { + // Allocate space for the results + // auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); + // auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); + + // Create an array of indices + // auto indices = raft::make_device_vector(handle, ncv); + thrust::sequence(thrust::device, indices.data_handle(), indices.data_handle() + ncv, 0); + + // Sort indices by absolute eigenvalues (magnitude) using a custom comparator + thrust::sort(thrust::device, + indices.data_handle(), + indices.data_handle() + ncv, + [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { + return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); + }); + + // Take the first nEigVecs indices (smallest magnitude) + // auto selected_indices = raft::make_device_vector(handle, nEigVecs); + raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); + + // Re-sort these indices by algebraic value to maintain algebraic ordering + // TODO: return eigenvectors=true + thrust::sort(thrust::device, + selected_indices.data_handle(), + selected_indices.data_handle() + nEigVecs, + [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { + return eigenvalues[a] < eigenvalues[b]; + }); + // Fix for the eigenvalues gather + raft::matrix::gather(handle, + // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) + raft::make_device_matrix_view( + eigenvalues.data_handle(), ncv, 1), + // Indices to gather + raft::make_device_vector_view( + selected_indices.data_handle(), nEigVecs), + // Output as a Kx1 matrix (nEigVecs rows, 1 column) + raft::make_device_matrix_view( + sm_eigenvalues.data_handle(), nEigVecs, 1) + ); + // If you also need to modify the eigenvectors gather call, use this: + raft::matrix::gather(handle, + // Input eigenvectors matrix (ncv rows, ncv columns) + raft::make_device_matrix_view( + eigenvectors.data_handle(), ncv, ncv), + // Indices to gather + raft::make_device_vector_view( + selected_indices.data_handle(), nEigVecs), + // Output eigenvectors matrix (nEigVecs rows, ncv columns) + raft::make_device_matrix_view( + sm_eigenvectors.data_handle(), nEigVecs, ncv) + ); + + // Use the collected smallest magnitude values + eigenvectors_k = raft::make_device_matrix_view( + sm_eigenvectors.data_handle(), ncv, nEigVecs); + eigenvalues_k = raft::make_device_vector_view( + sm_eigenvalues.data_handle(), nEigVecs); + eigenvectors_k_slice = raft::make_device_matrix_view(sm_eigenvectors.data_handle(), ncv, nEigVecs); + } + else if (which == LANCZOS_WHICH::LM) { + // Allocate space for the results + // auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); + // auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); + + // Create an array of indices + // auto indices = raft::make_device_vector(handle, ncv); + thrust::sequence(thrust::device, indices.data_handle(), indices.data_handle() + ncv, 0); + + // Sort indices by absolute eigenvalues (magnitude) using a custom comparator + thrust::sort(thrust::device, + indices.data_handle(), + indices.data_handle() + ncv, + [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { + return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); + }); + + // Take the last nEigVecs indices (largest magnitude) + raft::copy(selected_indices.data_handle(), + indices.data_handle() + (ncv - nEigVecs), + nEigVecs, stream); + + // Re-sort these indices by algebraic value to maintain algebraic ordering + // TODO: return eigenvectors=true + thrust::sort(thrust::device, + selected_indices.data_handle(), + selected_indices.data_handle() + nEigVecs, + [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { + return eigenvalues[a] < eigenvalues[b]; + }); + // Fix for the eigenvalues gather + raft::matrix::gather(handle, + // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) + raft::make_device_matrix_view( + eigenvalues.data_handle(), ncv, 1), + // Indices to gather + raft::make_device_vector_view( + selected_indices.data_handle(), nEigVecs), + // Output as a Kx1 matrix (nEigVecs rows, 1 column) + raft::make_device_matrix_view( + sm_eigenvalues.data_handle(), nEigVecs, 1) + ); + // If you also need to modify the eigenvectors gather call, use this: + raft::matrix::gather(handle, + // Input eigenvectors matrix (ncv rows, ncv columns) + raft::make_device_matrix_view( + eigenvectors.data_handle(), ncv, ncv), + // Indices to gather + raft::make_device_vector_view( + selected_indices.data_handle(), nEigVecs), + // Output eigenvectors matrix (nEigVecs rows, ncv columns) + raft::make_device_matrix_view( + sm_eigenvectors.data_handle(), nEigVecs, ncv) + ); + + // Use the collected smallest magnitude values + eigenvectors_k = raft::make_device_matrix_view( + sm_eigenvectors.data_handle(), ncv, nEigVecs); + eigenvalues_k = raft::make_device_vector_view( + sm_eigenvalues.data_handle(), nEigVecs); + eigenvectors_k_slice = raft::make_device_matrix_view(sm_eigenvectors.data_handle(), ncv, nEigVecs); + } + + // Use the collected largest magnitude values + // auto eigenvectors_k = raft::make_device_matrix_view( + // lm_eigenvectors.data_handle(), ncv, nEigVecs); + // auto eigenvalues_k = raft::make_device_vector_view( + // lm_eigenvalues.data_handle(), nEigVecs); + + + auto ritz_eigenvectors = raft::make_device_matrix_view(eigVecs_dev, n, nEigVecs); @@ -1784,9 +2125,20 @@ auto lanczos_smallest( auto s = raft::make_device_vector(handle, nEigVecs); - auto eigenvectors_k_slice = - raft::make_device_matrix_view( - eigenvectors.data_handle(), ncv, nEigVecs); + // auto eigenvectors_k_slice = + // raft::make_device_matrix_view( + // eigenvectors.data_handle(), ncv, nEigVecs); + + // auto eigenvectors_k_slice = raft::make_device_matrix_view( + // eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); + + // auto eigenvectors_k_slice = raft::make_device_matrix_view( + // eigenvectors.data_handle(), ncv, nEigVecs); + + // auto eigenvectors_k_slice = raft::make_device_matrix_view( + // sm_eigenvectors.data_handle(), ncv, nEigVecs); + + auto S_matrix = raft::make_device_matrix_view( s.data_handle(), 1, nEigVecs); @@ -2025,8 +2377,223 @@ auto lanczos_smallest( ncv, eigenvectors.view(), eigenvalues.view()); - auto eigenvectors_k = raft::make_device_matrix_view( - eigenvectors.data_handle(), ncv, nEigVecs); + // auto eigenvectors_k = raft::make_device_matrix_view( + // eigenvectors.data_handle(), ncv, nEigVecs); + + // auto eigenvectors_k = raft::make_device_matrix_view( + // eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); + + + // Allocate memory for the largest magnitude eigenvalues and eigenvectors + // auto lm_eigenvalues = raft::make_device_vector(handle, nEigVecs); + // auto lm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); + + // Two-pointer approach to find largest magnitude eigenvalues + // int left = 0; // Points to most negative values (start) + // int right = ncv - 1; // Points to most positive values (end) + // int dest_idx = 0; // Index in destination arrays + + // // Continue until we've collected nEigVecs eigenvalues + // while (dest_idx < nEigVecs && left <= right) { + // // Get absolute values at both ends + // ValueTypeT left_val, right_val; + // raft::copy(&left_val, eigenvalues.data_handle() + left, 1, stream); + // raft::copy(&right_val, eigenvalues.data_handle() + right, 1, stream); + + // // Compare absolute magnitudes + // if (std::abs(left_val) > std::abs(right_val)) { + // // Left value has larger magnitude + // raft::copy(lm_eigenvalues.data_handle() + dest_idx, + // eigenvalues.data_handle() + left, + // 1, stream); + // raft::copy(lm_eigenvectors.data_handle() + dest_idx * ncv, + // eigenvectors.data_handle() + left * ncv, + // ncv, stream); + // left++; + // } else { + // // Right value has larger magnitude + // raft::copy(lm_eigenvalues.data_handle() + dest_idx, + // eigenvalues.data_handle() + right, + // 1, stream); + // raft::copy(lm_eigenvectors.data_handle() + dest_idx * ncv, + // eigenvectors.data_handle() + right * ncv, + // ncv, stream); + // right--; + // } + // dest_idx++; + // } + + + // auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); + // auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); + + // Use a device-side kernel for finding smallest magnitude eigenvalues + // select_smallest_magnitude_kernel<<<1, 1, 0, stream>>>( + // eigenvalues.data_handle(), + // eigenvectors.data_handle(), + // sm_eigenvalues.data_handle(), + // sm_eigenvectors.data_handle(), + // ncv, nEigVecs); + + + // Allocate space for the results + // auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); + // auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); + + // Create an array of indices + // auto indices = raft::make_device_vector(handle, ncv); + // thrust::sequence(thrust::device, indices.data_handle(), indices.data_handle() + ncv, 0); + + if (which == LANCZOS_WHICH::SM) { + // Sort indices by absolute eigenvalues (magnitude) using a custom comparator + thrust::sort(thrust::device, + indices.data_handle(), + indices.data_handle() + ncv, + [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { + return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); + }); + // Take the first nEigVecs indices (smallest magnitude) + // auto selected_indices = raft::make_device_vector(handle, nEigVecs); + raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); + + // Re-sort these indices by algebraic value to maintain algebraic ordering + thrust::sort(thrust::device, + selected_indices.data_handle(), + selected_indices.data_handle() + nEigVecs, + [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { + return eigenvalues[a] < eigenvalues[b]; + }); + // Now copy the eigenvalues and eigenvectors based on these indices + // copy_by_indices_kernel<<<1, 1, 0, stream>>>( + // eigenvalues.data_handle(), + // eigenvectors.data_handle(), + // selected_indices.data_handle(), + // sm_eigenvalues.data_handle(), + // sm_eigenvectors.data_handle(), + // ncv, nEigVecs); + + // raft::matrix::gather(handle, + // raft::make_device_matrix_view(eigenvalues.data_handle(), 1, ncv), + // raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), + // raft::make_device_matrix_view(sm_eigenvalues.data_handle(), 1, nEigVecs)); + + // // For row-major eigenvectors + // raft::matrix::gather(handle, + // raft::make_device_matrix_view( + // eigenvectors.data_handle(), ncv, ncv), + // raft::make_device_vector_view( + // selected_indices.data_handle(), nEigVecs), + // raft::make_device_matrix_view( + // sm_eigenvectors.data_handle(), nEigVecs, ncv)); + + + // Fix for the eigenvalues gather + raft::matrix::gather(handle, + // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) + raft::make_device_matrix_view( + eigenvalues.data_handle(), ncv, 1), + // Indices to gather + raft::make_device_vector_view( + selected_indices.data_handle(), nEigVecs), + // Output as a Kx1 matrix (nEigVecs rows, 1 column) + raft::make_device_matrix_view( + sm_eigenvalues.data_handle(), nEigVecs, 1) + ); + // If you also need to modify the eigenvectors gather call, use this: + raft::matrix::gather(handle, + // Input eigenvectors matrix (ncv rows, ncv columns) + raft::make_device_matrix_view( + eigenvectors.data_handle(), ncv, ncv), + // Indices to gather + raft::make_device_vector_view( + selected_indices.data_handle(), nEigVecs), + // Output eigenvectors matrix (nEigVecs rows, ncv columns) + raft::make_device_matrix_view( + sm_eigenvectors.data_handle(), nEigVecs, ncv) + ); + } + else if (which == LANCZOS_WHICH::LM) { + // Sort indices by absolute eigenvalues (magnitude) using a custom comparator + thrust::sort(thrust::device, + indices.data_handle(), + indices.data_handle() + ncv, + [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { + return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); + }); + // Take the last nEigVecs indices (largest magnitude) + raft::copy(selected_indices.data_handle(), + indices.data_handle() + (ncv - nEigVecs), + nEigVecs, stream); + + // Re-sort these indices by algebraic value to maintain algebraic ordering + thrust::sort(thrust::device, + selected_indices.data_handle(), + selected_indices.data_handle() + nEigVecs, + [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { + return eigenvalues[a] < eigenvalues[b]; + }); + // Now copy the eigenvalues and eigenvectors based on these indices + // copy_by_indices_kernel<<<1, 1, 0, stream>>>( + // eigenvalues.data_handle(), + // eigenvectors.data_handle(), + // selected_indices.data_handle(), + // sm_eigenvalues.data_handle(), + // sm_eigenvectors.data_handle(), + // ncv, nEigVecs); + + // raft::matrix::gather(handle, + // raft::make_device_matrix_view(eigenvalues.data_handle(), 1, ncv), + // raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), + // raft::make_device_matrix_view(sm_eigenvalues.data_handle(), 1, nEigVecs)); + + // // For row-major eigenvectors + // raft::matrix::gather(handle, + // raft::make_device_matrix_view( + // eigenvectors.data_handle(), ncv, ncv), + // raft::make_device_vector_view( + // selected_indices.data_handle(), nEigVecs), + // raft::make_device_matrix_view( + // sm_eigenvectors.data_handle(), nEigVecs, ncv)); + + + // Fix for the eigenvalues gather + raft::matrix::gather(handle, + // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) + raft::make_device_matrix_view( + eigenvalues.data_handle(), ncv, 1), + // Indices to gather + raft::make_device_vector_view( + selected_indices.data_handle(), nEigVecs), + // Output as a Kx1 matrix (nEigVecs rows, 1 column) + raft::make_device_matrix_view( + sm_eigenvalues.data_handle(), nEigVecs, 1) + ); + // If you also need to modify the eigenvectors gather call, use this: + raft::matrix::gather(handle, + // Input eigenvectors matrix (ncv rows, ncv columns) + raft::make_device_matrix_view( + eigenvectors.data_handle(), ncv, ncv), + // Indices to gather + raft::make_device_vector_view( + selected_indices.data_handle(), nEigVecs), + // Output eigenvectors matrix (nEigVecs rows, ncv columns) + raft::make_device_matrix_view( + sm_eigenvectors.data_handle(), nEigVecs, ncv) + ); + } + + + // Use the collected smallest magnitude values + // auto eigenvectors_k = raft::make_device_matrix_view( + // sm_eigenvectors.data_handle(), ncv, nEigVecs); + // auto eigenvalues_k = raft::make_device_vector_view( + // sm_eigenvalues.data_handle(), nEigVecs); + + // Use the collected largest magnitude values + // auto eigenvectors_k = raft::make_device_matrix_view( + // lm_eigenvectors.data_handle(), ncv, nEigVecs); + // auto eigenvalues_k = raft::make_device_vector_view( + // lm_eigenvalues.data_handle(), nEigVecs); auto ritz_eigenvectors = raft::make_device_matrix_view( eigVecs_dev, n, nEigVecs); @@ -2036,9 +2603,18 @@ auto lanczos_smallest( raft::linalg::gemm( handle, V_T, eigenvectors_k, ritz_eigenvectors); - auto eigenvectors_k_slice = - raft::make_device_matrix_view( - eigenvectors.data_handle(), ncv, nEigVecs); + // auto eigenvectors_k_slice = + // raft::make_device_matrix_view( + // eigenvectors.data_handle(), ncv, nEigVecs); + + // auto eigenvectors_k_slice = raft::make_device_matrix_view( + // eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); + + // auto eigenvectors_k_slice = raft::make_device_matrix_view( + // sm_eigenvectors.data_handle(), ncv, nEigVecs); + + + auto S_matrix = raft::make_device_matrix_view( s.data_handle(), 1, nEigVecs); @@ -2089,6 +2665,7 @@ auto lanczos_compute_smallest_eigenvectors( config.max_iterations, config.ncv, config.tolerance, + config.which, eigenvalues.data_handle(), eigenvectors.data_handle(), v0->data_handle(), @@ -2105,6 +2682,7 @@ auto lanczos_compute_smallest_eigenvectors( config.max_iterations, config.ncv, config.tolerance, + config.which, eigenvalues.data_handle(), eigenvectors.data_handle(), temp_v0.data_handle(), diff --git a/cpp/include/raft/sparse/solver/lanczos_types.hpp b/cpp/include/raft/sparse/solver/lanczos_types.hpp index edd5548079..d0f22c0094 100644 --- a/cpp/include/raft/sparse/solver/lanczos_types.hpp +++ b/cpp/include/raft/sparse/solver/lanczos_types.hpp @@ -20,6 +20,8 @@ namespace raft::sparse::solver { +enum LANCZOS_WHICH {LA, LM, SA, SM}; + template struct lanczos_solver_config { /** The number of eigenvalues and eigenvectors to compute. Must be 1 <= k < n.*/ @@ -30,6 +32,8 @@ struct lanczos_solver_config { int ncv; /** Tolerance for residuals ``||Ax - wx||`` */ ValueTypeT tolerance; + /** which=**/ + LANCZOS_WHICH which; /** random seed */ uint64_t seed; }; diff --git a/cpp/include/raft/spectral/eigen_solvers.cuh b/cpp/include/raft/spectral/eigen_solvers.cuh index 0d511a2333..d1cc5e2efe 100644 --- a/cpp/include/raft/spectral/eigen_solvers.cuh +++ b/cpp/include/raft/spectral/eigen_solvers.cuh @@ -35,6 +35,8 @@ struct eigen_solver_config_t { size_type_t restartIter; value_type_t tol; + raft::sparse::solver::LANCZOS_WHICH which; + bool reorthogonalize{false}; unsigned long long seed{ 1234567}; // CAVEAT: this default value is now common to all instances of using seed in @@ -80,7 +82,7 @@ struct lanczos_solver_t { RAFT_EXPECTS(eigVecs != nullptr, "Null eigVecs buffer."); auto lanczos_config = raft::sparse::solver::lanczos_solver_config{ - config_.n_eigVecs, config_.maxIter, config_.restartIter, config_.tol, config_.seed}; + config_.n_eigVecs, config_.maxIter, config_.restartIter, config_.tol, config_.which, config_.seed}; auto v0_opt = std::optional>{ std::nullopt}; auto input_structure = input.structure_view(); diff --git a/cpp/tests/linalg/eigen_solvers.cu b/cpp/tests/linalg/eigen_solvers.cu index f43081690c..a195b91226 100644 --- a/cpp/tests/linalg/eigen_solvers.cu +++ b/cpp/tests/linalg/eigen_solvers.cu @@ -67,7 +67,7 @@ TEST(Raft, EigenSolvers) std::uint64_t seed{100110021003}; eigen_solver_config_t cfg{ - neigvs, maxiter, restart_iter, tol, reorthog, seed}; + neigvs, maxiter, restart_iter, tol, raft::sparse::solver::LANCZOS_WHICH::SA, reorthog, seed}; lanczos_solver_t eig_solver{cfg}; @@ -104,7 +104,7 @@ TEST(Raft, SpectralSolvers) unsigned long long seed{100110021003}; eigen_solver_config_t eig_cfg{ - neigvs, maxiter, restart_iter, tol, reorthog, seed}; + neigvs, maxiter, restart_iter, tol, raft::sparse::solver::LANCZOS_WHICH::SA, reorthog, seed}; lanczos_solver_t eig_solver{eig_cfg}; index_type k{5}; @@ -177,7 +177,7 @@ TEST(Raft, SpectralPartition) num_edges}; auto eig_cfg = raft::spectral::eigen_solver_config_t{ - n_eig_vects, evs_max_iter, restartIter_lanczos, evs_tolerance, false, seed_eig_solver}; + n_eig_vects, evs_max_iter, restartIter_lanczos, evs_tolerance, raft::sparse::solver::LANCZOS_WHICH::SA, false, seed_eig_solver}; auto eigen_solver = raft::spectral::lanczos_solver_t{eig_cfg}; auto clust_cfg = raft::spectral::cluster_solver_config_t{ diff --git a/cpp/tests/sparse/solver/lanczos.cu b/cpp/tests/sparse/solver/lanczos.cu index 3652b811e9..cf736c7fa2 100644 --- a/cpp/tests/sparse/solver/lanczos.cu +++ b/cpp/tests/sparse/solver/lanczos.cu @@ -58,6 +58,7 @@ struct lanczos_inputs { int conv_n_iters; float conv_eps; float tol; + solver::LANCZOS_WHICH which; uint64_t seed; std::vector rows; // indptr std::vector cols; // indices @@ -73,6 +74,7 @@ struct rmat_lanczos_inputs { int conv_n_iters; float conv_eps; float tol; + solver::LANCZOS_WHICH which; uint64_t seed; int r_scale; int c_scale; @@ -200,7 +202,7 @@ class rmat_lanczos_tests symmetric_coo.n_rows, (uint64_t)symmetric_coo.nnz}; raft::sparse::solver::lanczos_solver_config config{ - n_components, params.maxiter, params.restartiter, params.tol, rng.seed}; + n_components, params.maxiter, params.restartiter, params.tol, params.which, rng.seed}; auto csr_structure = raft::make_device_compressed_structure_view( @@ -294,7 +296,7 @@ class lanczos_tests : public ::testing::TestWithParam stats; raft::sparse::solver::lanczos_solver_config config{ - params.n_components, params.maxiter, params.restartiter, params.tol, rng.seed}; + params.n_components, params.maxiter, params.restartiter, params.tol, params.which, rng.seed}; auto csr_structure = raft::make_device_compressed_structure_view( const_cast(rows.data_handle()), @@ -346,6 +348,7 @@ const std::vector> inputsf = { 0, 0, 1e-15, + raft::sparse::solver::LANCZOS_WHICH::SA, 42, {0, 0, 0, 0, 3, 5, 6, 8, 9, 11, 16, 16, 18, 20, 23, 24, 27, 30, 31, 33, 37, 37, 39, 41, 43, 44, 46, 46, 47, 49, 50, 50, 51, 53, @@ -396,6 +399,7 @@ const std::vector> inputsd = { 0, 0, 1e-15, + raft::sparse::solver::LANCZOS_WHICH::SA, 42, {0, 0, 0, 0, 3, 5, 6, 8, 9, 11, 16, 16, 18, 20, 23, 24, 27, 30, 31, 33, 37, 37, 39, 41, 43, 44, 46, 46, 47, 49, 50, 50, 51, 53, @@ -440,7 +444,7 @@ const std::vector> inputsd = { {-2.0369630, -1.7673520}}}; const std::vector> rmat_inputsf = { - {50, 100, 10000, 0, 0, 1e-9, 42, 12, 12, 1, {-122.526794, -74.00686, -59.698284, -54.68617, + {50, 100, 10000, 0, 0, 1e-9, raft::sparse::solver::LANCZOS_WHICH::SA, 42, 12, 12, 1, {-122.526794, -74.00686, -59.698284, -54.68617, -49.686813, -34.02644, -32.130703, -31.26906, -30.32097, -22.946098, -20.497862, -20.23817, -19.269697, -18.42496, -17.675667, -17.013401, diff --git a/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx b/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx index dc2a84b428..f67dfcb44d 100644 --- a/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx +++ b/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx @@ -45,11 +45,18 @@ from pylibraft.random.cpp.rng_state cimport RngState cdef extern from "raft/sparse/solver/lanczos_types.hpp" \ namespace "raft::sparse::solver" nogil: + enum LANCZOS_WHICH: + LA = 0, + LM = 1, + SA = 2, + SM = 3 + cdef cppclass lanczos_solver_config[ValueTypeT]: int n_components int max_iterations int ncv ValueTypeT tolerance + LANCZOS_WHICH which uint64_t seed cdef lanczos_solver_config[float] config_float @@ -100,7 +107,7 @@ cdef extern from "raft_runtime/solver/lanczos.hpp" \ @auto_sync_handle -def eigsh(A, k=6, v0=None, ncv=None, maxiter=None, +def eigsh(A, k=6, which="SA", v0=None, ncv=None, maxiter=None, tol=0, seed=None, handle=None): """ Find ``k`` eigenvalues and eigenvectors of the real symmetric square @@ -192,6 +199,15 @@ def eigsh(A, k=6, v0=None, ncv=None, maxiter=None, config_float.ncv = ncv config_float.tolerance = tol config_float.seed = seed + + if which.lower() == "sa": + config_float.which = LANCZOS_WHICH.SA + elif which.lower() == "sm": + config_float.which = LANCZOS_WHICH.SM + elif which.lower() == "la": + config_float.which = LANCZOS_WHICH.LA + elif which.lower() == "lm": + config_float.which = LANCZOS_WHICH.LM if v0 is not None: v0 = cai_wrapper(v0) v0_ptr = v0.data @@ -213,6 +229,15 @@ def eigsh(A, k=6, v0=None, ncv=None, maxiter=None, config_float.ncv = ncv config_float.tolerance = tol config_float.seed = seed + + if which.lower() == "sa": + config_float.which = LANCZOS_WHICH.SA + elif which.lower() == "sm": + config_float.which = LANCZOS_WHICH.SM + elif which.lower() == "la": + config_float.which = LANCZOS_WHICH.LA + elif which.lower() == "lm": + config_float.which = LANCZOS_WHICH.LM if v0 is not None: v0 = cai_wrapper(v0) v0_ptr = v0.data @@ -234,6 +259,15 @@ def eigsh(A, k=6, v0=None, ncv=None, maxiter=None, config_double.ncv = ncv config_double.tolerance = tol config_double.seed = seed + + if which.lower() == "sa": + config_double.which = LANCZOS_WHICH.SA + elif which.lower() == "sm": + config_double.which = LANCZOS_WHICH.SM + elif which.lower() == "la": + config_double.which = LANCZOS_WHICH.LA + elif which.lower() == "lm": + config_double.which = LANCZOS_WHICH.LM if v0 is not None: v0 = cai_wrapper(v0) v0_ptr = v0.data @@ -255,6 +289,15 @@ def eigsh(A, k=6, v0=None, ncv=None, maxiter=None, config_double.ncv = ncv config_double.tolerance = tol config_double.seed = seed + + if which.lower() == "sa": + config_double.which = LANCZOS_WHICH.SA + elif which.lower() == "sm": + config_double.which = LANCZOS_WHICH.SM + elif which.lower() == "la": + config_double.which = LANCZOS_WHICH.LA + elif which.lower() == "lm": + config_double.which = LANCZOS_WHICH.LM if v0 is not None: v0 = cai_wrapper(v0) v0_ptr = v0.data From 43a5ca5b4e4e526b070e06a2e1d37c5888da5a65 Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 8 Apr 2025 18:57:39 +0000 Subject: [PATCH 02/35] update pytest --- python/pylibraft/pylibraft/tests/test_sparse.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index dee3ad4add..32081a38fa 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -76,11 +76,11 @@ def _make_matrix(self, dtype, xp): a = a * a.conj().T return a - def _test_eigsh(self, a, k, xp, sp): + def _test_eigsh(self, a, k, xp, sp, which): expected_ret = sp.linalg.eigsh( - a, k=k, return_eigenvectors=self.return_eigenvectors, which="SA" + a, k=k, return_eigenvectors=self.return_eigenvectors, which=which ) - actual_ret = eigsh(a, k=k) + actual_ret = eigsh(a, k=k, which=which) if self.return_eigenvectors: w, x = actual_ret exp_w, _ = expected_ret @@ -98,13 +98,14 @@ def _test_eigsh(self, a, k, xp, sp): @pytest.mark.parametrize("format", ["csr"]) # , 'csc', 'coo']) @pytest.mark.parametrize("k", [3, 6, 12]) @pytest.mark.parametrize("dtype", ["f", "d"]) - def test_sparse(self, format, k, dtype, xp=cupy, sp=sparse): + @pytest.mark.parametrize("which", ["LA", "LM", "SA"]) + def test_sparse(self, format, k, dtype, which, xp=cupy, sp=sparse): if format == "csc": pytest.xfail("may be buggy") # trans=True a = self._make_matrix(dtype, xp) a = sp.coo_matrix(a).asformat(format) - return self._test_eigsh(a, k, xp, sp) + return self._test_eigsh(a, k, xp, sp, which) def test_invalid(self): xp, sp = cupy, sparse From d1ff91e31846158e9f731c3c3aa7068c8312c262 Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 8 Apr 2025 19:08:19 +0000 Subject: [PATCH 03/35] pre-commit --- .../raft/sparse/solver/detail/lanczos.cuh | 674 ++++++------------ 1 file changed, 200 insertions(+), 474 deletions(-) diff --git a/cpp/include/raft/sparse/solver/detail/lanczos.cuh b/cpp/include/raft/sparse/solver/detail/lanczos.cuh index 76fe0090b2..5afa0c69c9 100644 --- a/cpp/include/raft/sparse/solver/detail/lanczos.cuh +++ b/cpp/include/raft/sparse/solver/detail/lanczos.cuh @@ -48,8 +48,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -61,9 +61,9 @@ #include #include #include -#include #include +#include #include #include @@ -1501,103 +1501,98 @@ RAFT_KERNEL kernel_clamp_down_vector(T* vec, T threshold, int size) if (idx < size) { vec[idx] = (fabs(vec[idx]) < threshold) ? 0 : vec[idx]; } } - template -RAFT_KERNEL select_smallest_magnitude_kernel( - const ValueTypeT* eigenvalues, - const ValueTypeT* eigenvectors, - ValueTypeT* sm_eigenvalues, - ValueTypeT* sm_eigenvectors, - int ncv, int nEigVecs) +RAFT_KERNEL select_smallest_magnitude_kernel(const ValueTypeT* eigenvalues, + const ValueTypeT* eigenvectors, + ValueTypeT* sm_eigenvalues, + ValueTypeT* sm_eigenvectors, + int ncv, + int nEigVecs) { - // Find index closest to zero - int zero_idx = 0; - ValueTypeT min_abs_val = fabsf(eigenvalues[0]); - - for (int i = 1; i < ncv; i++) { - ValueTypeT abs_val = fabsf(eigenvalues[i]); - if (abs_val < min_abs_val) { - min_abs_val = abs_val; - zero_idx = i; - } + // Find index closest to zero + int zero_idx = 0; + ValueTypeT min_abs_val = fabsf(eigenvalues[0]); + + for (int i = 1; i < ncv; i++) { + ValueTypeT abs_val = fabsf(eigenvalues[i]); + if (abs_val < min_abs_val) { + min_abs_val = abs_val; + zero_idx = i; } - - // Two-pointer approach - int left = zero_idx - 1; - int right = zero_idx; - int dest_idx = 0; - - // Start with the value closest to zero - sm_eigenvalues[dest_idx] = eigenvalues[right]; - for (int i = 0; i < ncv; i++) { + } + + // Two-pointer approach + int left = zero_idx - 1; + int right = zero_idx; + int dest_idx = 0; + + // Start with the value closest to zero + sm_eigenvalues[dest_idx] = eigenvalues[right]; + for (int i = 0; i < ncv; i++) { + sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[right * ncv + i]; + } + right++; + dest_idx++; + + // Expand outward + while (dest_idx < nEigVecs) { + // Handle cases where one or both pointers might be out of bounds + if (left < 0 && right >= ncv) { + // Both pointers out of bounds - we're done + break; + } else if (left < 0) { + // Only right pointer is valid - use it + sm_eigenvalues[dest_idx] = eigenvalues[right]; + for (int i = 0; i < ncv; i++) { sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[right * ncv + i]; - } - right++; - dest_idx++; - - // Expand outward - while (dest_idx < nEigVecs) { - // Handle cases where one or both pointers might be out of bounds - if (left < 0 && right >= ncv) { - // Both pointers out of bounds - we're done - break; - } - else if (left < 0) { - // Only right pointer is valid - use it - sm_eigenvalues[dest_idx] = eigenvalues[right]; - for (int i = 0; i < ncv; i++) { - sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[right * ncv + i]; - } - right++; - } - else if (right >= ncv) { - // Only left pointer is valid - use it - sm_eigenvalues[dest_idx] = eigenvalues[left]; - for (int i = 0; i < ncv; i++) { - sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[left * ncv + i]; - } - left--; + } + right++; + } else if (right >= ncv) { + // Only left pointer is valid - use it + sm_eigenvalues[dest_idx] = eigenvalues[left]; + for (int i = 0; i < ncv; i++) { + sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[left * ncv + i]; + } + left--; + } else { + // Both pointers are valid - compare them + if (fabsf(eigenvalues[left]) < fabsf(eigenvalues[right])) { + // Left value has smaller magnitude + sm_eigenvalues[dest_idx] = eigenvalues[left]; + for (int i = 0; i < ncv; i++) { + sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[left * ncv + i]; } - else { - // Both pointers are valid - compare them - if (fabsf(eigenvalues[left]) < fabsf(eigenvalues[right])) { - // Left value has smaller magnitude - sm_eigenvalues[dest_idx] = eigenvalues[left]; - for (int i = 0; i < ncv; i++) { - sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[left * ncv + i]; - } - left--; - } else { - // Right value has smaller magnitude - sm_eigenvalues[dest_idx] = eigenvalues[right]; - for (int i = 0; i < ncv; i++) { - sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[right * ncv + i]; - } - right++; - } + left--; + } else { + // Right value has smaller magnitude + sm_eigenvalues[dest_idx] = eigenvalues[right]; + for (int i = 0; i < ncv; i++) { + sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[right * ncv + i]; } - dest_idx++; + right++; + } } + dest_idx++; + } } - template -RAFT_KERNEL copy_by_indices_kernel( - const ValueTypeT* eigenvalues, - const ValueTypeT* eigenvectors, - const int* indices, - ValueTypeT* sm_eigenvalues, - ValueTypeT* sm_eigenvectors, - int ncv, int nEigVecs) +RAFT_KERNEL copy_by_indices_kernel(const ValueTypeT* eigenvalues, + const ValueTypeT* eigenvectors, + const int* indices, + ValueTypeT* sm_eigenvalues, + ValueTypeT* sm_eigenvectors, + int ncv, + int nEigVecs) { - for (int i = 0; i < nEigVecs; i++) { - int idx = indices[i]; - sm_eigenvalues[i] = eigenvalues[idx]; - - for (int j = 0; j < ncv; j++) { - sm_eigenvectors[i * ncv + j] = eigenvectors[idx * ncv + j]; - } + for (int i = 0; i < nEigVecs; i++) { + int idx = indices[i]; + sm_eigenvalues[i] = eigenvalues[idx]; + + for (int j = 0; j < ncv; j++) { + sm_eigenvectors[i * ncv + j] = eigenvectors[idx * ncv + j]; } + } } template @@ -1871,250 +1866,136 @@ auto lanczos_smallest( eigenvectors.view(), eigenvalues.view()); - // auto eigenvectors_k = raft::make_device_matrix_view( - // eigenvectors.data_handle(), ncv, nEigVecs); - // auto eigenvalues_k = - // raft::make_device_vector_view(eigenvalues.data_handle(), nEigVecs); - - // auto eigenvectors_k = raft::make_device_matrix_view( - // eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); - // auto eigenvalues_k = - // raft::make_device_vector_view(eigenvalues.data_handle() + (ncv - nEigVecs), nEigVecs); - - - // Allocate memory for the largest magnitude eigenvalues and eigenvectors - // auto lm_eigenvalues = raft::make_device_vector(handle, nEigVecs); - // auto lm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); - - // // Two-pointer approach to find largest magnitude eigenvalues - // int left = 0; // Points to most negative values (start) - // int right = ncv - 1; // Points to most positive values (end) - // int dest_idx = 0; // Index in destination arrays - - // // Continue until we've collected nEigVecs eigenvalues - // while (dest_idx < nEigVecs && left <= right) { - // // Get absolute values at both ends - // ValueTypeT left_val, right_val; - // raft::copy(&left_val, eigenvalues.data_handle() + left, 1, stream); - // raft::copy(&right_val, eigenvalues.data_handle() + right, 1, stream); - - // // Compare absolute magnitudes - // if (std::abs(left_val) > std::abs(right_val)) { - // // Left value has larger magnitude - // raft::copy(lm_eigenvalues.data_handle() + dest_idx, - // eigenvalues.data_handle() + left, - // 1, stream); - // raft::copy(lm_eigenvectors.data_handle() + dest_idx * ncv, - // eigenvectors.data_handle() + left * ncv, - // ncv, stream); - // left++; - // } else { - // // Right value has larger magnitude - // raft::copy(lm_eigenvalues.data_handle() + dest_idx, - // eigenvalues.data_handle() + right, - // 1, stream); - // raft::copy(lm_eigenvectors.data_handle() + dest_idx * ncv, - // eigenvectors.data_handle() + right * ncv, - // ncv, stream); - // right--; - // } - // dest_idx++; - // } - - - // auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); - // auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); - - // // Use a device-side kernel for finding smallest magnitude eigenvalues - // select_smallest_magnitude_kernel<<<1, 1, 0, stream>>>( - // eigenvalues.data_handle(), - // eigenvectors.data_handle(), - // sm_eigenvalues.data_handle(), - // sm_eigenvectors.data_handle(), - // ncv, nEigVecs); - - - - // Now copy the eigenvalues and eigenvectors based on these indices - // copy_by_indices_kernel<<<1, 1, 0, stream>>>( - // eigenvalues.data_handle(), - // eigenvectors.data_handle(), - // selected_indices.data_handle(), - // sm_eigenvalues.data_handle(), - // sm_eigenvectors.data_handle(), - // ncv, nEigVecs); - - - // Replace custom kernel for eigenvalues - // raft::matrix::gather(handle, - // raft::make_device_matrix_view(eigenvalues.data_handle(), 1, ncv), - // raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - // raft::make_device_matrix_view(sm_eigenvalues.data_handle(), 1, nEigVecs)); - - // // For row-major eigenvectors - // raft::matrix::gather(handle, - // raft::make_device_matrix_view( - // eigenvectors.data_handle(), ncv, ncv), - // raft::make_device_vector_view( - // selected_indices.data_handle(), nEigVecs), - // raft::make_device_matrix_view( - // sm_eigenvectors.data_handle(), nEigVecs, ncv)); - - raft::device_matrix_view eigenvectors_k; raft::device_vector_view eigenvalues_k; raft::device_matrix_view eigenvectors_k_slice; - auto indices = raft::make_device_vector(handle, ncv); + auto indices = raft::make_device_vector(handle, ncv); auto selected_indices = raft::make_device_vector(handle, nEigVecs); auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); - auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); - + auto sm_eigenvectors = + raft::make_device_matrix(handle, ncv, nEigVecs); if (which == LANCZOS_WHICH::SA) { - eigenvectors_k = raft::make_device_matrix_view(eigenvectors.data_handle(), ncv, nEigVecs); - eigenvalues_k = raft::make_device_vector_view(eigenvalues.data_handle(), nEigVecs); - eigenvectors_k_slice = raft::make_device_matrix_view(eigenvectors.data_handle(), ncv, nEigVecs); - } - else if (which == LANCZOS_WHICH::LA) { - eigenvectors_k = raft::make_device_matrix_view(eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); - eigenvalues_k = raft::make_device_vector_view(eigenvalues.data_handle() + (ncv - nEigVecs), nEigVecs); - eigenvectors_k_slice = raft::make_device_matrix_view(eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); - } - else if (which == LANCZOS_WHICH::SM) { - // Allocate space for the results - // auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); - // auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); - - // Create an array of indices - // auto indices = raft::make_device_vector(handle, ncv); + eigenvectors_k = raft::make_device_matrix_view( + eigenvectors.data_handle(), ncv, nEigVecs); + eigenvalues_k = + raft::make_device_vector_view(eigenvalues.data_handle(), nEigVecs); + eigenvectors_k_slice = raft::make_device_matrix_view( + eigenvectors.data_handle(), ncv, nEigVecs); + } else if (which == LANCZOS_WHICH::LA) { + eigenvectors_k = raft::make_device_matrix_view( + eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); + eigenvalues_k = raft::make_device_vector_view( + eigenvalues.data_handle() + (ncv - nEigVecs), nEigVecs); + eigenvectors_k_slice = raft::make_device_matrix_view( + eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); + } else if (which == LANCZOS_WHICH::SM) { thrust::sequence(thrust::device, indices.data_handle(), indices.data_handle() + ncv, 0); // Sort indices by absolute eigenvalues (magnitude) using a custom comparator - thrust::sort(thrust::device, - indices.data_handle(), - indices.data_handle() + ncv, - [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { - return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); - }); + thrust::sort(thrust::device, + indices.data_handle(), + indices.data_handle() + ncv, + [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { + return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); + }); // Take the first nEigVecs indices (smallest magnitude) - // auto selected_indices = raft::make_device_vector(handle, nEigVecs); raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); // Re-sort these indices by algebraic value to maintain algebraic ordering - // TODO: return eigenvectors=true - thrust::sort(thrust::device, - selected_indices.data_handle(), - selected_indices.data_handle() + nEigVecs, - [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { - return eigenvalues[a] < eigenvalues[b]; - }); + thrust::sort(thrust::device, + selected_indices.data_handle(), + selected_indices.data_handle() + nEigVecs, + [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { + return eigenvalues[a] < eigenvalues[b]; + }); // Fix for the eigenvalues gather - raft::matrix::gather(handle, + raft::matrix::gather( + handle, // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) raft::make_device_matrix_view( eigenvalues.data_handle(), ncv, 1), // Indices to gather - raft::make_device_vector_view( - selected_indices.data_handle(), nEigVecs), + raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), // Output as a Kx1 matrix (nEigVecs rows, 1 column) raft::make_device_matrix_view( - sm_eigenvalues.data_handle(), nEigVecs, 1) - ); + sm_eigenvalues.data_handle(), nEigVecs, 1)); // If you also need to modify the eigenvectors gather call, use this: - raft::matrix::gather(handle, + raft::matrix::gather( + handle, // Input eigenvectors matrix (ncv rows, ncv columns) raft::make_device_matrix_view( eigenvectors.data_handle(), ncv, ncv), // Indices to gather - raft::make_device_vector_view( - selected_indices.data_handle(), nEigVecs), + raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), // Output eigenvectors matrix (nEigVecs rows, ncv columns) raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), nEigVecs, ncv) - ); + sm_eigenvectors.data_handle(), nEigVecs, ncv)); // Use the collected smallest magnitude values eigenvectors_k = raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), ncv, nEigVecs); - eigenvalues_k = raft::make_device_vector_view( - sm_eigenvalues.data_handle(), nEigVecs); - eigenvectors_k_slice = raft::make_device_matrix_view(sm_eigenvectors.data_handle(), ncv, nEigVecs); - } - else if (which == LANCZOS_WHICH::LM) { - // Allocate space for the results - // auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); - // auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); - - // Create an array of indices - // auto indices = raft::make_device_vector(handle, ncv); + sm_eigenvectors.data_handle(), ncv, nEigVecs); + eigenvalues_k = + raft::make_device_vector_view(sm_eigenvalues.data_handle(), nEigVecs); + eigenvectors_k_slice = raft::make_device_matrix_view( + sm_eigenvectors.data_handle(), ncv, nEigVecs); + } else if (which == LANCZOS_WHICH::LM) { thrust::sequence(thrust::device, indices.data_handle(), indices.data_handle() + ncv, 0); // Sort indices by absolute eigenvalues (magnitude) using a custom comparator - thrust::sort(thrust::device, - indices.data_handle(), - indices.data_handle() + ncv, - [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { - return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); - }); + thrust::sort(thrust::device, + indices.data_handle(), + indices.data_handle() + ncv, + [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { + return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); + }); // Take the last nEigVecs indices (largest magnitude) - raft::copy(selected_indices.data_handle(), - indices.data_handle() + (ncv - nEigVecs), - nEigVecs, stream); + raft::copy( + selected_indices.data_handle(), indices.data_handle() + (ncv - nEigVecs), nEigVecs, stream); // Re-sort these indices by algebraic value to maintain algebraic ordering - // TODO: return eigenvectors=true - thrust::sort(thrust::device, - selected_indices.data_handle(), - selected_indices.data_handle() + nEigVecs, - [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { - return eigenvalues[a] < eigenvalues[b]; - }); + thrust::sort(thrust::device, + selected_indices.data_handle(), + selected_indices.data_handle() + nEigVecs, + [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { + return eigenvalues[a] < eigenvalues[b]; + }); // Fix for the eigenvalues gather - raft::matrix::gather(handle, + raft::matrix::gather( + handle, // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) raft::make_device_matrix_view( eigenvalues.data_handle(), ncv, 1), // Indices to gather - raft::make_device_vector_view( - selected_indices.data_handle(), nEigVecs), + raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), // Output as a Kx1 matrix (nEigVecs rows, 1 column) raft::make_device_matrix_view( - sm_eigenvalues.data_handle(), nEigVecs, 1) - ); + sm_eigenvalues.data_handle(), nEigVecs, 1)); // If you also need to modify the eigenvectors gather call, use this: - raft::matrix::gather(handle, + raft::matrix::gather( + handle, // Input eigenvectors matrix (ncv rows, ncv columns) raft::make_device_matrix_view( eigenvectors.data_handle(), ncv, ncv), // Indices to gather - raft::make_device_vector_view( - selected_indices.data_handle(), nEigVecs), + raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), // Output eigenvectors matrix (nEigVecs rows, ncv columns) raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), nEigVecs, ncv) - ); + sm_eigenvectors.data_handle(), nEigVecs, ncv)); // Use the collected smallest magnitude values eigenvectors_k = raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), ncv, nEigVecs); - eigenvalues_k = raft::make_device_vector_view( - sm_eigenvalues.data_handle(), nEigVecs); - eigenvectors_k_slice = raft::make_device_matrix_view(sm_eigenvectors.data_handle(), ncv, nEigVecs); + sm_eigenvectors.data_handle(), ncv, nEigVecs); + eigenvalues_k = + raft::make_device_vector_view(sm_eigenvalues.data_handle(), nEigVecs); + eigenvectors_k_slice = raft::make_device_matrix_view( + sm_eigenvectors.data_handle(), ncv, nEigVecs); } - // Use the collected largest magnitude values - // auto eigenvectors_k = raft::make_device_matrix_view( - // lm_eigenvectors.data_handle(), ncv, nEigVecs); - // auto eigenvalues_k = raft::make_device_vector_view( - // lm_eigenvalues.data_handle(), nEigVecs); - - - - auto ritz_eigenvectors = raft::make_device_matrix_view(eigVecs_dev, n, nEigVecs); @@ -2125,20 +2006,6 @@ auto lanczos_smallest( auto s = raft::make_device_vector(handle, nEigVecs); - // auto eigenvectors_k_slice = - // raft::make_device_matrix_view( - // eigenvectors.data_handle(), ncv, nEigVecs); - - // auto eigenvectors_k_slice = raft::make_device_matrix_view( - // eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); - - // auto eigenvectors_k_slice = raft::make_device_matrix_view( - // eigenvectors.data_handle(), ncv, nEigVecs); - - // auto eigenvectors_k_slice = raft::make_device_matrix_view( - // sm_eigenvectors.data_handle(), ncv, nEigVecs); - - auto S_matrix = raft::make_device_matrix_view( s.data_handle(), 1, nEigVecs); @@ -2377,223 +2244,94 @@ auto lanczos_smallest( ncv, eigenvectors.view(), eigenvalues.view()); - // auto eigenvectors_k = raft::make_device_matrix_view( - // eigenvectors.data_handle(), ncv, nEigVecs); - - // auto eigenvectors_k = raft::make_device_matrix_view( - // eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); - - - // Allocate memory for the largest magnitude eigenvalues and eigenvectors - // auto lm_eigenvalues = raft::make_device_vector(handle, nEigVecs); - // auto lm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); - - // Two-pointer approach to find largest magnitude eigenvalues - // int left = 0; // Points to most negative values (start) - // int right = ncv - 1; // Points to most positive values (end) - // int dest_idx = 0; // Index in destination arrays - - // // Continue until we've collected nEigVecs eigenvalues - // while (dest_idx < nEigVecs && left <= right) { - // // Get absolute values at both ends - // ValueTypeT left_val, right_val; - // raft::copy(&left_val, eigenvalues.data_handle() + left, 1, stream); - // raft::copy(&right_val, eigenvalues.data_handle() + right, 1, stream); - - // // Compare absolute magnitudes - // if (std::abs(left_val) > std::abs(right_val)) { - // // Left value has larger magnitude - // raft::copy(lm_eigenvalues.data_handle() + dest_idx, - // eigenvalues.data_handle() + left, - // 1, stream); - // raft::copy(lm_eigenvectors.data_handle() + dest_idx * ncv, - // eigenvectors.data_handle() + left * ncv, - // ncv, stream); - // left++; - // } else { - // // Right value has larger magnitude - // raft::copy(lm_eigenvalues.data_handle() + dest_idx, - // eigenvalues.data_handle() + right, - // 1, stream); - // raft::copy(lm_eigenvectors.data_handle() + dest_idx * ncv, - // eigenvectors.data_handle() + right * ncv, - // ncv, stream); - // right--; - // } - // dest_idx++; - // } - - - // auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); - // auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); - - // Use a device-side kernel for finding smallest magnitude eigenvalues - // select_smallest_magnitude_kernel<<<1, 1, 0, stream>>>( - // eigenvalues.data_handle(), - // eigenvectors.data_handle(), - // sm_eigenvalues.data_handle(), - // sm_eigenvectors.data_handle(), - // ncv, nEigVecs); - - - // Allocate space for the results - // auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); - // auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); - - // Create an array of indices - // auto indices = raft::make_device_vector(handle, ncv); - // thrust::sequence(thrust::device, indices.data_handle(), indices.data_handle() + ncv, 0); if (which == LANCZOS_WHICH::SM) { - // Sort indices by absolute eigenvalues (magnitude) using a custom comparator - thrust::sort(thrust::device, - indices.data_handle(), - indices.data_handle() + ncv, - [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { - return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); - }); + // Sort indices by absolute eigenvalues (magnitude) using a custom comparator + thrust::sort(thrust::device, + indices.data_handle(), + indices.data_handle() + ncv, + [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { + return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); + }); // Take the first nEigVecs indices (smallest magnitude) // auto selected_indices = raft::make_device_vector(handle, nEigVecs); raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); // Re-sort these indices by algebraic value to maintain algebraic ordering - thrust::sort(thrust::device, - selected_indices.data_handle(), - selected_indices.data_handle() + nEigVecs, - [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { - return eigenvalues[a] < eigenvalues[b]; - }); - // Now copy the eigenvalues and eigenvectors based on these indices - // copy_by_indices_kernel<<<1, 1, 0, stream>>>( - // eigenvalues.data_handle(), - // eigenvectors.data_handle(), - // selected_indices.data_handle(), - // sm_eigenvalues.data_handle(), - // sm_eigenvectors.data_handle(), - // ncv, nEigVecs); - - // raft::matrix::gather(handle, - // raft::make_device_matrix_view(eigenvalues.data_handle(), 1, ncv), - // raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - // raft::make_device_matrix_view(sm_eigenvalues.data_handle(), 1, nEigVecs)); - - // // For row-major eigenvectors - // raft::matrix::gather(handle, - // raft::make_device_matrix_view( - // eigenvectors.data_handle(), ncv, ncv), - // raft::make_device_vector_view( - // selected_indices.data_handle(), nEigVecs), - // raft::make_device_matrix_view( - // sm_eigenvectors.data_handle(), nEigVecs, ncv)); - - + thrust::sort(thrust::device, + selected_indices.data_handle(), + selected_indices.data_handle() + nEigVecs, + [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { + return eigenvalues[a] < eigenvalues[b]; + }); // Fix for the eigenvalues gather - raft::matrix::gather(handle, + raft::matrix::gather( + handle, // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) raft::make_device_matrix_view( eigenvalues.data_handle(), ncv, 1), // Indices to gather - raft::make_device_vector_view( - selected_indices.data_handle(), nEigVecs), + raft::make_device_vector_view(selected_indices.data_handle(), + nEigVecs), // Output as a Kx1 matrix (nEigVecs rows, 1 column) raft::make_device_matrix_view( - sm_eigenvalues.data_handle(), nEigVecs, 1) - ); + sm_eigenvalues.data_handle(), nEigVecs, 1)); // If you also need to modify the eigenvectors gather call, use this: - raft::matrix::gather(handle, + raft::matrix::gather( + handle, // Input eigenvectors matrix (ncv rows, ncv columns) raft::make_device_matrix_view( eigenvectors.data_handle(), ncv, ncv), // Indices to gather - raft::make_device_vector_view( - selected_indices.data_handle(), nEigVecs), + raft::make_device_vector_view(selected_indices.data_handle(), + nEigVecs), // Output eigenvectors matrix (nEigVecs rows, ncv columns) raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), nEigVecs, ncv) - ); - } - else if (which == LANCZOS_WHICH::LM) { + sm_eigenvectors.data_handle(), nEigVecs, ncv)); + } else if (which == LANCZOS_WHICH::LM) { // Sort indices by absolute eigenvalues (magnitude) using a custom comparator - thrust::sort(thrust::device, - indices.data_handle(), - indices.data_handle() + ncv, - [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { - return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); - }); + thrust::sort(thrust::device, + indices.data_handle(), + indices.data_handle() + ncv, + [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { + return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); + }); // Take the last nEigVecs indices (largest magnitude) - raft::copy(selected_indices.data_handle(), - indices.data_handle() + (ncv - nEigVecs), - nEigVecs, stream); + raft::copy( + selected_indices.data_handle(), indices.data_handle() + (ncv - nEigVecs), nEigVecs, stream); // Re-sort these indices by algebraic value to maintain algebraic ordering - thrust::sort(thrust::device, - selected_indices.data_handle(), - selected_indices.data_handle() + nEigVecs, - [eigenvalues = eigenvalues.data_handle()] __device__ (int a, int b) { - return eigenvalues[a] < eigenvalues[b]; - }); - // Now copy the eigenvalues and eigenvectors based on these indices - // copy_by_indices_kernel<<<1, 1, 0, stream>>>( - // eigenvalues.data_handle(), - // eigenvectors.data_handle(), - // selected_indices.data_handle(), - // sm_eigenvalues.data_handle(), - // sm_eigenvectors.data_handle(), - // ncv, nEigVecs); - - // raft::matrix::gather(handle, - // raft::make_device_matrix_view(eigenvalues.data_handle(), 1, ncv), - // raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - // raft::make_device_matrix_view(sm_eigenvalues.data_handle(), 1, nEigVecs)); - - // // For row-major eigenvectors - // raft::matrix::gather(handle, - // raft::make_device_matrix_view( - // eigenvectors.data_handle(), ncv, ncv), - // raft::make_device_vector_view( - // selected_indices.data_handle(), nEigVecs), - // raft::make_device_matrix_view( - // sm_eigenvectors.data_handle(), nEigVecs, ncv)); - - + thrust::sort(thrust::device, + selected_indices.data_handle(), + selected_indices.data_handle() + nEigVecs, + [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { + return eigenvalues[a] < eigenvalues[b]; + }); // Fix for the eigenvalues gather - raft::matrix::gather(handle, + raft::matrix::gather( + handle, // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) raft::make_device_matrix_view( eigenvalues.data_handle(), ncv, 1), // Indices to gather - raft::make_device_vector_view( - selected_indices.data_handle(), nEigVecs), + raft::make_device_vector_view(selected_indices.data_handle(), + nEigVecs), // Output as a Kx1 matrix (nEigVecs rows, 1 column) raft::make_device_matrix_view( - sm_eigenvalues.data_handle(), nEigVecs, 1) - ); + sm_eigenvalues.data_handle(), nEigVecs, 1)); // If you also need to modify the eigenvectors gather call, use this: - raft::matrix::gather(handle, + raft::matrix::gather( + handle, // Input eigenvectors matrix (ncv rows, ncv columns) raft::make_device_matrix_view( eigenvectors.data_handle(), ncv, ncv), // Indices to gather - raft::make_device_vector_view( - selected_indices.data_handle(), nEigVecs), + raft::make_device_vector_view(selected_indices.data_handle(), + nEigVecs), // Output eigenvectors matrix (nEigVecs rows, ncv columns) raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), nEigVecs, ncv) - ); + sm_eigenvectors.data_handle(), nEigVecs, ncv)); } - - - // Use the collected smallest magnitude values - // auto eigenvectors_k = raft::make_device_matrix_view( - // sm_eigenvectors.data_handle(), ncv, nEigVecs); - // auto eigenvalues_k = raft::make_device_vector_view( - // sm_eigenvalues.data_handle(), nEigVecs); - - // Use the collected largest magnitude values - // auto eigenvectors_k = raft::make_device_matrix_view( - // lm_eigenvectors.data_handle(), ncv, nEigVecs); - // auto eigenvalues_k = raft::make_device_vector_view( - // lm_eigenvalues.data_handle(), nEigVecs); auto ritz_eigenvectors = raft::make_device_matrix_view( eigVecs_dev, n, nEigVecs); @@ -2603,18 +2341,6 @@ auto lanczos_smallest( raft::linalg::gemm( handle, V_T, eigenvectors_k, ritz_eigenvectors); - // auto eigenvectors_k_slice = - // raft::make_device_matrix_view( - // eigenvectors.data_handle(), ncv, nEigVecs); - - // auto eigenvectors_k_slice = raft::make_device_matrix_view( - // eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); - - // auto eigenvectors_k_slice = raft::make_device_matrix_view( - // sm_eigenvectors.data_handle(), ncv, nEigVecs); - - - auto S_matrix = raft::make_device_matrix_view( s.data_handle(), 1, nEigVecs); From b227f83e67c904fe664f615ba27c626be34f3658 Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 8 Apr 2025 19:20:00 +0000 Subject: [PATCH 04/35] pre-commit --- .../raft/sparse/solver/lanczos_types.hpp | 2 +- cpp/include/raft/spectral/eigen_solvers.cuh | 9 ++++-- cpp/tests/linalg/eigen_solvers.cu | 10 ++++-- cpp/tests/sparse/solver/lanczos.cu | 32 +++++++++++-------- .../pylibraft/sparse/linalg/lanczos.pyx | 6 ++++ 5 files changed, 41 insertions(+), 18 deletions(-) diff --git a/cpp/include/raft/sparse/solver/lanczos_types.hpp b/cpp/include/raft/sparse/solver/lanczos_types.hpp index d0f22c0094..09b9d71111 100644 --- a/cpp/include/raft/sparse/solver/lanczos_types.hpp +++ b/cpp/include/raft/sparse/solver/lanczos_types.hpp @@ -20,7 +20,7 @@ namespace raft::sparse::solver { -enum LANCZOS_WHICH {LA, LM, SA, SM}; +enum LANCZOS_WHICH { LA, LM, SA, SM }; template struct lanczos_solver_config { diff --git a/cpp/include/raft/spectral/eigen_solvers.cuh b/cpp/include/raft/spectral/eigen_solvers.cuh index d1cc5e2efe..f3e42e19d4 100644 --- a/cpp/include/raft/spectral/eigen_solvers.cuh +++ b/cpp/include/raft/spectral/eigen_solvers.cuh @@ -81,8 +81,13 @@ struct lanczos_solver_t { RAFT_EXPECTS(eigVals != nullptr, "Null eigVals buffer."); RAFT_EXPECTS(eigVecs != nullptr, "Null eigVecs buffer."); - auto lanczos_config = raft::sparse::solver::lanczos_solver_config{ - config_.n_eigVecs, config_.maxIter, config_.restartIter, config_.tol, config_.which, config_.seed}; + auto lanczos_config = + raft::sparse::solver::lanczos_solver_config{config_.n_eigVecs, + config_.maxIter, + config_.restartIter, + config_.tol, + config_.which, + config_.seed}; auto v0_opt = std::optional>{ std::nullopt}; auto input_structure = input.structure_view(); diff --git a/cpp/tests/linalg/eigen_solvers.cu b/cpp/tests/linalg/eigen_solvers.cu index a195b91226..da41d24deb 100644 --- a/cpp/tests/linalg/eigen_solvers.cu +++ b/cpp/tests/linalg/eigen_solvers.cu @@ -176,8 +176,14 @@ TEST(Raft, SpectralPartition) num_verts, num_edges}; - auto eig_cfg = raft::spectral::eigen_solver_config_t{ - n_eig_vects, evs_max_iter, restartIter_lanczos, evs_tolerance, raft::sparse::solver::LANCZOS_WHICH::SA, false, seed_eig_solver}; + auto eig_cfg = + raft::spectral::eigen_solver_config_t{n_eig_vects, + evs_max_iter, + restartIter_lanczos, + evs_tolerance, + raft::sparse::solver::LANCZOS_WHICH::SA, + false, + seed_eig_solver}; auto eigen_solver = raft::spectral::lanczos_solver_t{eig_cfg}; auto clust_cfg = raft::spectral::cluster_solver_config_t{ diff --git a/cpp/tests/sparse/solver/lanczos.cu b/cpp/tests/sparse/solver/lanczos.cu index cf736c7fa2..67c43b3d44 100644 --- a/cpp/tests/sparse/solver/lanczos.cu +++ b/cpp/tests/sparse/solver/lanczos.cu @@ -444,19 +444,25 @@ const std::vector> inputsd = { {-2.0369630, -1.7673520}}}; const std::vector> rmat_inputsf = { - {50, 100, 10000, 0, 0, 1e-9, raft::sparse::solver::LANCZOS_WHICH::SA, 42, 12, 12, 1, {-122.526794, -74.00686, -59.698284, -54.68617, - -49.686813, -34.02644, -32.130703, -31.26906, - -30.32097, -22.946098, -20.497862, -20.23817, - -19.269697, -18.42496, -17.675667, -17.013401, - -16.734581, -15.820215, -15.73925, -15.448187, - -15.044634, -14.692028, -14.127425, -13.967386, - -13.6237755, -13.469393, -13.181225, -12.777589, - -12.623185, -12.55508, -12.2874565, -12.053391, - -11.677346, -11.558279, -11.163732, -10.922034, - -10.7936945, -10.558049, -10.205776, -10.005316, - -9.559181, -9.491834, -9.242631, -8.883637, - -8.765364, -8.688508, -8.458255, -8.385196, - -8.217982, -8.0442095}}}; + {50, + 100, + 10000, + 0, + 0, + 1e-9, + raft::sparse::solver::LANCZOS_WHICH::SA, + 42, + 12, + 12, + 1, + {-122.526794, -74.00686, -59.698284, -54.68617, -49.686813, -34.02644, -32.130703, + -31.26906, -30.32097, -22.946098, -20.497862, -20.23817, -19.269697, -18.42496, + -17.675667, -17.013401, -16.734581, -15.820215, -15.73925, -15.448187, -15.044634, + -14.692028, -14.127425, -13.967386, -13.6237755, -13.469393, -13.181225, -12.777589, + -12.623185, -12.55508, -12.2874565, -12.053391, -11.677346, -11.558279, -11.163732, + -10.922034, -10.7936945, -10.558049, -10.205776, -10.005316, -9.559181, -9.491834, + -9.242631, -8.883637, -8.765364, -8.688508, -8.458255, -8.385196, -8.217982, + -8.0442095}}}; using LanczosTestF = lanczos_tests; TEST_P(LanczosTestF, Result) { Run(); } diff --git a/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx b/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx index f67dfcb44d..23d89ac068 100644 --- a/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx +++ b/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx @@ -62,6 +62,7 @@ cdef extern from "raft/sparse/solver/lanczos_types.hpp" \ cdef lanczos_solver_config[float] config_float cdef lanczos_solver_config[double] config_double + cdef extern from "raft_runtime/solver/lanczos.hpp" \ namespace "raft::runtime::solver" nogil: @@ -122,6 +123,11 @@ def eigsh(A, k=6, which="SA", v0=None, ncv=None, maxiter=None, :class:`cupyx.scipy.sparse._csr.csr_matrix` k (int): The number of eigenvalues and eigenvectors to compute. Must be ``1 <= k < n``. + which (str): 'LM' or 'LA' or 'SA'. + 'LM': finds ``k`` largest (in magnitude) eigenvalues. + 'LA': finds ``k`` largest (algebraic) eigenvalues. + 'SA': finds ``k`` smallest (algebraic) eigenvalues. + 'SM': finds ``k`` smallest (in magnitude) eigenvalues. v0 (ndarray): Starting vector for iteration. If ``None``, a random unit vector is used. ncv (int): The number of Lanczos vectors generated. Must be From 0077dd0c0e5912a67e4e43b84ab96576114ad705 Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 8 Apr 2025 19:22:50 +0000 Subject: [PATCH 05/35] pre-commit --- .../raft/sparse/solver/detail/lanczos.cuh | 94 ------------------- 1 file changed, 94 deletions(-) diff --git a/cpp/include/raft/sparse/solver/detail/lanczos.cuh b/cpp/include/raft/sparse/solver/detail/lanczos.cuh index 5afa0c69c9..91a821a349 100644 --- a/cpp/include/raft/sparse/solver/detail/lanczos.cuh +++ b/cpp/include/raft/sparse/solver/detail/lanczos.cuh @@ -1501,100 +1501,6 @@ RAFT_KERNEL kernel_clamp_down_vector(T* vec, T threshold, int size) if (idx < size) { vec[idx] = (fabs(vec[idx]) < threshold) ? 0 : vec[idx]; } } -template -RAFT_KERNEL select_smallest_magnitude_kernel(const ValueTypeT* eigenvalues, - const ValueTypeT* eigenvectors, - ValueTypeT* sm_eigenvalues, - ValueTypeT* sm_eigenvectors, - int ncv, - int nEigVecs) -{ - // Find index closest to zero - int zero_idx = 0; - ValueTypeT min_abs_val = fabsf(eigenvalues[0]); - - for (int i = 1; i < ncv; i++) { - ValueTypeT abs_val = fabsf(eigenvalues[i]); - if (abs_val < min_abs_val) { - min_abs_val = abs_val; - zero_idx = i; - } - } - - // Two-pointer approach - int left = zero_idx - 1; - int right = zero_idx; - int dest_idx = 0; - - // Start with the value closest to zero - sm_eigenvalues[dest_idx] = eigenvalues[right]; - for (int i = 0; i < ncv; i++) { - sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[right * ncv + i]; - } - right++; - dest_idx++; - - // Expand outward - while (dest_idx < nEigVecs) { - // Handle cases where one or both pointers might be out of bounds - if (left < 0 && right >= ncv) { - // Both pointers out of bounds - we're done - break; - } else if (left < 0) { - // Only right pointer is valid - use it - sm_eigenvalues[dest_idx] = eigenvalues[right]; - for (int i = 0; i < ncv; i++) { - sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[right * ncv + i]; - } - right++; - } else if (right >= ncv) { - // Only left pointer is valid - use it - sm_eigenvalues[dest_idx] = eigenvalues[left]; - for (int i = 0; i < ncv; i++) { - sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[left * ncv + i]; - } - left--; - } else { - // Both pointers are valid - compare them - if (fabsf(eigenvalues[left]) < fabsf(eigenvalues[right])) { - // Left value has smaller magnitude - sm_eigenvalues[dest_idx] = eigenvalues[left]; - for (int i = 0; i < ncv; i++) { - sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[left * ncv + i]; - } - left--; - } else { - // Right value has smaller magnitude - sm_eigenvalues[dest_idx] = eigenvalues[right]; - for (int i = 0; i < ncv; i++) { - sm_eigenvectors[dest_idx * ncv + i] = eigenvectors[right * ncv + i]; - } - right++; - } - } - dest_idx++; - } -} - -template -RAFT_KERNEL copy_by_indices_kernel(const ValueTypeT* eigenvalues, - const ValueTypeT* eigenvectors, - const int* indices, - ValueTypeT* sm_eigenvalues, - ValueTypeT* sm_eigenvectors, - int ncv, - int nEigVecs) -{ - for (int i = 0; i < nEigVecs; i++) { - int idx = indices[i]; - sm_eigenvalues[i] = eigenvalues[idx]; - - for (int j = 0; j < ncv; j++) { - sm_eigenvectors[i * ncv + j] = eigenvectors[idx * ncv + j]; - } - } -} - template void lanczos_solve_ritz( raft::resources const& handle, From 6022c6bd46591aebe88b9d81a4435ff4e1e40667 Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 8 Apr 2025 21:31:50 +0000 Subject: [PATCH 06/35] remove comments --- .../raft/sparse/solver/detail/lanczos.cuh | 41 +++---------------- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/cpp/include/raft/sparse/solver/detail/lanczos.cuh b/cpp/include/raft/sparse/solver/detail/lanczos.cuh index 91a821a349..f9409b1a17 100644 --- a/cpp/include/raft/sparse/solver/detail/lanczos.cuh +++ b/cpp/include/raft/sparse/solver/detail/lanczos.cuh @@ -1818,30 +1818,21 @@ auto lanczos_smallest( [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { return eigenvalues[a] < eigenvalues[b]; }); - // Fix for the eigenvalues gather raft::matrix::gather( handle, - // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) raft::make_device_matrix_view( eigenvalues.data_handle(), ncv, 1), - // Indices to gather raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - // Output as a Kx1 matrix (nEigVecs rows, 1 column) raft::make_device_matrix_view( sm_eigenvalues.data_handle(), nEigVecs, 1)); - // If you also need to modify the eigenvectors gather call, use this: raft::matrix::gather( handle, - // Input eigenvectors matrix (ncv rows, ncv columns) raft::make_device_matrix_view( eigenvectors.data_handle(), ncv, ncv), - // Indices to gather raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - // Output eigenvectors matrix (nEigVecs rows, ncv columns) raft::make_device_matrix_view( sm_eigenvectors.data_handle(), nEigVecs, ncv)); - // Use the collected smallest magnitude values eigenvectors_k = raft::make_device_matrix_view( sm_eigenvectors.data_handle(), ncv, nEigVecs); eigenvalues_k = @@ -1870,30 +1861,23 @@ auto lanczos_smallest( [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { return eigenvalues[a] < eigenvalues[b]; }); - // Fix for the eigenvalues gather + raft::matrix::gather( handle, - // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) raft::make_device_matrix_view( eigenvalues.data_handle(), ncv, 1), - // Indices to gather raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - // Output as a Kx1 matrix (nEigVecs rows, 1 column) raft::make_device_matrix_view( sm_eigenvalues.data_handle(), nEigVecs, 1)); - // If you also need to modify the eigenvectors gather call, use this: + raft::matrix::gather( handle, - // Input eigenvectors matrix (ncv rows, ncv columns) raft::make_device_matrix_view( eigenvectors.data_handle(), ncv, ncv), - // Indices to gather raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - // Output eigenvectors matrix (nEigVecs rows, ncv columns) raft::make_device_matrix_view( sm_eigenvectors.data_handle(), nEigVecs, ncv)); - // Use the collected smallest magnitude values eigenvectors_k = raft::make_device_matrix_view( sm_eigenvectors.data_handle(), ncv, nEigVecs); eigenvalues_k = @@ -2160,7 +2144,6 @@ auto lanczos_smallest( return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); }); // Take the first nEigVecs indices (smallest magnitude) - // auto selected_indices = raft::make_device_vector(handle, nEigVecs); raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); // Re-sort these indices by algebraic value to maintain algebraic ordering @@ -2170,28 +2153,22 @@ auto lanczos_smallest( [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { return eigenvalues[a] < eigenvalues[b]; }); - // Fix for the eigenvalues gather + raft::matrix::gather( handle, - // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) raft::make_device_matrix_view( eigenvalues.data_handle(), ncv, 1), - // Indices to gather raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - // Output as a Kx1 matrix (nEigVecs rows, 1 column) raft::make_device_matrix_view( sm_eigenvalues.data_handle(), nEigVecs, 1)); - // If you also need to modify the eigenvectors gather call, use this: + raft::matrix::gather( handle, - // Input eigenvectors matrix (ncv rows, ncv columns) raft::make_device_matrix_view( eigenvectors.data_handle(), ncv, ncv), - // Indices to gather raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - // Output eigenvectors matrix (nEigVecs rows, ncv columns) raft::make_device_matrix_view( sm_eigenvectors.data_handle(), nEigVecs, ncv)); } else if (which == LANCZOS_WHICH::LM) { @@ -2213,28 +2190,22 @@ auto lanczos_smallest( [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { return eigenvalues[a] < eigenvalues[b]; }); - // Fix for the eigenvalues gather + raft::matrix::gather( handle, - // Input eigenvalues as an Nx1 matrix (ncv rows, 1 column) raft::make_device_matrix_view( eigenvalues.data_handle(), ncv, 1), - // Indices to gather raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - // Output as a Kx1 matrix (nEigVecs rows, 1 column) raft::make_device_matrix_view( sm_eigenvalues.data_handle(), nEigVecs, 1)); - // If you also need to modify the eigenvectors gather call, use this: + raft::matrix::gather( handle, - // Input eigenvectors matrix (ncv rows, ncv columns) raft::make_device_matrix_view( eigenvectors.data_handle(), ncv, ncv), - // Indices to gather raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - // Output eigenvectors matrix (nEigVecs rows, ncv columns) raft::make_device_matrix_view( sm_eigenvectors.data_handle(), nEigVecs, ncv)); } From eda2b995d7eec7186a5cb5bccd94977758d6f004 Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 8 Apr 2025 22:49:14 +0000 Subject: [PATCH 07/35] set default argument for eigen_solver_config_t --- cpp/include/raft/spectral/eigen_solvers.cuh | 4 ++-- cpp/tests/linalg/eigen_solvers.cu | 14 ++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/cpp/include/raft/spectral/eigen_solvers.cuh b/cpp/include/raft/spectral/eigen_solvers.cuh index f3e42e19d4..f591d1ac39 100644 --- a/cpp/include/raft/spectral/eigen_solvers.cuh +++ b/cpp/include/raft/spectral/eigen_solvers.cuh @@ -35,13 +35,13 @@ struct eigen_solver_config_t { size_type_t restartIter; value_type_t tol; - raft::sparse::solver::LANCZOS_WHICH which; - bool reorthogonalize{false}; unsigned long long seed{ 1234567}; // CAVEAT: this default value is now common to all instances of using seed in // Lanczos; was not the case before: there were places where a default seed = 123456 // was used; this may trigger slightly different # solver iterations + + raft::sparse::solver::LANCZOS_WHICH which{raft::sparse::solver::LANCZOS_WHICH::SA}; }; template diff --git a/cpp/tests/linalg/eigen_solvers.cu b/cpp/tests/linalg/eigen_solvers.cu index da41d24deb..f43081690c 100644 --- a/cpp/tests/linalg/eigen_solvers.cu +++ b/cpp/tests/linalg/eigen_solvers.cu @@ -67,7 +67,7 @@ TEST(Raft, EigenSolvers) std::uint64_t seed{100110021003}; eigen_solver_config_t cfg{ - neigvs, maxiter, restart_iter, tol, raft::sparse::solver::LANCZOS_WHICH::SA, reorthog, seed}; + neigvs, maxiter, restart_iter, tol, reorthog, seed}; lanczos_solver_t eig_solver{cfg}; @@ -104,7 +104,7 @@ TEST(Raft, SpectralSolvers) unsigned long long seed{100110021003}; eigen_solver_config_t eig_cfg{ - neigvs, maxiter, restart_iter, tol, raft::sparse::solver::LANCZOS_WHICH::SA, reorthog, seed}; + neigvs, maxiter, restart_iter, tol, reorthog, seed}; lanczos_solver_t eig_solver{eig_cfg}; index_type k{5}; @@ -176,14 +176,8 @@ TEST(Raft, SpectralPartition) num_verts, num_edges}; - auto eig_cfg = - raft::spectral::eigen_solver_config_t{n_eig_vects, - evs_max_iter, - restartIter_lanczos, - evs_tolerance, - raft::sparse::solver::LANCZOS_WHICH::SA, - false, - seed_eig_solver}; + auto eig_cfg = raft::spectral::eigen_solver_config_t{ + n_eig_vects, evs_max_iter, restartIter_lanczos, evs_tolerance, false, seed_eig_solver}; auto eigen_solver = raft::spectral::lanczos_solver_t{eig_cfg}; auto clust_cfg = raft::spectral::cluster_solver_config_t{ From c4d543ec1fef4c0b3931bfef55ffa50befcd829b Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 8 Apr 2025 23:49:50 +0000 Subject: [PATCH 08/35] refactor --- .../raft/sparse/solver/detail/lanczos.cuh | 107 ++++-------------- 1 file changed, 20 insertions(+), 87 deletions(-) diff --git a/cpp/include/raft/sparse/solver/detail/lanczos.cuh b/cpp/include/raft/sparse/solver/detail/lanczos.cuh index f9409b1a17..e878f0edf8 100644 --- a/cpp/include/raft/sparse/solver/detail/lanczos.cuh +++ b/cpp/include/raft/sparse/solver/detail/lanczos.cuh @@ -1797,7 +1797,7 @@ auto lanczos_smallest( eigenvalues.data_handle() + (ncv - nEigVecs), nEigVecs); eigenvectors_k_slice = raft::make_device_matrix_view( eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); - } else if (which == LANCZOS_WHICH::SM) { + } else if (which == LANCZOS_WHICH::SM || which == LANCZOS_WHICH::LM) { thrust::sequence(thrust::device, indices.data_handle(), indices.data_handle() + ncv, 0); // Sort indices by absolute eigenvalues (magnitude) using a custom comparator @@ -1808,51 +1808,14 @@ auto lanczos_smallest( return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); }); - // Take the first nEigVecs indices (smallest magnitude) - raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); - - // Re-sort these indices by algebraic value to maintain algebraic ordering - thrust::sort(thrust::device, - selected_indices.data_handle(), - selected_indices.data_handle() + nEigVecs, - [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { - return eigenvalues[a] < eigenvalues[b]; - }); - raft::matrix::gather( - handle, - raft::make_device_matrix_view( - eigenvalues.data_handle(), ncv, 1), - raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - raft::make_device_matrix_view( - sm_eigenvalues.data_handle(), nEigVecs, 1)); - raft::matrix::gather( - handle, - raft::make_device_matrix_view( - eigenvectors.data_handle(), ncv, ncv), - raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), nEigVecs, ncv)); - - eigenvectors_k = raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), ncv, nEigVecs); - eigenvalues_k = - raft::make_device_vector_view(sm_eigenvalues.data_handle(), nEigVecs); - eigenvectors_k_slice = raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), ncv, nEigVecs); - } else if (which == LANCZOS_WHICH::LM) { - thrust::sequence(thrust::device, indices.data_handle(), indices.data_handle() + ncv, 0); - - // Sort indices by absolute eigenvalues (magnitude) using a custom comparator - thrust::sort(thrust::device, - indices.data_handle(), - indices.data_handle() + ncv, - [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { - return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); - }); - - // Take the last nEigVecs indices (largest magnitude) - raft::copy( - selected_indices.data_handle(), indices.data_handle() + (ncv - nEigVecs), nEigVecs, stream); + if (which == LANCZOS_WHICH::SM) { + // Take the first nEigVecs indices (smallest magnitude) + raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); + } else if (which == LANCZOS_WHICH::LM) { + // Take the last nEigVecs indices (largest magnitude) + raft::copy( + selected_indices.data_handle(), indices.data_handle() + (ncv - nEigVecs), nEigVecs, stream); + } // Re-sort these indices by algebraic value to maintain algebraic ordering thrust::sort(thrust::device, @@ -1861,7 +1824,6 @@ auto lanczos_smallest( [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { return eigenvalues[a] < eigenvalues[b]; }); - raft::matrix::gather( handle, raft::make_device_matrix_view( @@ -1869,7 +1831,6 @@ auto lanczos_smallest( raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), raft::make_device_matrix_view( sm_eigenvalues.data_handle(), nEigVecs, 1)); - raft::matrix::gather( handle, raft::make_device_matrix_view( @@ -2135,7 +2096,7 @@ auto lanczos_smallest( eigenvectors.view(), eigenvalues.view()); - if (which == LANCZOS_WHICH::SM) { + if (which == LANCZOS_WHICH::SM || which == LANCZOS_WHICH::LM) { // Sort indices by absolute eigenvalues (magnitude) using a custom comparator thrust::sort(thrust::device, indices.data_handle(), @@ -2143,45 +2104,17 @@ auto lanczos_smallest( [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); }); - // Take the first nEigVecs indices (smallest magnitude) - raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); - - // Re-sort these indices by algebraic value to maintain algebraic ordering - thrust::sort(thrust::device, - selected_indices.data_handle(), - selected_indices.data_handle() + nEigVecs, - [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { - return eigenvalues[a] < eigenvalues[b]; - }); - - raft::matrix::gather( - handle, - raft::make_device_matrix_view( - eigenvalues.data_handle(), ncv, 1), - raft::make_device_vector_view(selected_indices.data_handle(), - nEigVecs), - raft::make_device_matrix_view( - sm_eigenvalues.data_handle(), nEigVecs, 1)); - raft::matrix::gather( - handle, - raft::make_device_matrix_view( - eigenvectors.data_handle(), ncv, ncv), - raft::make_device_vector_view(selected_indices.data_handle(), - nEigVecs), - raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), nEigVecs, ncv)); - } else if (which == LANCZOS_WHICH::LM) { - // Sort indices by absolute eigenvalues (magnitude) using a custom comparator - thrust::sort(thrust::device, - indices.data_handle(), - indices.data_handle() + ncv, - [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { - return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); - }); - // Take the last nEigVecs indices (largest magnitude) - raft::copy( - selected_indices.data_handle(), indices.data_handle() + (ncv - nEigVecs), nEigVecs, stream); + if (which == LANCZOS_WHICH::SM) { + // Take the first nEigVecs indices (smallest magnitude) + raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); + } else if (which == LANCZOS_WHICH::LM) { + // Take the last nEigVecs indices (largest magnitude) + raft::copy(selected_indices.data_handle(), + indices.data_handle() + (ncv - nEigVecs), + nEigVecs, + stream); + } // Re-sort these indices by algebraic value to maintain algebraic ordering thrust::sort(thrust::device, From 8caa1bf843036170369d3c938d27bf3895049037 Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 29 Apr 2025 21:50:03 +0000 Subject: [PATCH 09/35] resolving pr comments --- cpp/include/raft/sparse/solver/lanczos_types.hpp | 4 ++++ python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/include/raft/sparse/solver/lanczos_types.hpp b/cpp/include/raft/sparse/solver/lanczos_types.hpp index 09b9d71111..4fcc147e63 100644 --- a/cpp/include/raft/sparse/solver/lanczos_types.hpp +++ b/cpp/include/raft/sparse/solver/lanczos_types.hpp @@ -20,6 +20,10 @@ namespace raft::sparse::solver { +// LA: Largest (algebraic) eigenvalues +// LM: Largest (in magnitude) eigenvalues +// SA: Smallest (algebraic) eigenvalues +// SM: Smallest (in magnitude) eigenvalues enum LANCZOS_WHICH { LA, LM, SA, SM }; template diff --git a/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx b/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx index 23d89ac068..714cfd4412 100644 --- a/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx +++ b/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx @@ -108,7 +108,7 @@ cdef extern from "raft_runtime/solver/lanczos.hpp" \ @auto_sync_handle -def eigsh(A, k=6, which="SA", v0=None, ncv=None, maxiter=None, +def eigsh(A, k=6, which="LM", v0=None, ncv=None, maxiter=None, tol=0, seed=None, handle=None): """ Find ``k`` eigenvalues and eigenvectors of the real symmetric square From 38ae70297476bda6f343f40c0f14c30e7c6a2eef Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 30 Apr 2025 00:32:30 +0000 Subject: [PATCH 10/35] resolving pr comments --- .../pylibraft/sparse/linalg/lanczos.pyx | 46 ++++++------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx b/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx index 714cfd4412..483ebaa227 100644 --- a/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx +++ b/python/pylibraft/pylibraft/sparse/linalg/lanczos.pyx @@ -199,6 +199,16 @@ def eigsh(A, k=6, which="LM", v0=None, ncv=None, maxiter=None, handle = handle if handle is not None else Handle() cdef device_resources *h = handle.getHandle() + def set_config_which(which): + if which.lower() == "sa": + return LANCZOS_WHICH.SA + elif which.lower() == "sm": + return LANCZOS_WHICH.SM + elif which.lower() == "la": + return LANCZOS_WHICH.LA + elif which.lower() == "lm": + return LANCZOS_WHICH.LM + if IndexType == np.int32 and ValueType == np.float32: config_float.n_components = k config_float.max_iterations = maxiter @@ -206,14 +216,7 @@ def eigsh(A, k=6, which="LM", v0=None, ncv=None, maxiter=None, config_float.tolerance = tol config_float.seed = seed - if which.lower() == "sa": - config_float.which = LANCZOS_WHICH.SA - elif which.lower() == "sm": - config_float.which = LANCZOS_WHICH.SM - elif which.lower() == "la": - config_float.which = LANCZOS_WHICH.LA - elif which.lower() == "lm": - config_float.which = LANCZOS_WHICH.LM + config_float.which = set_config_which(which) if v0 is not None: v0 = cai_wrapper(v0) v0_ptr = v0.data @@ -236,14 +239,7 @@ def eigsh(A, k=6, which="LM", v0=None, ncv=None, maxiter=None, config_float.tolerance = tol config_float.seed = seed - if which.lower() == "sa": - config_float.which = LANCZOS_WHICH.SA - elif which.lower() == "sm": - config_float.which = LANCZOS_WHICH.SM - elif which.lower() == "la": - config_float.which = LANCZOS_WHICH.LA - elif which.lower() == "lm": - config_float.which = LANCZOS_WHICH.LM + config_float.which = set_config_which(which) if v0 is not None: v0 = cai_wrapper(v0) v0_ptr = v0.data @@ -266,14 +262,7 @@ def eigsh(A, k=6, which="LM", v0=None, ncv=None, maxiter=None, config_double.tolerance = tol config_double.seed = seed - if which.lower() == "sa": - config_double.which = LANCZOS_WHICH.SA - elif which.lower() == "sm": - config_double.which = LANCZOS_WHICH.SM - elif which.lower() == "la": - config_double.which = LANCZOS_WHICH.LA - elif which.lower() == "lm": - config_double.which = LANCZOS_WHICH.LM + config_double.which = set_config_which(which) if v0 is not None: v0 = cai_wrapper(v0) v0_ptr = v0.data @@ -296,14 +285,7 @@ def eigsh(A, k=6, which="LM", v0=None, ncv=None, maxiter=None, config_double.tolerance = tol config_double.seed = seed - if which.lower() == "sa": - config_double.which = LANCZOS_WHICH.SA - elif which.lower() == "sm": - config_double.which = LANCZOS_WHICH.SM - elif which.lower() == "la": - config_double.which = LANCZOS_WHICH.LA - elif which.lower() == "lm": - config_double.which = LANCZOS_WHICH.LM + config_double.which = set_config_which(which) if v0 is not None: v0 = cai_wrapper(v0) v0_ptr = v0.data From 1da9a5932d7e6c705700821da3ac41af6ceb5833 Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 30 Apr 2025 10:01:00 +0000 Subject: [PATCH 11/35] refactor which argument in lanczos_solve_ritz --- .../raft/sparse/solver/detail/lanczos.cuh | 223 ++++++++---------- 1 file changed, 97 insertions(+), 126 deletions(-) diff --git a/cpp/include/raft/sparse/solver/detail/lanczos.cuh b/cpp/include/raft/sparse/solver/detail/lanczos.cuh index e878f0edf8..ec41e772fc 100644 --- a/cpp/include/raft/sparse/solver/detail/lanczos.cuh +++ b/cpp/include/raft/sparse/solver/detail/lanczos.cuh @@ -1508,10 +1508,15 @@ void lanczos_solve_ritz( raft::device_matrix_view beta, std::optional> beta_k, IndexTypeT k, - int which, + LANCZOS_WHICH which, int ncv, raft::device_matrix_view eigenvectors, - raft::device_vector_view eigenvalues) + raft::device_vector_view eigenvalues, + raft::device_matrix_view& eigenvectors_k, + raft::device_vector_view& eigenvalues_k, + raft::device_matrix_view& eigenvectors_k_slice, + raft::device_vector_view sm_eigenvalues, + raft::device_matrix_view sm_eigenvectors) { auto stream = resource::get_cuda_stream(handle); @@ -1544,6 +1549,75 @@ void lanczos_solve_ritz( triangular_matrix.data_handle(), ncv, ncv); raft::linalg::eig_dc(handle, triangular_matrix_view, eigenvectors, eigenvalues); + + IndexTypeT nEigVecs = k; + + auto indices = raft::make_device_vector(handle, ncv); + auto selected_indices = raft::make_device_vector(handle, nEigVecs); + + if (which == LANCZOS_WHICH::SA) { + eigenvectors_k = raft::make_device_matrix_view( + eigenvectors.data_handle(), ncv, nEigVecs); + eigenvalues_k = + raft::make_device_vector_view(eigenvalues.data_handle(), nEigVecs); + eigenvectors_k_slice = raft::make_device_matrix_view( + eigenvectors.data_handle(), ncv, nEigVecs); + } else if (which == LANCZOS_WHICH::LA) { + eigenvectors_k = raft::make_device_matrix_view( + eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); + eigenvalues_k = raft::make_device_vector_view( + eigenvalues.data_handle() + (ncv - nEigVecs), nEigVecs); + eigenvectors_k_slice = raft::make_device_matrix_view( + eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); + } else if (which == LANCZOS_WHICH::SM || which == LANCZOS_WHICH::LM) { + thrust::sequence(thrust::device, indices.data_handle(), indices.data_handle() + ncv, 0); + + // Sort indices by absolute eigenvalues (magnitude) using a custom comparator + thrust::sort(thrust::device, + indices.data_handle(), + indices.data_handle() + ncv, + [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { + return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); + }); + + if (which == LANCZOS_WHICH::SM) { + // Take the first nEigVecs indices (smallest magnitude) + raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); + } else if (which == LANCZOS_WHICH::LM) { + // Take the last nEigVecs indices (largest magnitude) + raft::copy( + selected_indices.data_handle(), indices.data_handle() + (ncv - nEigVecs), nEigVecs, stream); + } + + // Re-sort these indices by algebraic value to maintain algebraic ordering + thrust::sort(thrust::device, + selected_indices.data_handle(), + selected_indices.data_handle() + nEigVecs, + [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { + return eigenvalues[a] < eigenvalues[b]; + }); + raft::matrix::gather( + handle, + raft::make_device_matrix_view( + eigenvalues.data_handle(), ncv, 1), + raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), + raft::make_device_matrix_view( + sm_eigenvalues.data_handle(), nEigVecs, 1)); + raft::matrix::gather( + handle, + raft::make_device_matrix_view( + eigenvectors.data_handle(), ncv, ncv), + raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), + raft::make_device_matrix_view( + sm_eigenvectors.data_handle(), nEigVecs, ncv)); + + eigenvectors_k = raft::make_device_matrix_view( + sm_eigenvectors.data_handle(), ncv, nEigVecs); + eigenvalues_k = + raft::make_device_vector_view(sm_eigenvalues.data_handle(), nEigVecs); + eigenvectors_k_slice = raft::make_device_matrix_view( + sm_eigenvectors.data_handle(), ncv, nEigVecs); + } } template @@ -1762,90 +1836,29 @@ auto lanczos_smallest( raft::make_device_matrix(handle, ncv, ncv); auto eigenvalues = raft::make_device_vector(handle, ncv); - lanczos_solve_ritz(handle, - alpha.view(), - beta.view(), - std::nullopt, - nEigVecs, - 0, - ncv, - eigenvectors.view(), - eigenvalues.view()); raft::device_matrix_view eigenvectors_k; raft::device_vector_view eigenvalues_k; raft::device_matrix_view eigenvectors_k_slice; - auto indices = raft::make_device_vector(handle, ncv); - auto selected_indices = raft::make_device_vector(handle, nEigVecs); - auto sm_eigenvalues = raft::make_device_vector(handle, nEigVecs); auto sm_eigenvectors = raft::make_device_matrix(handle, ncv, nEigVecs); - if (which == LANCZOS_WHICH::SA) { - eigenvectors_k = raft::make_device_matrix_view( - eigenvectors.data_handle(), ncv, nEigVecs); - eigenvalues_k = - raft::make_device_vector_view(eigenvalues.data_handle(), nEigVecs); - eigenvectors_k_slice = raft::make_device_matrix_view( - eigenvectors.data_handle(), ncv, nEigVecs); - } else if (which == LANCZOS_WHICH::LA) { - eigenvectors_k = raft::make_device_matrix_view( - eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); - eigenvalues_k = raft::make_device_vector_view( - eigenvalues.data_handle() + (ncv - nEigVecs), nEigVecs); - eigenvectors_k_slice = raft::make_device_matrix_view( - eigenvectors.data_handle() + (ncv - nEigVecs) * ncv, ncv, nEigVecs); - } else if (which == LANCZOS_WHICH::SM || which == LANCZOS_WHICH::LM) { - thrust::sequence(thrust::device, indices.data_handle(), indices.data_handle() + ncv, 0); - - // Sort indices by absolute eigenvalues (magnitude) using a custom comparator - thrust::sort(thrust::device, - indices.data_handle(), - indices.data_handle() + ncv, - [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { - return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); - }); - - if (which == LANCZOS_WHICH::SM) { - // Take the first nEigVecs indices (smallest magnitude) - raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); - } else if (which == LANCZOS_WHICH::LM) { - // Take the last nEigVecs indices (largest magnitude) - raft::copy( - selected_indices.data_handle(), indices.data_handle() + (ncv - nEigVecs), nEigVecs, stream); - } - - // Re-sort these indices by algebraic value to maintain algebraic ordering - thrust::sort(thrust::device, - selected_indices.data_handle(), - selected_indices.data_handle() + nEigVecs, - [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { - return eigenvalues[a] < eigenvalues[b]; - }); - raft::matrix::gather( - handle, - raft::make_device_matrix_view( - eigenvalues.data_handle(), ncv, 1), - raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - raft::make_device_matrix_view( - sm_eigenvalues.data_handle(), nEigVecs, 1)); - raft::matrix::gather( - handle, - raft::make_device_matrix_view( - eigenvectors.data_handle(), ncv, ncv), - raft::make_device_vector_view(selected_indices.data_handle(), nEigVecs), - raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), nEigVecs, ncv)); - - eigenvectors_k = raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), ncv, nEigVecs); - eigenvalues_k = - raft::make_device_vector_view(sm_eigenvalues.data_handle(), nEigVecs); - eigenvectors_k_slice = raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), ncv, nEigVecs); - } + lanczos_solve_ritz(handle, + alpha.view(), + beta.view(), + std::nullopt, + nEigVecs, + which, + ncv, + eigenvectors.view(), + eigenvalues.view(), + eigenvectors_k, + eigenvalues_k, + eigenvectors_k_slice, + sm_eigenvalues.view(), + sm_eigenvectors.view()); auto ritz_eigenvectors = raft::make_device_matrix_view(eigVecs_dev, n, nEigVecs); @@ -2091,57 +2104,15 @@ auto lanczos_smallest( beta.view(), beta_k.view(), nEigVecs, - 0, + which, ncv, eigenvectors.view(), - eigenvalues.view()); - - if (which == LANCZOS_WHICH::SM || which == LANCZOS_WHICH::LM) { - // Sort indices by absolute eigenvalues (magnitude) using a custom comparator - thrust::sort(thrust::device, - indices.data_handle(), - indices.data_handle() + ncv, - [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { - return fabsf(eigenvalues[a]) < fabsf(eigenvalues[b]); - }); - - if (which == LANCZOS_WHICH::SM) { - // Take the first nEigVecs indices (smallest magnitude) - raft::copy(selected_indices.data_handle(), indices.data_handle(), nEigVecs, stream); - } else if (which == LANCZOS_WHICH::LM) { - // Take the last nEigVecs indices (largest magnitude) - raft::copy(selected_indices.data_handle(), - indices.data_handle() + (ncv - nEigVecs), - nEigVecs, - stream); - } - - // Re-sort these indices by algebraic value to maintain algebraic ordering - thrust::sort(thrust::device, - selected_indices.data_handle(), - selected_indices.data_handle() + nEigVecs, - [eigenvalues = eigenvalues.data_handle()] __device__(int a, int b) { - return eigenvalues[a] < eigenvalues[b]; - }); - - raft::matrix::gather( - handle, - raft::make_device_matrix_view( - eigenvalues.data_handle(), ncv, 1), - raft::make_device_vector_view(selected_indices.data_handle(), - nEigVecs), - raft::make_device_matrix_view( - sm_eigenvalues.data_handle(), nEigVecs, 1)); - - raft::matrix::gather( - handle, - raft::make_device_matrix_view( - eigenvectors.data_handle(), ncv, ncv), - raft::make_device_vector_view(selected_indices.data_handle(), - nEigVecs), - raft::make_device_matrix_view( - sm_eigenvectors.data_handle(), nEigVecs, ncv)); - } + eigenvalues.view(), + eigenvectors_k, + eigenvalues_k, + eigenvectors_k_slice, + sm_eigenvalues.view(), + sm_eigenvectors.view()); auto ritz_eigenvectors = raft::make_device_matrix_view( eigVecs_dev, n, nEigVecs); From 12f61fdf7dcdfabf377e6dd3c3f4df225eaf7ca7 Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 30 Apr 2025 10:07:49 +0000 Subject: [PATCH 12/35] pre-commit --- cpp/include/raft/sparse/solver/detail/lanczos.cuh | 1 - 1 file changed, 1 deletion(-) diff --git a/cpp/include/raft/sparse/solver/detail/lanczos.cuh b/cpp/include/raft/sparse/solver/detail/lanczos.cuh index ec41e772fc..e262218312 100644 --- a/cpp/include/raft/sparse/solver/detail/lanczos.cuh +++ b/cpp/include/raft/sparse/solver/detail/lanczos.cuh @@ -1836,7 +1836,6 @@ auto lanczos_smallest( raft::make_device_matrix(handle, ncv, ncv); auto eigenvalues = raft::make_device_vector(handle, ncv); - raft::device_matrix_view eigenvectors_k; raft::device_vector_view eigenvalues_k; raft::device_matrix_view eigenvectors_k_slice; From 6fbba7172a731376ea5353c5547ddfae60805298 Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 6 May 2025 02:40:04 +0000 Subject: [PATCH 13/35] doxygen format --- .../raft/sparse/solver/lanczos_types.hpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/cpp/include/raft/sparse/solver/lanczos_types.hpp b/cpp/include/raft/sparse/solver/lanczos_types.hpp index 4fcc147e63..e010ae7463 100644 --- a/cpp/include/raft/sparse/solver/lanczos_types.hpp +++ b/cpp/include/raft/sparse/solver/lanczos_types.hpp @@ -20,11 +20,20 @@ namespace raft::sparse::solver { -// LA: Largest (algebraic) eigenvalues -// LM: Largest (in magnitude) eigenvalues -// SA: Smallest (algebraic) eigenvalues -// SM: Smallest (in magnitude) eigenvalues -enum LANCZOS_WHICH { LA, LM, SA, SM }; +/** + * @enum LANCZOS_WHICH + * @brief Enumeration specifying which eigenvalues to compute in the Lanczos algorithm + */ +enum class LANCZOS_WHICH { + /** @brief LA: Largest (algebraic) eigenvalues */ + LA, + /** @brief LM: Largest (in magnitude) eigenvalues */ + LM, + /** @brief SA: Smallest (algebraic) eigenvalues */ + SA, + /** @brief SM: Smallest (in magnitude) eigenvalues */ + SM +}; template struct lanczos_solver_config { From a0422cced1aeea3c0ee916aadad18f9af995d94d Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 6 May 2025 03:35:42 +0000 Subject: [PATCH 14/35] update docs --- cpp/include/raft/sparse/solver/lanczos_types.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/include/raft/sparse/solver/lanczos_types.hpp b/cpp/include/raft/sparse/solver/lanczos_types.hpp index e010ae7463..e995c507ec 100644 --- a/cpp/include/raft/sparse/solver/lanczos_types.hpp +++ b/cpp/include/raft/sparse/solver/lanczos_types.hpp @@ -45,7 +45,7 @@ struct lanczos_solver_config { int ncv; /** Tolerance for residuals ``||Ax - wx||`` */ ValueTypeT tolerance; - /** which=**/ + /** Enumeration specifying which eigenvalues to compute in the Lanczos algorithm. **/ LANCZOS_WHICH which; /** random seed */ uint64_t seed; From 5e2e3df2593c10cf35894cbde557a2ebb7beb5de Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 6 May 2025 03:36:45 +0000 Subject: [PATCH 15/35] update docs --- cpp/include/raft/sparse/solver/lanczos_types.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/include/raft/sparse/solver/lanczos_types.hpp b/cpp/include/raft/sparse/solver/lanczos_types.hpp index e995c507ec..d9fd5c8de9 100644 --- a/cpp/include/raft/sparse/solver/lanczos_types.hpp +++ b/cpp/include/raft/sparse/solver/lanczos_types.hpp @@ -45,7 +45,7 @@ struct lanczos_solver_config { int ncv; /** Tolerance for residuals ``||Ax - wx||`` */ ValueTypeT tolerance; - /** Enumeration specifying which eigenvalues to compute in the Lanczos algorithm. **/ + /** Enumeration specifying which eigenvalues to compute in the Lanczos algorithm. */ LANCZOS_WHICH which; /** random seed */ uint64_t seed; From 0ce7c31ee71cfba1602089be14e64aad5dd2cbee Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 6 May 2025 05:53:31 +0000 Subject: [PATCH 16/35] fix enum --- cpp/include/raft/sparse/solver/lanczos_types.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/include/raft/sparse/solver/lanczos_types.hpp b/cpp/include/raft/sparse/solver/lanczos_types.hpp index d9fd5c8de9..c01b2a270f 100644 --- a/cpp/include/raft/sparse/solver/lanczos_types.hpp +++ b/cpp/include/raft/sparse/solver/lanczos_types.hpp @@ -24,7 +24,7 @@ namespace raft::sparse::solver { * @enum LANCZOS_WHICH * @brief Enumeration specifying which eigenvalues to compute in the Lanczos algorithm */ -enum class LANCZOS_WHICH { +enum LANCZOS_WHICH { /** @brief LA: Largest (algebraic) eigenvalues */ LA, /** @brief LM: Largest (in magnitude) eigenvalues */ From 266db4c2e1ca2e269fce0caa22604b241a2885df Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 7 May 2025 05:01:33 +0000 Subject: [PATCH 17/35] add gtests --- cpp/tests/sparse/solver/lanczos.cu | 1349 ++++++++++++++++++++++++++++ 1 file changed, 1349 insertions(+) diff --git a/cpp/tests/sparse/solver/lanczos.cu b/cpp/tests/sparse/solver/lanczos.cu index 67c43b3d44..a456901119 100644 --- a/cpp/tests/sparse/solver/lanczos.cu +++ b/cpp/tests/sparse/solver/lanczos.cu @@ -443,6 +443,1338 @@ const std::vector> inputsd = { 0.7194629, 0.6273088, 0.2909178, 0.5188584, 0.5876446, 0.2812338}, {-2.0369630, -1.7673520}}}; +const std::vector> inputsd_SM = { + {2, + 20, + 100000, + 0, + 0, + 1e-15, + raft::sparse::solver::LANCZOS_WHICH::SM, + 42, + {0, 29, 51, 74, 103, 120, 142, 161, 181, 199, 217, 235, 254, 271, 295, + 314, 338, 364, 388, 405, 417, 437, 458, 478, 501, 511, 522, 539, 554, 574, + 590, 615, 638, 651, 679, 698, 717, 725, 741, 761, 779, 799, 817, 833, 850, + 864, 879, 896, 921, 938, 961, 985, 1004, 1019, 1035, 1048, 1070, 1084, 1102, 1123, + 1138, 1165, 1182, 1203, 1215, 1232, 1253, 1272, 1289, 1310, 1327, 1344, 1358, 1386, 1406, + 1428, 1450, 1470, 1485, 1503, 1516, 1529, 1553, 1571, 1596, 1614, 1629, 1647, 1676, 1695, + 1709, 1732, 1750, 1765, 1782, 1803, 1818, 1832, 1846, 1866, 1884}, + {0, 3, 5, 8, 14, 23, 29, 31, 33, 34, 35, 36, 39, 47, 49, 50, 51, 61, 62, 63, 75, 76, 80, 85, + 88, 91, 92, 94, 96, 1, 3, 6, 7, 8, 15, 19, 31, 35, 44, 48, 60, 65, 69, 72, 73, 76, 78, 80, + 85, 90, 97, 17, 26, 28, 41, 42, 43, 45, 48, 51, 52, 57, 58, 59, 62, 63, 65, 67, 68, 74, 86, 90, + 91, 92, 0, 1, 3, 4, 11, 15, 16, 18, 21, 30, 33, 35, 37, 40, 46, 49, 54, 55, 57, 59, 60, 66, + 67, 72, 76, 81, 84, 87, 88, 3, 10, 16, 23, 32, 34, 37, 39, 45, 47, 50, 57, 60, 61, 72, 83, 87, + 0, 10, 18, 31, 32, 33, 43, 52, 55, 56, 58, 60, 63, 67, 68, 72, 76, 77, 82, 86, 90, 92, 1, 16, + 21, 23, 24, 29, 30, 37, 47, 52, 53, 55, 56, 68, 69, 73, 83, 87, 94, 1, 11, 13, 21, 30, 33, 35, + 42, 61, 64, 65, 75, 78, 79, 81, 82, 89, 94, 95, 99, 0, 1, 12, 14, 16, 29, 49, 50, 56, 59, 64, + 66, 68, 72, 77, 87, 93, 98, 15, 26, 32, 33, 52, 53, 56, 58, 60, 64, 65, 70, 71, 81, 87, 93, 97, + 99, 4, 5, 21, 23, 26, 29, 34, 42, 56, 59, 64, 68, 71, 78, 83, 84, 87, 90, 3, 7, 11, 12, 21, + 23, 45, 47, 49, 55, 56, 75, 78, 79, 80, 83, 88, 90, 94, 8, 11, 15, 17, 24, 33, 34, 39, 41, 47, + 48, 53, 54, 61, 86, 93, 94, 7, 14, 15, 17, 22, 29, 30, 39, 41, 43, 45, 46, 47, 48, 55, 60, 62, + 72, 73, 77, 83, 84, 93, 98, 0, 8, 13, 18, 26, 33, 44, 45, 53, 54, 58, 72, 74, 75, 82, 87, 92, + 94, 98, 1, 3, 9, 12, 13, 16, 22, 26, 30, 58, 62, 68, 69, 73, 74, 75, 78, 80, 91, 93, 95, 96, + 97, 99, 3, 4, 6, 8, 15, 17, 18, 23, 25, 31, 42, 45, 47, 50, 55, 58, 60, 62, 65, 70, 72, 75, + 83, 84, 91, 92, 2, 12, 13, 16, 24, 26, 30, 31, 32, 33, 38, 42, 58, 60, 65, 68, 70, 74, 75, 85, + 92, 93, 94, 95, 3, 5, 14, 16, 20, 28, 33, 35, 51, 57, 62, 64, 69, 76, 85, 86, 91, 1, 30, 35, + 41, 48, 49, 50, 63, 65, 81, 88, 99, 18, 20, 24, 25, 26, 28, 29, 45, 61, 67, 72, 74, 75, 76, 80, + 85, 87, 94, 98, 99, 3, 6, 7, 10, 11, 24, 39, 43, 45, 47, 49, 52, 54, 55, 60, 65, 66, 68, 78, + 84, 89, 13, 15, 25, 29, 31, 32, 33, 36, 39, 41, 48, 49, 51, 52, 54, 58, 60, 75, 86, 87, 0, 4, + 6, 10, 11, 16, 25, 28, 30, 31, 37, 40, 41, 44, 51, 53, 58, 60, 66, 73, 80, 91, 92, 6, 12, 17, + 20, 21, 58, 73, 84, 92, 98, 16, 20, 22, 23, 34, 45, 46, 66, 78, 86, 92, 2, 9, 10, 14, 15, 17, + 20, 27, 29, 35, 50, 58, 64, 68, 73, 78, 88, 26, 29, 37, 48, 50, 53, 55, 56, 60, 67, 69, 71, 77, + 81, 88, 2, 18, 20, 23, 51, 55, 59, 63, 64, 67, 68, 72, 76, 77, 78, 83, 84, 87, 94, 98, 0, 6, + 8, 10, 13, 20, 22, 26, 27, 35, 49, 63, 73, 75, 86, 87, 3, 6, 7, 13, 15, 17, 19, 23, 31, 32, + 33, 39, 41, 45, 46, 47, 48, 61, 66, 68, 70, 79, 90, 95, 99, 0, 1, 5, 16, 17, 22, 23, 30, 32, + 45, 46, 47, 51, 53, 54, 60, 62, 66, 72, 79, 87, 94, 97, 4, 5, 9, 17, 22, 30, 31, 38, 51, 57, + 70, 79, 85, 0, 3, 5, 7, 9, 12, 14, 17, 18, 22, 30, 34, 37, 50, 55, 58, 60, 73, 79, 83, 87, + 89, 92, 93, 96, 97, 98, 99, 0, 4, 10, 12, 25, 33, 34, 38, 47, 52, 64, 65, 66, 68, 73, 81, 82, + 88, 91, 0, 1, 3, 7, 18, 19, 26, 29, 41, 50, 56, 57, 70, 72, 75, 82, 93, 95, 97, 0, 22, 46, + 62, 74, 76, 83, 86, 3, 4, 6, 23, 27, 33, 38, 39, 43, 55, 67, 71, 81, 85, 87, 90, 17, 32, 34, + 37, 40, 42, 43, 44, 46, 57, 59, 69, 72, 74, 79, 81, 87, 90, 92, 98, 0, 4, 12, 13, 21, 22, 30, + 37, 41, 60, 69, 73, 75, 82, 84, 90, 92, 99, 3, 23, 38, 41, 45, 46, 49, 54, 58, 59, 63, 67, 69, + 71, 76, 80, 81, 84, 93, 98, 2, 12, 13, 19, 22, 23, 30, 35, 39, 40, 51, 57, 70, 78, 83, 85, 90, + 94, 2, 7, 10, 16, 17, 38, 44, 47, 49, 64, 69, 76, 77, 79, 81, 83, 2, 5, 13, 21, 37, 38, 62, + 67, 68, 81, 82, 86, 87, 95, 96, 97, 98, 1, 14, 23, 38, 42, 51, 55, 71, 74, 75, 76, 77, 89, 96, + 2, 4, 11, 13, 14, 16, 20, 21, 25, 30, 31, 40, 60, 75, 94, 3, 13, 25, 30, 31, 36, 38, 40, 66, + 71, 72, 76, 81, 84, 88, 89, 95, 0, 4, 6, 11, 12, 13, 16, 21, 30, 31, 34, 42, 47, 49, 51, 55, + 65, 68, 70, 71, 73, 75, 84, 88, 95, 1, 2, 12, 13, 19, 22, 27, 30, 51, 56, 57, 72, 75, 79, 90, + 91, 98, 0, 3, 8, 11, 19, 21, 22, 29, 40, 42, 47, 49, 50, 55, 57, 61, 63, 77, 83, 88, 90, 91, + 93, 0, 4, 8, 16, 19, 26, 27, 33, 35, 49, 50, 52, 53, 55, 62, 65, 66, 68, 71, 78, 82, 90, 94, + 98, 0, 2, 18, 22, 23, 28, 31, 32, 41, 44, 47, 48, 56, 58, 69, 70, 83, 96, 98, 2, 5, 6, 9, + 21, 22, 34, 50, 62, 65, 66, 69, 72, 79, 84, 6, 9, 12, 14, 23, 27, 31, 50, 56, 58, 59, 67, 76, + 77, 81, 97, 3, 12, 14, 21, 22, 31, 40, 59, 67, 74, 81, 89, 90, 3, 5, 6, 11, 13, 16, 21, 27, + 28, 33, 37, 44, 47, 49, 50, 59, 71, 72, 83, 89, 91, 96, 5, 6, 8, 9, 10, 11, 27, 35, 48, 51, + 53, 62, 65, 74, 2, 3, 4, 18, 32, 35, 38, 41, 48, 49, 64, 66, 74, 86, 87, 94, 95, 98, 2, 5, + 9, 14, 15, 16, 17, 22, 23, 24, 26, 33, 40, 51, 53, 61, 70, 72, 81, 83, 85, 2, 3, 8, 10, 28, + 38, 40, 53, 54, 55, 68, 70, 81, 83, 98, 1, 3, 4, 5, 9, 13, 16, 17, 21, 22, 23, 27, 31, 33, + 39, 45, 60, 62, 70, 77, 80, 82, 83, 84, 85, 86, 98, 0, 4, 7, 12, 20, 30, 49, 58, 61, 62, 63, + 65, 72, 76, 83, 89, 91, 0, 2, 13, 15, 16, 18, 31, 36, 43, 50, 52, 56, 60, 61, 66, 72, 83, 87, + 89, 92, 93, 0, 2, 5, 19, 28, 29, 40, 49, 61, 63, 86, 90, 7, 8, 9, 10, 18, 26, 28, 34, 42, + 57, 72, 74, 82, 87, 88, 96, 99, 1, 2, 7, 9, 16, 17, 19, 21, 34, 47, 50, 52, 56, 61, 67, 83, + 89, 90, 95, 97, 99, 3, 8, 21, 23, 25, 30, 31, 34, 46, 50, 52, 57, 62, 79, 81, 85, 87, 90, 99, + 2, 3, 5, 20, 27, 28, 37, 40, 43, 53, 54, 65, 69, 82, 84, 89, 90, 2, 5, 6, 8, 10, 15, 17, + 21, 26, 28, 30, 34, 43, 47, 50, 59, 69, 70, 79, 88, 97, 1, 6, 15, 18, 27, 38, 39, 40, 42, 51, + 52, 67, 68, 71, 77, 80, 97, 9, 16, 17, 30, 32, 35, 41, 47, 51, 58, 59, 60, 68, 72, 77, 86, 93, + 9, 10, 27, 37, 40, 44, 46, 47, 50, 55, 69, 74, 87, 98, 1, 3, 4, 5, 8, 13, 14, 16, 20, 28, + 31, 35, 38, 46, 48, 52, 55, 58, 61, 62, 64, 70, 77, 78, 82, 86, 89, 99, 1, 6, 13, 15, 23, 24, + 26, 29, 33, 34, 39, 47, 76, 77, 83, 87, 88, 96, 98, 99, 2, 14, 15, 17, 20, 36, 38, 44, 54, 56, + 57, 64, 71, 80, 81, 85, 86, 87, 88, 92, 93, 95, 0, 7, 11, 14, 15, 16, 17, 20, 22, 29, 35, 39, + 44, 45, 47, 48, 78, 85, 90, 92, 94, 99, 0, 1, 3, 5, 18, 20, 28, 36, 40, 42, 44, 46, 53, 61, + 73, 80, 82, 84, 91, 95, 5, 8, 13, 27, 28, 42, 44, 49, 53, 60, 69, 70, 72, 73, 91, 1, 7, 10, + 11, 15, 21, 25, 26, 28, 41, 50, 72, 75, 81, 82, 87, 94, 96, 7, 11, 30, 31, 32, 33, 38, 42, 48, + 52, 66, 68, 82, 0, 1, 11, 15, 20, 23, 40, 60, 69, 74, 76, 80, 93, 3, 7, 9, 19, 27, 34, 37, + 38, 40, 42, 43, 46, 53, 54, 58, 59, 66, 74, 78, 81, 84, 87, 88, 91, 5, 7, 14, 34, 35, 39, 43, + 50, 60, 64, 67, 72, 76, 78, 79, 83, 84, 96, 4, 6, 10, 11, 13, 16, 28, 33, 36, 41, 42, 49, 51, + 55, 58, 59, 60, 61, 62, 65, 73, 82, 84, 86, 97, 3, 10, 13, 16, 21, 24, 28, 39, 40, 46, 47, 52, + 60, 67, 76, 81, 82, 83, 0, 1, 17, 18, 20, 32, 37, 41, 58, 60, 66, 74, 75, 90, 94, 2, 5, 12, + 18, 22, 25, 29, 36, 43, 57, 60, 63, 70, 72, 74, 83, 94, 99, 3, 4, 6, 8, 9, 10, 14, 20, 22, + 28, 29, 31, 33, 37, 38, 43, 57, 62, 64, 66, 71, 73, 74, 78, 81, 91, 94, 95, 99, 0, 3, 11, 19, + 26, 27, 34, 46, 47, 49, 64, 68, 73, 74, 81, 90, 94, 95, 97, 7, 21, 33, 44, 46, 54, 55, 61, 62, + 65, 67, 72, 91, 99, 1, 2, 5, 10, 11, 30, 37, 38, 39, 41, 48, 49, 50, 54, 63, 65, 66, 67, 75, + 85, 88, 91, 96, 0, 2, 15, 16, 18, 23, 34, 48, 49, 55, 61, 76, 77, 81, 87, 89, 90, 97, 0, 2, + 5, 14, 16, 17, 23, 24, 25, 33, 38, 39, 62, 74, 75, 8, 9, 12, 13, 15, 17, 33, 35, 40, 49, 62, + 70, 74, 80, 93, 98, 99, 0, 6, 7, 11, 12, 14, 17, 20, 28, 31, 41, 45, 50, 57, 75, 78, 85, 86, + 87, 88, 95, 7, 15, 17, 30, 35, 43, 46, 47, 57, 65, 74, 76, 87, 88, 94, 0, 15, 33, 43, 44, 51, + 55, 64, 73, 78, 82, 90, 96, 98, 1, 9, 15, 31, 33, 35, 43, 53, 65, 68, 69, 83, 88, 91, 8, 13, + 14, 20, 24, 28, 33, 38, 40, 43, 48, 50, 51, 57, 59, 60, 71, 73, 93, 96, 7, 9, 15, 19, 20, 30, + 33, 39, 64, 65, 66, 72, 73, 75, 86, 87, 89, 93}, + {0.8385492, 0.0887047, 0.4178915, 0.4859754, 0.4469863, 0.2195207, 0.3129920, 0.1031984, + 0.2898832, 0.3742032, 0.0522814, 0.3923617, 0.4283062, 0.2236069, 0.1620676, 0.0181036, + 0.0722899, 0.2825163, 0.2854958, 0.3136983, 0.4021524, 0.3556329, 0.4577443, 0.1463357, + 0.3288944, 0.4404407, 0.3466910, 0.2799277, 0.1813836, 0.4619252, 0.1622771, 0.2565850, + 0.3349850, 0.4806673, 0.2912005, 0.2509201, 0.6396587, 0.5977305, 0.1196116, 0.2077467, + 0.0345871, 0.4918659, 0.4194439, 0.4487811, 0.1682306, 0.3017929, 0.1373989, 0.3152796, + 0.3640917, 0.0489285, 0.4335400, 0.0987368, 0.1548646, 0.2137529, 0.0130792, 0.0752723, + 0.1238085, 0.3553386, 0.4349648, 0.3818015, 0.4697597, 0.4478265, 0.2176154, 0.3768051, + 0.3741169, 0.0550861, 0.3733355, 0.0161616, 0.0404749, 0.0530627, 0.3932415, 0.2313439, + 0.4807387, 0.3860448, 0.0887047, 0.1622771, 0.2646495, 0.4319774, 0.0975544, 0.3953015, + 0.4127654, 0.3950751, 0.0630765, 0.3240158, 0.3895027, 0.0263783, 0.3096741, 0.0810854, + 0.2185860, 0.2931856, 0.4413908, 0.4933484, 0.3265684, 0.3630947, 0.3439550, 0.4709083, + 0.4871525, 0.4059546, 0.2835062, 0.2319805, 0.1080630, 0.1148512, 0.4250860, 0.4319774, + 0.3417962, 0.1542346, 0.1705101, 0.3939655, 0.2228894, 0.2561502, 0.1612249, 0.3348420, + 0.7638237, 0.2223779, 0.1142358, 0.2221761, 0.1023570, 0.0100264, 0.4906516, 0.4211857, + 0.4178915, 0.2112697, 0.0841055, 0.3054300, 0.4681202, 0.3307955, 0.2055745, 0.3013350, + 0.0921099, 0.2272112, 0.4771985, 0.0400448, 0.4924752, 0.3142720, 0.3691756, 0.2582222, + 0.2400539, 0.4489491, 0.5111299, 0.4255019, 0.3747997, 0.1873246, 0.2565850, 0.1914687, + 0.3671139, 0.1276162, 0.3537677, 0.4076773, 0.1181683, 0.7192769, 0.2186738, 0.2885858, + 0.4734213, 0.0072575, 0.0765674, 0.0898227, 0.3649966, 0.2496215, 0.1702205, 0.0710704, + 0.3869004, 0.3349850, 0.1886938, 0.3514959, 0.4643647, 0.4223959, 0.3594954, 0.2522124, + 0.4105392, 0.2470788, 0.2545409, 0.3583593, 0.2345200, 0.0271059, 0.3803033, 0.1930780, + 0.4567223, 0.0613140, 0.2441548, 0.4808156, 0.3853460, 0.4859754, 0.4806673, 0.2801995, + 0.3858915, 0.0090301, 0.4087827, 0.3671360, 0.2667392, 0.4641679, 0.4647529, 0.3445000, + 0.1198545, 0.0282007, 0.1829597, 0.0539266, 0.0914677, 0.1638856, 0.1201562, 0.4388565, + 0.2036911, 0.2046127, 0.4811504, 0.3038480, 0.0642898, 0.2031245, 0.1680801, 0.0394903, + 0.4766186, 0.2023225, 0.0175873, 0.3034133, 0.4123132, 0.0379968, 0.2168891, 0.0675915, + 0.4039690, 0.3417962, 0.2112697, 0.2400451, 0.4558193, 0.1334496, 0.0195393, 0.3627390, + 0.4262152, 0.0403542, 0.3081270, 0.1527164, 0.0121030, 0.6241815, 0.4913400, 0.0157230, + 0.3200969, 0.0437878, 0.3018721, 0.0975544, 0.1886938, 0.8753713, 0.0700827, 0.2364397, + 0.4924574, 0.2563165, 0.1126200, 0.1547797, 0.0241622, 0.3814965, 0.3526533, 0.2161066, + 0.2911978, 0.4464823, 0.3577181, 0.3152088, 0.3317510, 0.2863414, 0.2801995, 0.0700827, + 0.3417172, 0.2610632, 0.4037673, 0.1736438, 0.0880198, 0.4559108, 0.1121846, 0.7814473, + 0.3779829, 0.3405251, 0.1208012, 0.4304054, 0.1807327, 0.0049234, 0.1778966, 0.3514959, + 0.2046946, 0.2997384, 0.2013881, 0.0548181, 0.3352703, 0.2054045, 0.3389475, 0.1449403, + 0.3906285, 0.0580903, 0.3582265, 0.1743012, 0.2712877, 0.4273703, 0.4566499, 0.0667344, + 0.0676206, 0.1248124, 0.0026571, 0.2774455, 0.0032627, 0.1753686, 0.3725724, 0.4469863, + 0.3858915, 0.2046946, 0.3794979, 0.4016317, 0.3370037, 0.0815573, 0.4647915, 0.0563985, + 0.4203163, 0.0915991, 0.0276749, 0.3857849, 0.0461729, 0.3978934, 0.3614717, 0.3266448, + 0.7978231, 0.4209127, 0.2912005, 0.3953015, 0.4388565, 0.3417172, 0.2997384, 0.4108247, + 0.2899171, 0.1479114, 0.4418810, 0.0634220, 0.0929668, 0.4055436, 0.2457036, 0.3701515, + 0.4134036, 0.0947451, 0.2785034, 0.3162361, 0.4036728, 0.3741804, 0.4563937, 0.4904932, + 0.1492740, 0.4887115, 0.4127654, 0.1542346, 0.1914687, 0.0090301, 0.4108247, 0.3533593, + 0.4300368, 0.3572507, 0.1412494, 0.4373029, 0.3273854, 0.2602280, 0.1690700, 0.4756982, + 0.0009060, 0.2393224, 0.0014211, 0.4101384, 0.1580024, 0.0231310, 0.5838791, 0.4132268, + 0.2181222, 0.3529412, 0.3698108, 0.2233849, 0.0987368, 0.2610632, 0.2013881, 0.3533593, + 0.2908257, 0.3609885, 0.2026076, 0.2999429, 0.2079948, 0.2704931, 0.2946429, 0.3154255, + 0.0627621, 0.2774129, 0.4206699, 0.0670598, 0.2860273, 0.3919643, 0.2397596, 0.2703603, + 0.4632739, 0.4124186, 0.5805955, 0.1959839, 0.3950751, 0.0841055, 0.3794979, 0.4300368, + 0.4032480, 0.2078872, 0.0094638, 0.2755707, 0.0376010, 0.4909527, 0.3097841, 0.2355419, + 0.0072671, 0.2746342, 0.0053361, 0.1994108, 0.3969467, 0.2509201, 0.3298818, 0.3886021, + 0.0245763, 0.4638373, 0.4052183, 0.4148478, 0.0242814, 0.2414050, 0.2932298, 0.0475468, + 0.4618716, 0.4032480, 0.8676416, 0.4028524, 0.3012557, 0.1360013, 0.1863026, 0.1490197, + 0.0643736, 0.3395792, 0.2925389, 0.3659366, 0.4948683, 0.4953563, 0.1047673, 0.0355901, + 0.0856992, 0.1778870, 0.0851296, 0.3532749, 0.0398270, 0.0630765, 0.3671139, 0.4643647, + 0.2400451, 0.2364397, 0.4431843, 0.1266264, 0.4763364, 0.7873081, 0.2751093, 0.4222012, + 0.1121367, 0.4474346, 0.3652081, 0.1600931, 0.0614609, 0.0204758, 0.1615355, 0.4293712, + 0.3882434, 0.6431416, 0.0548181, 0.2899171, 0.3634890, 0.4412351, 0.1490288, 0.0447601, + 0.4229826, 0.3807294, 0.0672451, 0.2775799, 0.4666647, 0.4085002, 0.1297752, 0.1563804, + 0.1522877, 0.2532282, 0.2805034, 0.1651538, 0.1046609, 0.1760083, 0.2195207, 0.1705101, + 0.1276162, 0.4558193, 0.4924574, 0.3572507, 0.3401189, 0.0565680, 0.4332137, 0.2150277, + 0.4809324, 0.2783410, 0.1570549, 0.4891155, 0.4529251, 0.2209245, 0.3658022, 0.3961954, + 0.3788675, 0.1621254, 0.3969478, 0.3886663, 0.4372073, 0.3537677, 0.4037673, 0.2908257, + 0.4028524, 0.4431843, 0.7202524, 0.3443225, 0.3538920, 0.3133293, 0.4439365, 0.1412494, + 0.3012557, 0.3634890, 0.3401189, 0.1250412, 0.4831129, 0.0737263, 0.3228796, 0.0975274, + 0.1318027, 0.4008097, 0.1548646, 0.2036911, 0.1334496, 0.4016317, 0.1479114, 0.3609885, + 0.1360013, 0.1494316, 0.4203018, 0.2847606, 0.1855530, 0.3948809, 0.1457941, 0.1710113, + 0.4871747, 0.0616420, 0.2720916, 0.1494316, 0.3342525, 0.4981484, 0.2835164, 0.2201109, + 0.3569505, 0.3228796, 0.2664382, 0.1461955, 0.2912845, 0.2178672, 0.0091858, 0.3888402, + 0.3213883, 0.1017065, 0.2137529, 0.2078872, 0.1863026, 0.0565680, 0.2497744, 0.0917027, + 0.3077455, 0.2898162, 0.1962939, 0.0667715, 0.0511321, 0.4857582, 0.0757288, 0.4719980, + 0.0990155, 0.0358659, 0.3427203, 0.4911953, 0.0026993, 0.3121863, 0.3129920, 0.4076773, + 0.4087827, 0.0195393, 0.3352703, 0.1490197, 0.4412351, 0.4203018, 0.3342525, 0.4991112, + 0.3198876, 0.0273423, 0.1726720, 0.2868139, 0.0167729, 0.3167321, 0.3240158, 0.1181683, + 0.4223959, 0.2054045, 0.4418810, 0.2026076, 0.3298818, 0.4332137, 0.4679078, 0.2938424, + 0.2349892, 0.3265936, 0.4161196, 0.0540847, 0.4671349, 0.4922210, 0.4333457, 0.2783662, + 0.3295173, 0.1414430, 0.4789151, 0.5482149, 0.2405941, 0.0873055, 0.4915100, 0.1031984, + 0.6396587, 0.3054300, 0.4373029, 0.2999429, 0.1490288, 0.2150277, 0.4679078, 0.4463057, + 0.3714156, 0.1611302, 0.3379962, 0.4654491, 0.0994459, 0.4963855, 0.0027219, 0.2011968, + 0.2413642, 0.0713272, 0.0186765, 0.5553801, 0.0508773, 0.4655451, 0.3939655, 0.4681202, + 0.2046127, 0.2079948, 0.0447601, 0.2938424, 0.4463057, 0.4189366, 0.4805591, 0.4724835, + 0.4029289, 0.3810731, 0.3855192, 0.2898832, 0.3895027, 0.3307955, 0.3594954, 0.4811504, + 0.1736438, 0.3370037, 0.2704931, 0.0094638, 0.4229826, 0.2349892, 0.1488369, 0.3299349, + 0.3658398, 0.2805756, 0.1943161, 0.1270155, 0.2077195, 0.1249269, 0.0572191, 0.3217881, + 0.1812549, 0.4356323, 0.2024299, 0.4955283, 0.2777625, 0.0642578, 0.4278218, 0.3742032, + 0.2228894, 0.3627390, 0.0880198, 0.1250412, 0.1488369, 0.6981739, 0.2518100, 0.2364128, + 0.4279115, 0.4212285, 0.4749146, 0.2284694, 0.1864383, 0.0079268, 0.2446150, 0.4631400, + 0.2501489, 0.4844082, 0.0522814, 0.5977305, 0.0263783, 0.2522124, 0.2755707, 0.3886021, + 0.2847606, 0.4991112, 0.0239194, 0.4028964, 0.2294849, 0.2998522, 0.1320064, 0.0275548, + 0.1151714, 0.2652366, 0.2787146, 0.2884416, 0.1149032, 0.3923617, 0.3807294, 0.0540387, + 0.2807390, 0.0142855, 0.3054538, 0.0743166, 0.1352609, 0.3096741, 0.2561502, 0.7192769, + 0.4809324, 0.4981484, 0.3299349, 0.2030550, 0.2820974, 0.3606436, 0.1871530, 0.2116934, + 0.1441479, 0.2874195, 0.3848211, 0.3917919, 0.4778197, 0.2946429, 0.4189366, 0.2518100, + 0.2030550, 0.4912895, 0.1356941, 0.2409017, 0.4399648, 0.2600915, 0.1039219, 0.0522639, + 0.1473574, 0.1156571, 0.2768389, 0.4478964, 0.1246019, 0.1488771, 0.3747582, 0.0281233, + 0.0742416, 0.4283062, 0.1612249, 0.4559108, 0.3389475, 0.1266264, 0.0672451, 0.3265936, + 0.2820974, 0.3309392, 0.0915848, 0.0509763, 0.4962989, 0.4802843, 0.0841302, 0.1918956, + 0.3192275, 0.4662680, 0.1974726, 0.0810854, 0.2783410, 0.4912895, 0.3111583, 0.4521906, + 0.2043965, 0.3393941, 0.2771504, 0.4931641, 0.1747926, 0.0280012, 0.3078630, 0.0456258, + 0.1170995, 0.0880413, 0.2797376, 0.2573348, 0.2639170, 0.3364275, 0.2011374, 0.0130792, + 0.1121846, 0.1449403, 0.0245763, 0.2775799, 0.1570549, 0.4161196, 0.0239194, 0.3309392, + 0.3111583, 0.3020653, 0.0100230, 0.4954931, 0.4227756, 0.3662207, 0.4669757, 0.1495063, + 0.4342381, 0.0752723, 0.4105392, 0.4262152, 0.3273854, 0.3154255, 0.1356941, 0.1063635, + 0.3477053, 0.4418667, 0.4065750, 0.2158301, 0.0978730, 0.3474138, 0.0941925, 0.2502904, + 0.4167871, 0.1238085, 0.2055745, 0.3906285, 0.4763364, 0.3606436, 0.2409017, 0.2856070, + 0.4519934, 0.0640926, 0.3494168, 0.2239768, 0.1506959, 0.3404586, 0.0097513, 0.3356108, + 0.2007709, 0.0563368, 0.1196116, 0.0815573, 0.4891155, 0.4399648, 0.1063635, 0.0469109, + 0.4409516, 0.2269343, 0.1728651, 0.4690269, 0.4568825, 0.3838028, 0.1701081, 0.2478454, + 0.3553386, 0.3348420, 0.2563165, 0.0580903, 0.4647915, 0.2602280, 0.0643736, 0.7873081, + 0.4831129, 0.0540847, 0.3714156, 0.4521906, 0.0529002, 0.1118892, 0.3946897, 0.2185860, + 0.3582265, 0.0737263, 0.4671349, 0.1611302, 0.0540387, 0.2600915, 0.2043965, 0.0178831, + 0.3605796, 0.4215185, 0.3441654, 0.3192719, 0.2912215, 0.2253530, 0.4059448, 0.0770738, + 0.2236069, 0.7638237, 0.2186738, 0.1126200, 0.7814473, 0.1743012, 0.1690700, 0.2751093, + 0.4922210, 0.3379962, 0.2364128, 0.3477053, 0.7218004, 0.3724327, 0.2531753, 0.0252278, + 0.2816279, 0.1346799, 0.1643871, 0.3633022, 0.1110411, 0.2297511, 0.4249687, 0.4478221, + 0.2225533, 0.2077467, 0.4349648, 0.3779829, 0.2712877, 0.4638373, 0.4666647, 0.2835164, + 0.4333457, 0.4028734, 0.3229839, 0.3908435, 0.3720633, 0.3528297, 0.4553215, 0.1170026, + 0.4753753, 0.0282417, 0.1620676, 0.2931856, 0.3671360, 0.1547797, 0.4052183, 0.4222012, + 0.4085002, 0.3198876, 0.3393941, 0.4418667, 0.3724327, 0.0297363, 0.4194855, 0.1562718, + 0.1693750, 0.3152241, 0.3387593, 0.2933232, 0.0599440, 0.1064471, 0.2469246, 0.0528503, + 0.0321264, 0.0181036, 0.2223779, 0.2667392, 0.4756982, 0.4148478, 0.1855530, 0.2201109, + 0.3658398, 0.4028964, 0.4194855, 0.1724464, 0.2184300, 0.4806912, 0.3213868, 0.4946703, + 0.0183148, 0.4068079, 0.3882787, 0.1461515, 0.3377662, 0.1434079, 0.1656042, 0.1153671, + 0.0297401, 0.0722899, 0.3818015, 0.0376010, 0.1297752, 0.4529251, 0.2497744, 0.4654491, + 0.4805591, 0.3020653, 0.0469109, 0.2531753, 0.4028734, 0.3104094, 0.0983794, 0.3041750, + 0.7444220, 0.0469955, 0.4269330, 0.3876660, 0.4697597, 0.3013350, 0.2885858, 0.3038480, + 0.1121367, 0.1563804, 0.4279115, 0.2184300, 0.3897764, 0.1165223, 0.1623044, 0.3694641, + 0.4647038, 0.1950430, 0.0223306, 0.4734213, 0.0642898, 0.3405251, 0.0563985, 0.2209245, + 0.3569505, 0.0994459, 0.4806912, 0.3142114, 0.1688596, 0.2013356, 0.3616973, 0.1345261, + 0.3665765, 0.1457076, 0.2400093, 0.4413908, 0.1208012, 0.4203163, 0.4474346, 0.1522877, + 0.4963855, 0.2771504, 0.3932629, 0.2256821, 0.3466487, 0.1397347, 0.4893270, 0.1162840, + 0.4933484, 0.0921099, 0.0072575, 0.0241622, 0.4273703, 0.0009060, 0.3652081, 0.3228796, + 0.0917027, 0.2805756, 0.1871530, 0.4409516, 0.0252278, 0.1562718, 0.3213868, 0.0526326, + 0.2417610, 0.1361428, 0.4773201, 0.2157922, 0.2075818, 0.1745262, 0.2272112, 0.0765674, + 0.4641679, 0.2031245, 0.0403542, 0.3814965, 0.2664382, 0.2294849, 0.3229839, 0.3104094, + 0.3142114, 0.1920804, 0.3407301, 0.3448193, 0.4478265, 0.3265684, 0.1142358, 0.4909527, + 0.4724835, 0.2998522, 0.1039219, 0.0100230, 0.3908435, 0.1693750, 0.1674092, 0.0846982, + 0.3384884, 0.1067837, 0.3844901, 0.1491689, 0.4107678, 0.5988698, 0.2176154, 0.4771985, + 0.1680801, 0.0915991, 0.0634220, 0.2393224, 0.0627621, 0.2532282, 0.3658022, 0.7202524, + 0.3948809, 0.1943161, 0.4931641, 0.0983794, 0.1688596, 0.4067034, 0.2580674, 0.4757213, + 0.3928346, 0.1995547, 0.2107771, 0.3768051, 0.3630947, 0.4647529, 0.3081270, 0.3077455, + 0.0522639, 0.1747926, 0.2013356, 0.3932629, 0.0526326, 0.3694007, 0.0972740, 0.3075456, + 0.2167318, 0.4610244, 0.0345871, 0.3439550, 0.2221761, 0.0400448, 0.0394903, 0.4566499, + 0.0014211, 0.2774129, 0.1600931, 0.2805034, 0.3961954, 0.1461955, 0.0027219, 0.1270155, + 0.0915848, 0.0529002, 0.0703681, 0.0187762, 0.2613653, 0.1867701, 0.1502444, 0.3600508, + 0.4655130, 0.3398629, 0.4028377, 0.1709328, 0.2641133, 0.2825163, 0.1023570, 0.2470788, + 0.4304054, 0.3395792, 0.2783662, 0.3152241, 0.4067034, 0.9997413, 0.3054797, 0.4133712, + 0.0630975, 0.0166616, 0.3381947, 0.2909326, 0.2139573, 0.0475201, 0.2854958, 0.3741169, + 0.0667344, 0.0929668, 0.4101384, 0.3097841, 0.2011968, 0.2807390, 0.2856070, 0.4946703, + 0.3897764, 0.1920804, 0.0187762, 0.3054797, 0.0461345, 0.2358043, 0.4405020, 0.2239718, + 0.0232168, 0.2595815, 0.1997993, 0.3136983, 0.0550861, 0.4924752, 0.0242814, 0.2898162, + 0.0273423, 0.0280012, 0.3387593, 0.4133712, 0.1691249, 0.4277944, 0.3262424, 0.2545409, + 0.3445000, 0.4766186, 0.1527164, 0.2355419, 0.1457941, 0.1962939, 0.4212285, 0.4065750, + 0.1674092, 0.0040041, 0.3576335, 0.6885277, 0.0684911, 0.0949263, 0.3370988, 0.4251885, + 0.4918659, 0.3733355, 0.3583593, 0.2023225, 0.1580024, 0.4206699, 0.2414050, 0.0614609, + 0.4749146, 0.2816279, 0.0183148, 0.1165223, 0.3407301, 0.0630975, 0.3476292, 0.2974767, + 0.0964920, 0.2228194, 0.2653476, 0.0658719, 0.3992334, 0.4709083, 0.1198545, 0.0204758, + 0.3788675, 0.3228796, 0.3295173, 0.2413642, 0.2284694, 0.0178831, 0.4068079, 0.1623044, + 0.0846982, 0.0461345, 0.1464626, 0.1254936, 0.4546162, 0.0599609, 0.2089537, 0.0068666, + 0.0161616, 0.4871525, 0.3142720, 0.2925389, 0.2912845, 0.0667715, 0.2116934, 0.3078630, + 0.4519934, 0.3616973, 0.2256821, 0.3476292, 0.1306226, 0.2562920, 0.1834991, 0.1524191, + 0.4803574, 0.0404749, 0.3691756, 0.0898227, 0.0282007, 0.0121030, 0.4055436, 0.0670598, + 0.1615355, 0.1710113, 0.0511321, 0.1414430, 0.1864383, 0.0640926, 0.1346799, 0.3882787, + 0.3694007, 0.0812578, 0.3378220, 0.2461788, 0.3674253, 0.4063063, 0.4194439, 0.3649966, + 0.2457036, 0.0072671, 0.2178672, 0.1473574, 0.0509763, 0.0456258, 0.2158301, 0.3041750, + 0.3694641, 0.1306226, 0.0812578, 0.4179677, 0.0273935, 0.1376181, 0.1237823, 0.0175873, + 0.0231310, 0.2860273, 0.4789151, 0.4029289, 0.1320064, 0.4954931, 0.1643871, 0.7444220, + 0.2580674, 0.0972740, 0.2613653, 0.3378220, 0.0734471, 0.5716440, 0.3270837, 0.4374486, + 0.3034133, 0.6241815, 0.0091858, 0.1441479, 0.1170995, 0.2269343, 0.3605796, 0.3633022, + 0.1461515, 0.2417610, 0.4179677, 0.1296077, 0.4877253, 0.1591760, 0.4487811, 0.4059546, + 0.0100264, 0.2582222, 0.1829597, 0.0676206, 0.0276749, 0.5838791, 0.3659366, 0.4857582, + 0.0713272, 0.0275548, 0.1156571, 0.4215185, 0.3720633, 0.4647038, 0.1361428, 0.4757213, + 0.0166616, 0.2358043, 0.0040041, 0.0734471, 0.1602434, 0.0591811, 0.1030985, 0.1983638, + 0.4710790, 0.4003320, 0.1682306, 0.2496215, 0.1248124, 0.3701515, 0.1621254, 0.3443225, + 0.4871747, 0.1726720, 0.2077195, 0.0079268, 0.4962989, 0.1110411, 0.2440522, 0.4165031, + 0.0252984, 0.3045145, 0.4441046, 0.4572209, 0.2415059, 0.4238202, 0.0530627, 0.3857849, + 0.4134036, 0.3919643, 0.4948683, 0.0142855, 0.2768389, 0.1728651, 0.3466487, 0.3448193, + 0.3384884, 0.3576335, 0.1296077, 0.1268078, 0.2563025, 0.1895228, 0.3345918, 0.4166048, + 0.4054141, 0.2596988, 0.4439297, 0.4482521, 0.4021524, 0.2345200, 0.3526533, 0.0461729, + 0.0947451, 0.4132268, 0.2397596, 0.4953563, 0.1651538, 0.2868139, 0.1151714, 0.4802843, + 0.4690269, 0.1118892, 0.2297511, 0.3528297, 0.0649494, 0.1603665, 0.3632484, 0.4808010, + 0.3155171, 0.0421940, 0.3556329, 0.3017929, 0.2835062, 0.2400539, 0.2746342, 0.1047673, + 0.0757288, 0.3054538, 0.0880413, 0.0978730, 0.4568825, 0.3441654, 0.1345261, 0.3381947, + 0.2440522, 0.1453612, 0.0627209, 0.4289585, 0.3434332, 0.1462075, 0.4489491, 0.0539266, + 0.0026571, 0.3888402, 0.4719980, 0.3474138, 0.3838028, 0.2933232, 0.3665765, 0.1867701, + 0.0273935, 0.5716440, 0.1602434, 0.4165031, 0.3889723, 0.1373989, 0.0271059, 0.4913400, + 0.2161066, 0.2785034, 0.4293712, 0.0975274, 0.0616420, 0.0990155, 0.4227756, 0.3377662, + 0.0591811, 0.0649494, 0.4863133, 0.3123243, 0.3094676, 0.4548634, 0.3543404, 0.3803033, + 0.2911978, 0.5482149, 0.0186765, 0.3810731, 0.1249269, 0.4478964, 0.0941925, 0.4553215, + 0.1950430, 0.1464626, 0.2461788, 0.2376485, 0.4577443, 0.3152796, 0.4464823, 0.3162361, + 0.0355901, 0.3969478, 0.2797376, 0.1502444, 0.1376181, 0.1268078, 0.1453612, 0.8429500, + 0.2124143, 0.2319805, 0.1930780, 0.4123132, 0.2932298, 0.3213883, 0.2446150, 0.2874195, + 0.1246019, 0.2573348, 0.2502904, 0.3494168, 0.3192719, 0.1457076, 0.1397347, 0.3928346, + 0.3075456, 0.1254936, 0.2563025, 0.4863133, 0.2630258, 0.1192136, 0.1283403, 0.3361003, + 0.3254332, 0.5111299, 0.4567223, 0.3978934, 0.4631400, 0.2652366, 0.0841302, 0.2239768, + 0.1434079, 0.3600508, 0.6885277, 0.2562920, 0.1030985, 0.0627209, 0.3123243, 0.2376485, + 0.6660228, 0.2737032, 0.0725528, 0.4906516, 0.1702205, 0.0157230, 0.3577181, 0.2774455, + 0.2181222, 0.0358659, 0.0572191, 0.0743166, 0.3662207, 0.4167871, 0.0599440, 0.0469955, + 0.4773201, 0.1995547, 0.2167318, 0.4655130, 0.2909326, 0.4405020, 0.2974767, 0.0252984, + 0.6660228, 0.4688708, 0.4444213, 0.2486204, 0.1080630, 0.3200969, 0.0032627, 0.3529412, + 0.3882434, 0.3538920, 0.3427203, 0.1918956, 0.2639170, 0.2912215, 0.4249687, 0.0223306, + 0.3398629, 0.1834991, 0.4289585, 0.1192136, 0.2737032, 0.4688708, 0.1463357, 0.3640917, + 0.2703603, 0.0053361, 0.0856992, 0.3855192, 0.3848211, 0.4669757, 0.2107771, 0.4028377, + 0.4546162, 0.1895228, 0.1603665, 0.1891034, 0.1633865, 0.3932415, 0.4255019, 0.1807327, + 0.1994108, 0.1046609, 0.1318027, 0.0167729, 0.1352609, 0.1506959, 0.1067837, 0.1709328, + 0.4277944, 0.3270837, 0.1983638, 0.3345918, 0.4444213, 0.4795561, 0.3394504, 0.1148512, + 0.4211857, 0.0710704, 0.0914677, 0.0379968, 0.0437878, 0.3614717, 0.1778870, 0.1760083, + 0.4911953, 0.3167321, 0.5553801, 0.3217881, 0.3917919, 0.1488771, 0.3404586, 0.3844901, + 0.2239718, 0.0684911, 0.0599609, 0.4877253, 0.3045145, 0.4166048, 0.3094676, 0.1283403, + 0.4126990, 0.0727838, 0.3816538, 0.3677183, 0.3288944, 0.4250860, 0.3152088, 0.0475468, + 0.2720916, 0.1017065, 0.2501489, 0.2253530, 0.4478221, 0.1064471, 0.0949263, 0.3674253, + 0.4441046, 0.4054141, 0.3361003, 0.3239112, 0.1663671, 0.0782135, 0.4374697, 0.0613140, + 0.6431416, 0.1812549, 0.1701081, 0.4059448, 0.4893270, 0.2157922, 0.2139573, 0.0232168, + 0.0964920, 0.1524191, 0.4710790, 0.4609937, 0.1566380, 0.0489285, 0.2313439, 0.3747997, + 0.3018721, 0.3317510, 0.2405941, 0.4778197, 0.3747582, 0.3192275, 0.1495063, 0.1170026, + 0.2469246, 0.1656042, 0.1162840, 0.3262424, 0.2228194, 0.2089537, 0.4803574, 0.3632484, + 0.1891034, 0.3239112, 0.1381195, 0.0077237, 0.4404407, 0.4807387, 0.4036728, 0.3698108, + 0.3969467, 0.3886663, 0.4844082, 0.4753753, 0.0528503, 0.2075818, 0.0475201, 0.3434332, + 0.3889723, 0.3254332, 0.4126990, 0.4609937, 0.1381195, 0.0022522, 0.3466910, 0.3860448, + 0.1873246, 0.3266448, 0.2233849, 0.4632739, 0.4372073, 0.3133293, 0.4008097, 0.4356323, + 0.0281233, 0.4662680, 0.2595815, 0.2596988, 0.4808010, 0.1638856, 0.2168891, 0.0049234, + 0.1753686, 0.3741804, 0.4124186, 0.2024299, 0.2787146, 0.3364275, 0.0321264, 0.1997993, + 0.4374486, 0.4439297, 0.2124143, 0.2074694, 0.1906150, 0.1204390, 0.2799277, 0.3869004, + 0.2441548, 0.2863414, 0.1778966, 0.7978231, 0.5805955, 0.0851296, 0.0026993, 0.0508773, + 0.4342381, 0.3946897, 0.1153671, 0.1491689, 0.3155171, 0.4548634, 0.1633865, 0.4795561, + 0.0727838, 0.1663671, 0.1552885, 0.4808156, 0.4563937, 0.1959839, 0.0873055, 0.2884416, + 0.0097513, 0.0770738, 0.2225533, 0.4107678, 0.2653476, 0.4482521, 0.1462075, 0.3816538, + 0.0782135, 0.1552885, 0.1813836, 0.4904932, 0.4955283, 0.3356108, 0.2478454, 0.4269330, + 0.1745262, 0.3370988, 0.4572209, 0.3543404, 0.0725528, 0.0077237, 0.3415696, 0.1628898, + 0.4335400, 0.0675915, 0.1492740, 0.4655451, 0.2777625, 0.1149032, 0.2007709, 0.2400093, + 0.0658719, 0.4063063, 0.1237823, 0.2486204, 0.4374697, 0.0022522, 0.1201562, 0.3725724, + 0.4209127, 0.3532749, 0.4439365, 0.3121863, 0.0642578, 0.0742416, 0.2011374, 0.0563368, + 0.0282417, 0.0297401, 0.3876660, 0.5988698, 0.4610244, 0.2641133, 0.1591760, 0.2415059, + 0.1906150, 0.1628898, 0.3853460, 0.4039690, 0.4887115, 0.4618716, 0.0398270, 0.4915100, + 0.4278218, 0.1974726, 0.4251885, 0.3992334, 0.0068666, 0.4003320, 0.4238202, 0.0421940, + 0.3394504, 0.3677183, 0.1566380, 0.1204390}, + {-0.03865971, -0.00056997}}}; + +const std::vector> inputsd_LM = { + {2, + 20, + 100000, + 0, + 0, + 1e-15, + raft::sparse::solver::LANCZOS_WHICH::LM, + 42, + {0, 29, 51, 74, 103, 120, 142, 161, 181, 199, 217, 235, 254, 271, 295, + 314, 338, 364, 388, 405, 417, 437, 458, 478, 501, 511, 522, 539, 554, 574, + 590, 615, 638, 651, 679, 698, 717, 725, 741, 761, 779, 799, 817, 833, 850, + 864, 879, 896, 921, 938, 961, 985, 1004, 1019, 1035, 1048, 1070, 1084, 1102, 1123, + 1138, 1165, 1182, 1203, 1215, 1232, 1253, 1272, 1289, 1310, 1327, 1344, 1358, 1386, 1406, + 1428, 1450, 1470, 1485, 1503, 1516, 1529, 1553, 1571, 1596, 1614, 1629, 1647, 1676, 1695, + 1709, 1732, 1750, 1765, 1782, 1803, 1818, 1832, 1846, 1866, 1884}, + {0, 3, 5, 8, 14, 23, 29, 31, 33, 34, 35, 36, 39, 47, 49, 50, 51, 61, 62, 63, 75, 76, 80, 85, + 88, 91, 92, 94, 96, 1, 3, 6, 7, 8, 15, 19, 31, 35, 44, 48, 60, 65, 69, 72, 73, 76, 78, 80, + 85, 90, 97, 17, 26, 28, 41, 42, 43, 45, 48, 51, 52, 57, 58, 59, 62, 63, 65, 67, 68, 74, 86, 90, + 91, 92, 0, 1, 3, 4, 11, 15, 16, 18, 21, 30, 33, 35, 37, 40, 46, 49, 54, 55, 57, 59, 60, 66, + 67, 72, 76, 81, 84, 87, 88, 3, 10, 16, 23, 32, 34, 37, 39, 45, 47, 50, 57, 60, 61, 72, 83, 87, + 0, 10, 18, 31, 32, 33, 43, 52, 55, 56, 58, 60, 63, 67, 68, 72, 76, 77, 82, 86, 90, 92, 1, 16, + 21, 23, 24, 29, 30, 37, 47, 52, 53, 55, 56, 68, 69, 73, 83, 87, 94, 1, 11, 13, 21, 30, 33, 35, + 42, 61, 64, 65, 75, 78, 79, 81, 82, 89, 94, 95, 99, 0, 1, 12, 14, 16, 29, 49, 50, 56, 59, 64, + 66, 68, 72, 77, 87, 93, 98, 15, 26, 32, 33, 52, 53, 56, 58, 60, 64, 65, 70, 71, 81, 87, 93, 97, + 99, 4, 5, 21, 23, 26, 29, 34, 42, 56, 59, 64, 68, 71, 78, 83, 84, 87, 90, 3, 7, 11, 12, 21, + 23, 45, 47, 49, 55, 56, 75, 78, 79, 80, 83, 88, 90, 94, 8, 11, 15, 17, 24, 33, 34, 39, 41, 47, + 48, 53, 54, 61, 86, 93, 94, 7, 14, 15, 17, 22, 29, 30, 39, 41, 43, 45, 46, 47, 48, 55, 60, 62, + 72, 73, 77, 83, 84, 93, 98, 0, 8, 13, 18, 26, 33, 44, 45, 53, 54, 58, 72, 74, 75, 82, 87, 92, + 94, 98, 1, 3, 9, 12, 13, 16, 22, 26, 30, 58, 62, 68, 69, 73, 74, 75, 78, 80, 91, 93, 95, 96, + 97, 99, 3, 4, 6, 8, 15, 17, 18, 23, 25, 31, 42, 45, 47, 50, 55, 58, 60, 62, 65, 70, 72, 75, + 83, 84, 91, 92, 2, 12, 13, 16, 24, 26, 30, 31, 32, 33, 38, 42, 58, 60, 65, 68, 70, 74, 75, 85, + 92, 93, 94, 95, 3, 5, 14, 16, 20, 28, 33, 35, 51, 57, 62, 64, 69, 76, 85, 86, 91, 1, 30, 35, + 41, 48, 49, 50, 63, 65, 81, 88, 99, 18, 20, 24, 25, 26, 28, 29, 45, 61, 67, 72, 74, 75, 76, 80, + 85, 87, 94, 98, 99, 3, 6, 7, 10, 11, 24, 39, 43, 45, 47, 49, 52, 54, 55, 60, 65, 66, 68, 78, + 84, 89, 13, 15, 25, 29, 31, 32, 33, 36, 39, 41, 48, 49, 51, 52, 54, 58, 60, 75, 86, 87, 0, 4, + 6, 10, 11, 16, 25, 28, 30, 31, 37, 40, 41, 44, 51, 53, 58, 60, 66, 73, 80, 91, 92, 6, 12, 17, + 20, 21, 58, 73, 84, 92, 98, 16, 20, 22, 23, 34, 45, 46, 66, 78, 86, 92, 2, 9, 10, 14, 15, 17, + 20, 27, 29, 35, 50, 58, 64, 68, 73, 78, 88, 26, 29, 37, 48, 50, 53, 55, 56, 60, 67, 69, 71, 77, + 81, 88, 2, 18, 20, 23, 51, 55, 59, 63, 64, 67, 68, 72, 76, 77, 78, 83, 84, 87, 94, 98, 0, 6, + 8, 10, 13, 20, 22, 26, 27, 35, 49, 63, 73, 75, 86, 87, 3, 6, 7, 13, 15, 17, 19, 23, 31, 32, + 33, 39, 41, 45, 46, 47, 48, 61, 66, 68, 70, 79, 90, 95, 99, 0, 1, 5, 16, 17, 22, 23, 30, 32, + 45, 46, 47, 51, 53, 54, 60, 62, 66, 72, 79, 87, 94, 97, 4, 5, 9, 17, 22, 30, 31, 38, 51, 57, + 70, 79, 85, 0, 3, 5, 7, 9, 12, 14, 17, 18, 22, 30, 34, 37, 50, 55, 58, 60, 73, 79, 83, 87, + 89, 92, 93, 96, 97, 98, 99, 0, 4, 10, 12, 25, 33, 34, 38, 47, 52, 64, 65, 66, 68, 73, 81, 82, + 88, 91, 0, 1, 3, 7, 18, 19, 26, 29, 41, 50, 56, 57, 70, 72, 75, 82, 93, 95, 97, 0, 22, 46, + 62, 74, 76, 83, 86, 3, 4, 6, 23, 27, 33, 38, 39, 43, 55, 67, 71, 81, 85, 87, 90, 17, 32, 34, + 37, 40, 42, 43, 44, 46, 57, 59, 69, 72, 74, 79, 81, 87, 90, 92, 98, 0, 4, 12, 13, 21, 22, 30, + 37, 41, 60, 69, 73, 75, 82, 84, 90, 92, 99, 3, 23, 38, 41, 45, 46, 49, 54, 58, 59, 63, 67, 69, + 71, 76, 80, 81, 84, 93, 98, 2, 12, 13, 19, 22, 23, 30, 35, 39, 40, 51, 57, 70, 78, 83, 85, 90, + 94, 2, 7, 10, 16, 17, 38, 44, 47, 49, 64, 69, 76, 77, 79, 81, 83, 2, 5, 13, 21, 37, 38, 62, + 67, 68, 81, 82, 86, 87, 95, 96, 97, 98, 1, 14, 23, 38, 42, 51, 55, 71, 74, 75, 76, 77, 89, 96, + 2, 4, 11, 13, 14, 16, 20, 21, 25, 30, 31, 40, 60, 75, 94, 3, 13, 25, 30, 31, 36, 38, 40, 66, + 71, 72, 76, 81, 84, 88, 89, 95, 0, 4, 6, 11, 12, 13, 16, 21, 30, 31, 34, 42, 47, 49, 51, 55, + 65, 68, 70, 71, 73, 75, 84, 88, 95, 1, 2, 12, 13, 19, 22, 27, 30, 51, 56, 57, 72, 75, 79, 90, + 91, 98, 0, 3, 8, 11, 19, 21, 22, 29, 40, 42, 47, 49, 50, 55, 57, 61, 63, 77, 83, 88, 90, 91, + 93, 0, 4, 8, 16, 19, 26, 27, 33, 35, 49, 50, 52, 53, 55, 62, 65, 66, 68, 71, 78, 82, 90, 94, + 98, 0, 2, 18, 22, 23, 28, 31, 32, 41, 44, 47, 48, 56, 58, 69, 70, 83, 96, 98, 2, 5, 6, 9, + 21, 22, 34, 50, 62, 65, 66, 69, 72, 79, 84, 6, 9, 12, 14, 23, 27, 31, 50, 56, 58, 59, 67, 76, + 77, 81, 97, 3, 12, 14, 21, 22, 31, 40, 59, 67, 74, 81, 89, 90, 3, 5, 6, 11, 13, 16, 21, 27, + 28, 33, 37, 44, 47, 49, 50, 59, 71, 72, 83, 89, 91, 96, 5, 6, 8, 9, 10, 11, 27, 35, 48, 51, + 53, 62, 65, 74, 2, 3, 4, 18, 32, 35, 38, 41, 48, 49, 64, 66, 74, 86, 87, 94, 95, 98, 2, 5, + 9, 14, 15, 16, 17, 22, 23, 24, 26, 33, 40, 51, 53, 61, 70, 72, 81, 83, 85, 2, 3, 8, 10, 28, + 38, 40, 53, 54, 55, 68, 70, 81, 83, 98, 1, 3, 4, 5, 9, 13, 16, 17, 21, 22, 23, 27, 31, 33, + 39, 45, 60, 62, 70, 77, 80, 82, 83, 84, 85, 86, 98, 0, 4, 7, 12, 20, 30, 49, 58, 61, 62, 63, + 65, 72, 76, 83, 89, 91, 0, 2, 13, 15, 16, 18, 31, 36, 43, 50, 52, 56, 60, 61, 66, 72, 83, 87, + 89, 92, 93, 0, 2, 5, 19, 28, 29, 40, 49, 61, 63, 86, 90, 7, 8, 9, 10, 18, 26, 28, 34, 42, + 57, 72, 74, 82, 87, 88, 96, 99, 1, 2, 7, 9, 16, 17, 19, 21, 34, 47, 50, 52, 56, 61, 67, 83, + 89, 90, 95, 97, 99, 3, 8, 21, 23, 25, 30, 31, 34, 46, 50, 52, 57, 62, 79, 81, 85, 87, 90, 99, + 2, 3, 5, 20, 27, 28, 37, 40, 43, 53, 54, 65, 69, 82, 84, 89, 90, 2, 5, 6, 8, 10, 15, 17, + 21, 26, 28, 30, 34, 43, 47, 50, 59, 69, 70, 79, 88, 97, 1, 6, 15, 18, 27, 38, 39, 40, 42, 51, + 52, 67, 68, 71, 77, 80, 97, 9, 16, 17, 30, 32, 35, 41, 47, 51, 58, 59, 60, 68, 72, 77, 86, 93, + 9, 10, 27, 37, 40, 44, 46, 47, 50, 55, 69, 74, 87, 98, 1, 3, 4, 5, 8, 13, 14, 16, 20, 28, + 31, 35, 38, 46, 48, 52, 55, 58, 61, 62, 64, 70, 77, 78, 82, 86, 89, 99, 1, 6, 13, 15, 23, 24, + 26, 29, 33, 34, 39, 47, 76, 77, 83, 87, 88, 96, 98, 99, 2, 14, 15, 17, 20, 36, 38, 44, 54, 56, + 57, 64, 71, 80, 81, 85, 86, 87, 88, 92, 93, 95, 0, 7, 11, 14, 15, 16, 17, 20, 22, 29, 35, 39, + 44, 45, 47, 48, 78, 85, 90, 92, 94, 99, 0, 1, 3, 5, 18, 20, 28, 36, 40, 42, 44, 46, 53, 61, + 73, 80, 82, 84, 91, 95, 5, 8, 13, 27, 28, 42, 44, 49, 53, 60, 69, 70, 72, 73, 91, 1, 7, 10, + 11, 15, 21, 25, 26, 28, 41, 50, 72, 75, 81, 82, 87, 94, 96, 7, 11, 30, 31, 32, 33, 38, 42, 48, + 52, 66, 68, 82, 0, 1, 11, 15, 20, 23, 40, 60, 69, 74, 76, 80, 93, 3, 7, 9, 19, 27, 34, 37, + 38, 40, 42, 43, 46, 53, 54, 58, 59, 66, 74, 78, 81, 84, 87, 88, 91, 5, 7, 14, 34, 35, 39, 43, + 50, 60, 64, 67, 72, 76, 78, 79, 83, 84, 96, 4, 6, 10, 11, 13, 16, 28, 33, 36, 41, 42, 49, 51, + 55, 58, 59, 60, 61, 62, 65, 73, 82, 84, 86, 97, 3, 10, 13, 16, 21, 24, 28, 39, 40, 46, 47, 52, + 60, 67, 76, 81, 82, 83, 0, 1, 17, 18, 20, 32, 37, 41, 58, 60, 66, 74, 75, 90, 94, 2, 5, 12, + 18, 22, 25, 29, 36, 43, 57, 60, 63, 70, 72, 74, 83, 94, 99, 3, 4, 6, 8, 9, 10, 14, 20, 22, + 28, 29, 31, 33, 37, 38, 43, 57, 62, 64, 66, 71, 73, 74, 78, 81, 91, 94, 95, 99, 0, 3, 11, 19, + 26, 27, 34, 46, 47, 49, 64, 68, 73, 74, 81, 90, 94, 95, 97, 7, 21, 33, 44, 46, 54, 55, 61, 62, + 65, 67, 72, 91, 99, 1, 2, 5, 10, 11, 30, 37, 38, 39, 41, 48, 49, 50, 54, 63, 65, 66, 67, 75, + 85, 88, 91, 96, 0, 2, 15, 16, 18, 23, 34, 48, 49, 55, 61, 76, 77, 81, 87, 89, 90, 97, 0, 2, + 5, 14, 16, 17, 23, 24, 25, 33, 38, 39, 62, 74, 75, 8, 9, 12, 13, 15, 17, 33, 35, 40, 49, 62, + 70, 74, 80, 93, 98, 99, 0, 6, 7, 11, 12, 14, 17, 20, 28, 31, 41, 45, 50, 57, 75, 78, 85, 86, + 87, 88, 95, 7, 15, 17, 30, 35, 43, 46, 47, 57, 65, 74, 76, 87, 88, 94, 0, 15, 33, 43, 44, 51, + 55, 64, 73, 78, 82, 90, 96, 98, 1, 9, 15, 31, 33, 35, 43, 53, 65, 68, 69, 83, 88, 91, 8, 13, + 14, 20, 24, 28, 33, 38, 40, 43, 48, 50, 51, 57, 59, 60, 71, 73, 93, 96, 7, 9, 15, 19, 20, 30, + 33, 39, 64, 65, 66, 72, 73, 75, 86, 87, 89, 93}, + {0.8385492, 0.0887047, 0.4178915, 0.4859754, 0.4469863, 0.2195207, 0.3129920, 0.1031984, + 0.2898832, 0.3742032, 0.0522814, 0.3923617, 0.4283062, 0.2236069, 0.1620676, 0.0181036, + 0.0722899, 0.2825163, 0.2854958, 0.3136983, 0.4021524, 0.3556329, 0.4577443, 0.1463357, + 0.3288944, 0.4404407, 0.3466910, 0.2799277, 0.1813836, 0.4619252, 0.1622771, 0.2565850, + 0.3349850, 0.4806673, 0.2912005, 0.2509201, 0.6396587, 0.5977305, 0.1196116, 0.2077467, + 0.0345871, 0.4918659, 0.4194439, 0.4487811, 0.1682306, 0.3017929, 0.1373989, 0.3152796, + 0.3640917, 0.0489285, 0.4335400, 0.0987368, 0.1548646, 0.2137529, 0.0130792, 0.0752723, + 0.1238085, 0.3553386, 0.4349648, 0.3818015, 0.4697597, 0.4478265, 0.2176154, 0.3768051, + 0.3741169, 0.0550861, 0.3733355, 0.0161616, 0.0404749, 0.0530627, 0.3932415, 0.2313439, + 0.4807387, 0.3860448, 0.0887047, 0.1622771, 0.2646495, 0.4319774, 0.0975544, 0.3953015, + 0.4127654, 0.3950751, 0.0630765, 0.3240158, 0.3895027, 0.0263783, 0.3096741, 0.0810854, + 0.2185860, 0.2931856, 0.4413908, 0.4933484, 0.3265684, 0.3630947, 0.3439550, 0.4709083, + 0.4871525, 0.4059546, 0.2835062, 0.2319805, 0.1080630, 0.1148512, 0.4250860, 0.4319774, + 0.3417962, 0.1542346, 0.1705101, 0.3939655, 0.2228894, 0.2561502, 0.1612249, 0.3348420, + 0.7638237, 0.2223779, 0.1142358, 0.2221761, 0.1023570, 0.0100264, 0.4906516, 0.4211857, + 0.4178915, 0.2112697, 0.0841055, 0.3054300, 0.4681202, 0.3307955, 0.2055745, 0.3013350, + 0.0921099, 0.2272112, 0.4771985, 0.0400448, 0.4924752, 0.3142720, 0.3691756, 0.2582222, + 0.2400539, 0.4489491, 0.5111299, 0.4255019, 0.3747997, 0.1873246, 0.2565850, 0.1914687, + 0.3671139, 0.1276162, 0.3537677, 0.4076773, 0.1181683, 0.7192769, 0.2186738, 0.2885858, + 0.4734213, 0.0072575, 0.0765674, 0.0898227, 0.3649966, 0.2496215, 0.1702205, 0.0710704, + 0.3869004, 0.3349850, 0.1886938, 0.3514959, 0.4643647, 0.4223959, 0.3594954, 0.2522124, + 0.4105392, 0.2470788, 0.2545409, 0.3583593, 0.2345200, 0.0271059, 0.3803033, 0.1930780, + 0.4567223, 0.0613140, 0.2441548, 0.4808156, 0.3853460, 0.4859754, 0.4806673, 0.2801995, + 0.3858915, 0.0090301, 0.4087827, 0.3671360, 0.2667392, 0.4641679, 0.4647529, 0.3445000, + 0.1198545, 0.0282007, 0.1829597, 0.0539266, 0.0914677, 0.1638856, 0.1201562, 0.4388565, + 0.2036911, 0.2046127, 0.4811504, 0.3038480, 0.0642898, 0.2031245, 0.1680801, 0.0394903, + 0.4766186, 0.2023225, 0.0175873, 0.3034133, 0.4123132, 0.0379968, 0.2168891, 0.0675915, + 0.4039690, 0.3417962, 0.2112697, 0.2400451, 0.4558193, 0.1334496, 0.0195393, 0.3627390, + 0.4262152, 0.0403542, 0.3081270, 0.1527164, 0.0121030, 0.6241815, 0.4913400, 0.0157230, + 0.3200969, 0.0437878, 0.3018721, 0.0975544, 0.1886938, 0.8753713, 0.0700827, 0.2364397, + 0.4924574, 0.2563165, 0.1126200, 0.1547797, 0.0241622, 0.3814965, 0.3526533, 0.2161066, + 0.2911978, 0.4464823, 0.3577181, 0.3152088, 0.3317510, 0.2863414, 0.2801995, 0.0700827, + 0.3417172, 0.2610632, 0.4037673, 0.1736438, 0.0880198, 0.4559108, 0.1121846, 0.7814473, + 0.3779829, 0.3405251, 0.1208012, 0.4304054, 0.1807327, 0.0049234, 0.1778966, 0.3514959, + 0.2046946, 0.2997384, 0.2013881, 0.0548181, 0.3352703, 0.2054045, 0.3389475, 0.1449403, + 0.3906285, 0.0580903, 0.3582265, 0.1743012, 0.2712877, 0.4273703, 0.4566499, 0.0667344, + 0.0676206, 0.1248124, 0.0026571, 0.2774455, 0.0032627, 0.1753686, 0.3725724, 0.4469863, + 0.3858915, 0.2046946, 0.3794979, 0.4016317, 0.3370037, 0.0815573, 0.4647915, 0.0563985, + 0.4203163, 0.0915991, 0.0276749, 0.3857849, 0.0461729, 0.3978934, 0.3614717, 0.3266448, + 0.7978231, 0.4209127, 0.2912005, 0.3953015, 0.4388565, 0.3417172, 0.2997384, 0.4108247, + 0.2899171, 0.1479114, 0.4418810, 0.0634220, 0.0929668, 0.4055436, 0.2457036, 0.3701515, + 0.4134036, 0.0947451, 0.2785034, 0.3162361, 0.4036728, 0.3741804, 0.4563937, 0.4904932, + 0.1492740, 0.4887115, 0.4127654, 0.1542346, 0.1914687, 0.0090301, 0.4108247, 0.3533593, + 0.4300368, 0.3572507, 0.1412494, 0.4373029, 0.3273854, 0.2602280, 0.1690700, 0.4756982, + 0.0009060, 0.2393224, 0.0014211, 0.4101384, 0.1580024, 0.0231310, 0.5838791, 0.4132268, + 0.2181222, 0.3529412, 0.3698108, 0.2233849, 0.0987368, 0.2610632, 0.2013881, 0.3533593, + 0.2908257, 0.3609885, 0.2026076, 0.2999429, 0.2079948, 0.2704931, 0.2946429, 0.3154255, + 0.0627621, 0.2774129, 0.4206699, 0.0670598, 0.2860273, 0.3919643, 0.2397596, 0.2703603, + 0.4632739, 0.4124186, 0.5805955, 0.1959839, 0.3950751, 0.0841055, 0.3794979, 0.4300368, + 0.4032480, 0.2078872, 0.0094638, 0.2755707, 0.0376010, 0.4909527, 0.3097841, 0.2355419, + 0.0072671, 0.2746342, 0.0053361, 0.1994108, 0.3969467, 0.2509201, 0.3298818, 0.3886021, + 0.0245763, 0.4638373, 0.4052183, 0.4148478, 0.0242814, 0.2414050, 0.2932298, 0.0475468, + 0.4618716, 0.4032480, 0.8676416, 0.4028524, 0.3012557, 0.1360013, 0.1863026, 0.1490197, + 0.0643736, 0.3395792, 0.2925389, 0.3659366, 0.4948683, 0.4953563, 0.1047673, 0.0355901, + 0.0856992, 0.1778870, 0.0851296, 0.3532749, 0.0398270, 0.0630765, 0.3671139, 0.4643647, + 0.2400451, 0.2364397, 0.4431843, 0.1266264, 0.4763364, 0.7873081, 0.2751093, 0.4222012, + 0.1121367, 0.4474346, 0.3652081, 0.1600931, 0.0614609, 0.0204758, 0.1615355, 0.4293712, + 0.3882434, 0.6431416, 0.0548181, 0.2899171, 0.3634890, 0.4412351, 0.1490288, 0.0447601, + 0.4229826, 0.3807294, 0.0672451, 0.2775799, 0.4666647, 0.4085002, 0.1297752, 0.1563804, + 0.1522877, 0.2532282, 0.2805034, 0.1651538, 0.1046609, 0.1760083, 0.2195207, 0.1705101, + 0.1276162, 0.4558193, 0.4924574, 0.3572507, 0.3401189, 0.0565680, 0.4332137, 0.2150277, + 0.4809324, 0.2783410, 0.1570549, 0.4891155, 0.4529251, 0.2209245, 0.3658022, 0.3961954, + 0.3788675, 0.1621254, 0.3969478, 0.3886663, 0.4372073, 0.3537677, 0.4037673, 0.2908257, + 0.4028524, 0.4431843, 0.7202524, 0.3443225, 0.3538920, 0.3133293, 0.4439365, 0.1412494, + 0.3012557, 0.3634890, 0.3401189, 0.1250412, 0.4831129, 0.0737263, 0.3228796, 0.0975274, + 0.1318027, 0.4008097, 0.1548646, 0.2036911, 0.1334496, 0.4016317, 0.1479114, 0.3609885, + 0.1360013, 0.1494316, 0.4203018, 0.2847606, 0.1855530, 0.3948809, 0.1457941, 0.1710113, + 0.4871747, 0.0616420, 0.2720916, 0.1494316, 0.3342525, 0.4981484, 0.2835164, 0.2201109, + 0.3569505, 0.3228796, 0.2664382, 0.1461955, 0.2912845, 0.2178672, 0.0091858, 0.3888402, + 0.3213883, 0.1017065, 0.2137529, 0.2078872, 0.1863026, 0.0565680, 0.2497744, 0.0917027, + 0.3077455, 0.2898162, 0.1962939, 0.0667715, 0.0511321, 0.4857582, 0.0757288, 0.4719980, + 0.0990155, 0.0358659, 0.3427203, 0.4911953, 0.0026993, 0.3121863, 0.3129920, 0.4076773, + 0.4087827, 0.0195393, 0.3352703, 0.1490197, 0.4412351, 0.4203018, 0.3342525, 0.4991112, + 0.3198876, 0.0273423, 0.1726720, 0.2868139, 0.0167729, 0.3167321, 0.3240158, 0.1181683, + 0.4223959, 0.2054045, 0.4418810, 0.2026076, 0.3298818, 0.4332137, 0.4679078, 0.2938424, + 0.2349892, 0.3265936, 0.4161196, 0.0540847, 0.4671349, 0.4922210, 0.4333457, 0.2783662, + 0.3295173, 0.1414430, 0.4789151, 0.5482149, 0.2405941, 0.0873055, 0.4915100, 0.1031984, + 0.6396587, 0.3054300, 0.4373029, 0.2999429, 0.1490288, 0.2150277, 0.4679078, 0.4463057, + 0.3714156, 0.1611302, 0.3379962, 0.4654491, 0.0994459, 0.4963855, 0.0027219, 0.2011968, + 0.2413642, 0.0713272, 0.0186765, 0.5553801, 0.0508773, 0.4655451, 0.3939655, 0.4681202, + 0.2046127, 0.2079948, 0.0447601, 0.2938424, 0.4463057, 0.4189366, 0.4805591, 0.4724835, + 0.4029289, 0.3810731, 0.3855192, 0.2898832, 0.3895027, 0.3307955, 0.3594954, 0.4811504, + 0.1736438, 0.3370037, 0.2704931, 0.0094638, 0.4229826, 0.2349892, 0.1488369, 0.3299349, + 0.3658398, 0.2805756, 0.1943161, 0.1270155, 0.2077195, 0.1249269, 0.0572191, 0.3217881, + 0.1812549, 0.4356323, 0.2024299, 0.4955283, 0.2777625, 0.0642578, 0.4278218, 0.3742032, + 0.2228894, 0.3627390, 0.0880198, 0.1250412, 0.1488369, 0.6981739, 0.2518100, 0.2364128, + 0.4279115, 0.4212285, 0.4749146, 0.2284694, 0.1864383, 0.0079268, 0.2446150, 0.4631400, + 0.2501489, 0.4844082, 0.0522814, 0.5977305, 0.0263783, 0.2522124, 0.2755707, 0.3886021, + 0.2847606, 0.4991112, 0.0239194, 0.4028964, 0.2294849, 0.2998522, 0.1320064, 0.0275548, + 0.1151714, 0.2652366, 0.2787146, 0.2884416, 0.1149032, 0.3923617, 0.3807294, 0.0540387, + 0.2807390, 0.0142855, 0.3054538, 0.0743166, 0.1352609, 0.3096741, 0.2561502, 0.7192769, + 0.4809324, 0.4981484, 0.3299349, 0.2030550, 0.2820974, 0.3606436, 0.1871530, 0.2116934, + 0.1441479, 0.2874195, 0.3848211, 0.3917919, 0.4778197, 0.2946429, 0.4189366, 0.2518100, + 0.2030550, 0.4912895, 0.1356941, 0.2409017, 0.4399648, 0.2600915, 0.1039219, 0.0522639, + 0.1473574, 0.1156571, 0.2768389, 0.4478964, 0.1246019, 0.1488771, 0.3747582, 0.0281233, + 0.0742416, 0.4283062, 0.1612249, 0.4559108, 0.3389475, 0.1266264, 0.0672451, 0.3265936, + 0.2820974, 0.3309392, 0.0915848, 0.0509763, 0.4962989, 0.4802843, 0.0841302, 0.1918956, + 0.3192275, 0.4662680, 0.1974726, 0.0810854, 0.2783410, 0.4912895, 0.3111583, 0.4521906, + 0.2043965, 0.3393941, 0.2771504, 0.4931641, 0.1747926, 0.0280012, 0.3078630, 0.0456258, + 0.1170995, 0.0880413, 0.2797376, 0.2573348, 0.2639170, 0.3364275, 0.2011374, 0.0130792, + 0.1121846, 0.1449403, 0.0245763, 0.2775799, 0.1570549, 0.4161196, 0.0239194, 0.3309392, + 0.3111583, 0.3020653, 0.0100230, 0.4954931, 0.4227756, 0.3662207, 0.4669757, 0.1495063, + 0.4342381, 0.0752723, 0.4105392, 0.4262152, 0.3273854, 0.3154255, 0.1356941, 0.1063635, + 0.3477053, 0.4418667, 0.4065750, 0.2158301, 0.0978730, 0.3474138, 0.0941925, 0.2502904, + 0.4167871, 0.1238085, 0.2055745, 0.3906285, 0.4763364, 0.3606436, 0.2409017, 0.2856070, + 0.4519934, 0.0640926, 0.3494168, 0.2239768, 0.1506959, 0.3404586, 0.0097513, 0.3356108, + 0.2007709, 0.0563368, 0.1196116, 0.0815573, 0.4891155, 0.4399648, 0.1063635, 0.0469109, + 0.4409516, 0.2269343, 0.1728651, 0.4690269, 0.4568825, 0.3838028, 0.1701081, 0.2478454, + 0.3553386, 0.3348420, 0.2563165, 0.0580903, 0.4647915, 0.2602280, 0.0643736, 0.7873081, + 0.4831129, 0.0540847, 0.3714156, 0.4521906, 0.0529002, 0.1118892, 0.3946897, 0.2185860, + 0.3582265, 0.0737263, 0.4671349, 0.1611302, 0.0540387, 0.2600915, 0.2043965, 0.0178831, + 0.3605796, 0.4215185, 0.3441654, 0.3192719, 0.2912215, 0.2253530, 0.4059448, 0.0770738, + 0.2236069, 0.7638237, 0.2186738, 0.1126200, 0.7814473, 0.1743012, 0.1690700, 0.2751093, + 0.4922210, 0.3379962, 0.2364128, 0.3477053, 0.7218004, 0.3724327, 0.2531753, 0.0252278, + 0.2816279, 0.1346799, 0.1643871, 0.3633022, 0.1110411, 0.2297511, 0.4249687, 0.4478221, + 0.2225533, 0.2077467, 0.4349648, 0.3779829, 0.2712877, 0.4638373, 0.4666647, 0.2835164, + 0.4333457, 0.4028734, 0.3229839, 0.3908435, 0.3720633, 0.3528297, 0.4553215, 0.1170026, + 0.4753753, 0.0282417, 0.1620676, 0.2931856, 0.3671360, 0.1547797, 0.4052183, 0.4222012, + 0.4085002, 0.3198876, 0.3393941, 0.4418667, 0.3724327, 0.0297363, 0.4194855, 0.1562718, + 0.1693750, 0.3152241, 0.3387593, 0.2933232, 0.0599440, 0.1064471, 0.2469246, 0.0528503, + 0.0321264, 0.0181036, 0.2223779, 0.2667392, 0.4756982, 0.4148478, 0.1855530, 0.2201109, + 0.3658398, 0.4028964, 0.4194855, 0.1724464, 0.2184300, 0.4806912, 0.3213868, 0.4946703, + 0.0183148, 0.4068079, 0.3882787, 0.1461515, 0.3377662, 0.1434079, 0.1656042, 0.1153671, + 0.0297401, 0.0722899, 0.3818015, 0.0376010, 0.1297752, 0.4529251, 0.2497744, 0.4654491, + 0.4805591, 0.3020653, 0.0469109, 0.2531753, 0.4028734, 0.3104094, 0.0983794, 0.3041750, + 0.7444220, 0.0469955, 0.4269330, 0.3876660, 0.4697597, 0.3013350, 0.2885858, 0.3038480, + 0.1121367, 0.1563804, 0.4279115, 0.2184300, 0.3897764, 0.1165223, 0.1623044, 0.3694641, + 0.4647038, 0.1950430, 0.0223306, 0.4734213, 0.0642898, 0.3405251, 0.0563985, 0.2209245, + 0.3569505, 0.0994459, 0.4806912, 0.3142114, 0.1688596, 0.2013356, 0.3616973, 0.1345261, + 0.3665765, 0.1457076, 0.2400093, 0.4413908, 0.1208012, 0.4203163, 0.4474346, 0.1522877, + 0.4963855, 0.2771504, 0.3932629, 0.2256821, 0.3466487, 0.1397347, 0.4893270, 0.1162840, + 0.4933484, 0.0921099, 0.0072575, 0.0241622, 0.4273703, 0.0009060, 0.3652081, 0.3228796, + 0.0917027, 0.2805756, 0.1871530, 0.4409516, 0.0252278, 0.1562718, 0.3213868, 0.0526326, + 0.2417610, 0.1361428, 0.4773201, 0.2157922, 0.2075818, 0.1745262, 0.2272112, 0.0765674, + 0.4641679, 0.2031245, 0.0403542, 0.3814965, 0.2664382, 0.2294849, 0.3229839, 0.3104094, + 0.3142114, 0.1920804, 0.3407301, 0.3448193, 0.4478265, 0.3265684, 0.1142358, 0.4909527, + 0.4724835, 0.2998522, 0.1039219, 0.0100230, 0.3908435, 0.1693750, 0.1674092, 0.0846982, + 0.3384884, 0.1067837, 0.3844901, 0.1491689, 0.4107678, 0.5988698, 0.2176154, 0.4771985, + 0.1680801, 0.0915991, 0.0634220, 0.2393224, 0.0627621, 0.2532282, 0.3658022, 0.7202524, + 0.3948809, 0.1943161, 0.4931641, 0.0983794, 0.1688596, 0.4067034, 0.2580674, 0.4757213, + 0.3928346, 0.1995547, 0.2107771, 0.3768051, 0.3630947, 0.4647529, 0.3081270, 0.3077455, + 0.0522639, 0.1747926, 0.2013356, 0.3932629, 0.0526326, 0.3694007, 0.0972740, 0.3075456, + 0.2167318, 0.4610244, 0.0345871, 0.3439550, 0.2221761, 0.0400448, 0.0394903, 0.4566499, + 0.0014211, 0.2774129, 0.1600931, 0.2805034, 0.3961954, 0.1461955, 0.0027219, 0.1270155, + 0.0915848, 0.0529002, 0.0703681, 0.0187762, 0.2613653, 0.1867701, 0.1502444, 0.3600508, + 0.4655130, 0.3398629, 0.4028377, 0.1709328, 0.2641133, 0.2825163, 0.1023570, 0.2470788, + 0.4304054, 0.3395792, 0.2783662, 0.3152241, 0.4067034, 0.9997413, 0.3054797, 0.4133712, + 0.0630975, 0.0166616, 0.3381947, 0.2909326, 0.2139573, 0.0475201, 0.2854958, 0.3741169, + 0.0667344, 0.0929668, 0.4101384, 0.3097841, 0.2011968, 0.2807390, 0.2856070, 0.4946703, + 0.3897764, 0.1920804, 0.0187762, 0.3054797, 0.0461345, 0.2358043, 0.4405020, 0.2239718, + 0.0232168, 0.2595815, 0.1997993, 0.3136983, 0.0550861, 0.4924752, 0.0242814, 0.2898162, + 0.0273423, 0.0280012, 0.3387593, 0.4133712, 0.1691249, 0.4277944, 0.3262424, 0.2545409, + 0.3445000, 0.4766186, 0.1527164, 0.2355419, 0.1457941, 0.1962939, 0.4212285, 0.4065750, + 0.1674092, 0.0040041, 0.3576335, 0.6885277, 0.0684911, 0.0949263, 0.3370988, 0.4251885, + 0.4918659, 0.3733355, 0.3583593, 0.2023225, 0.1580024, 0.4206699, 0.2414050, 0.0614609, + 0.4749146, 0.2816279, 0.0183148, 0.1165223, 0.3407301, 0.0630975, 0.3476292, 0.2974767, + 0.0964920, 0.2228194, 0.2653476, 0.0658719, 0.3992334, 0.4709083, 0.1198545, 0.0204758, + 0.3788675, 0.3228796, 0.3295173, 0.2413642, 0.2284694, 0.0178831, 0.4068079, 0.1623044, + 0.0846982, 0.0461345, 0.1464626, 0.1254936, 0.4546162, 0.0599609, 0.2089537, 0.0068666, + 0.0161616, 0.4871525, 0.3142720, 0.2925389, 0.2912845, 0.0667715, 0.2116934, 0.3078630, + 0.4519934, 0.3616973, 0.2256821, 0.3476292, 0.1306226, 0.2562920, 0.1834991, 0.1524191, + 0.4803574, 0.0404749, 0.3691756, 0.0898227, 0.0282007, 0.0121030, 0.4055436, 0.0670598, + 0.1615355, 0.1710113, 0.0511321, 0.1414430, 0.1864383, 0.0640926, 0.1346799, 0.3882787, + 0.3694007, 0.0812578, 0.3378220, 0.2461788, 0.3674253, 0.4063063, 0.4194439, 0.3649966, + 0.2457036, 0.0072671, 0.2178672, 0.1473574, 0.0509763, 0.0456258, 0.2158301, 0.3041750, + 0.3694641, 0.1306226, 0.0812578, 0.4179677, 0.0273935, 0.1376181, 0.1237823, 0.0175873, + 0.0231310, 0.2860273, 0.4789151, 0.4029289, 0.1320064, 0.4954931, 0.1643871, 0.7444220, + 0.2580674, 0.0972740, 0.2613653, 0.3378220, 0.0734471, 0.5716440, 0.3270837, 0.4374486, + 0.3034133, 0.6241815, 0.0091858, 0.1441479, 0.1170995, 0.2269343, 0.3605796, 0.3633022, + 0.1461515, 0.2417610, 0.4179677, 0.1296077, 0.4877253, 0.1591760, 0.4487811, 0.4059546, + 0.0100264, 0.2582222, 0.1829597, 0.0676206, 0.0276749, 0.5838791, 0.3659366, 0.4857582, + 0.0713272, 0.0275548, 0.1156571, 0.4215185, 0.3720633, 0.4647038, 0.1361428, 0.4757213, + 0.0166616, 0.2358043, 0.0040041, 0.0734471, 0.1602434, 0.0591811, 0.1030985, 0.1983638, + 0.4710790, 0.4003320, 0.1682306, 0.2496215, 0.1248124, 0.3701515, 0.1621254, 0.3443225, + 0.4871747, 0.1726720, 0.2077195, 0.0079268, 0.4962989, 0.1110411, 0.2440522, 0.4165031, + 0.0252984, 0.3045145, 0.4441046, 0.4572209, 0.2415059, 0.4238202, 0.0530627, 0.3857849, + 0.4134036, 0.3919643, 0.4948683, 0.0142855, 0.2768389, 0.1728651, 0.3466487, 0.3448193, + 0.3384884, 0.3576335, 0.1296077, 0.1268078, 0.2563025, 0.1895228, 0.3345918, 0.4166048, + 0.4054141, 0.2596988, 0.4439297, 0.4482521, 0.4021524, 0.2345200, 0.3526533, 0.0461729, + 0.0947451, 0.4132268, 0.2397596, 0.4953563, 0.1651538, 0.2868139, 0.1151714, 0.4802843, + 0.4690269, 0.1118892, 0.2297511, 0.3528297, 0.0649494, 0.1603665, 0.3632484, 0.4808010, + 0.3155171, 0.0421940, 0.3556329, 0.3017929, 0.2835062, 0.2400539, 0.2746342, 0.1047673, + 0.0757288, 0.3054538, 0.0880413, 0.0978730, 0.4568825, 0.3441654, 0.1345261, 0.3381947, + 0.2440522, 0.1453612, 0.0627209, 0.4289585, 0.3434332, 0.1462075, 0.4489491, 0.0539266, + 0.0026571, 0.3888402, 0.4719980, 0.3474138, 0.3838028, 0.2933232, 0.3665765, 0.1867701, + 0.0273935, 0.5716440, 0.1602434, 0.4165031, 0.3889723, 0.1373989, 0.0271059, 0.4913400, + 0.2161066, 0.2785034, 0.4293712, 0.0975274, 0.0616420, 0.0990155, 0.4227756, 0.3377662, + 0.0591811, 0.0649494, 0.4863133, 0.3123243, 0.3094676, 0.4548634, 0.3543404, 0.3803033, + 0.2911978, 0.5482149, 0.0186765, 0.3810731, 0.1249269, 0.4478964, 0.0941925, 0.4553215, + 0.1950430, 0.1464626, 0.2461788, 0.2376485, 0.4577443, 0.3152796, 0.4464823, 0.3162361, + 0.0355901, 0.3969478, 0.2797376, 0.1502444, 0.1376181, 0.1268078, 0.1453612, 0.8429500, + 0.2124143, 0.2319805, 0.1930780, 0.4123132, 0.2932298, 0.3213883, 0.2446150, 0.2874195, + 0.1246019, 0.2573348, 0.2502904, 0.3494168, 0.3192719, 0.1457076, 0.1397347, 0.3928346, + 0.3075456, 0.1254936, 0.2563025, 0.4863133, 0.2630258, 0.1192136, 0.1283403, 0.3361003, + 0.3254332, 0.5111299, 0.4567223, 0.3978934, 0.4631400, 0.2652366, 0.0841302, 0.2239768, + 0.1434079, 0.3600508, 0.6885277, 0.2562920, 0.1030985, 0.0627209, 0.3123243, 0.2376485, + 0.6660228, 0.2737032, 0.0725528, 0.4906516, 0.1702205, 0.0157230, 0.3577181, 0.2774455, + 0.2181222, 0.0358659, 0.0572191, 0.0743166, 0.3662207, 0.4167871, 0.0599440, 0.0469955, + 0.4773201, 0.1995547, 0.2167318, 0.4655130, 0.2909326, 0.4405020, 0.2974767, 0.0252984, + 0.6660228, 0.4688708, 0.4444213, 0.2486204, 0.1080630, 0.3200969, 0.0032627, 0.3529412, + 0.3882434, 0.3538920, 0.3427203, 0.1918956, 0.2639170, 0.2912215, 0.4249687, 0.0223306, + 0.3398629, 0.1834991, 0.4289585, 0.1192136, 0.2737032, 0.4688708, 0.1463357, 0.3640917, + 0.2703603, 0.0053361, 0.0856992, 0.3855192, 0.3848211, 0.4669757, 0.2107771, 0.4028377, + 0.4546162, 0.1895228, 0.1603665, 0.1891034, 0.1633865, 0.3932415, 0.4255019, 0.1807327, + 0.1994108, 0.1046609, 0.1318027, 0.0167729, 0.1352609, 0.1506959, 0.1067837, 0.1709328, + 0.4277944, 0.3270837, 0.1983638, 0.3345918, 0.4444213, 0.4795561, 0.3394504, 0.1148512, + 0.4211857, 0.0710704, 0.0914677, 0.0379968, 0.0437878, 0.3614717, 0.1778870, 0.1760083, + 0.4911953, 0.3167321, 0.5553801, 0.3217881, 0.3917919, 0.1488771, 0.3404586, 0.3844901, + 0.2239718, 0.0684911, 0.0599609, 0.4877253, 0.3045145, 0.4166048, 0.3094676, 0.1283403, + 0.4126990, 0.0727838, 0.3816538, 0.3677183, 0.3288944, 0.4250860, 0.3152088, 0.0475468, + 0.2720916, 0.1017065, 0.2501489, 0.2253530, 0.4478221, 0.1064471, 0.0949263, 0.3674253, + 0.4441046, 0.4054141, 0.3361003, 0.3239112, 0.1663671, 0.0782135, 0.4374697, 0.0613140, + 0.6431416, 0.1812549, 0.1701081, 0.4059448, 0.4893270, 0.2157922, 0.2139573, 0.0232168, + 0.0964920, 0.1524191, 0.4710790, 0.4609937, 0.1566380, 0.0489285, 0.2313439, 0.3747997, + 0.3018721, 0.3317510, 0.2405941, 0.4778197, 0.3747582, 0.3192275, 0.1495063, 0.1170026, + 0.2469246, 0.1656042, 0.1162840, 0.3262424, 0.2228194, 0.2089537, 0.4803574, 0.3632484, + 0.1891034, 0.3239112, 0.1381195, 0.0077237, 0.4404407, 0.4807387, 0.4036728, 0.3698108, + 0.3969467, 0.3886663, 0.4844082, 0.4753753, 0.0528503, 0.2075818, 0.0475201, 0.3434332, + 0.3889723, 0.3254332, 0.4126990, 0.4609937, 0.1381195, 0.0022522, 0.3466910, 0.3860448, + 0.1873246, 0.3266448, 0.2233849, 0.4632739, 0.4372073, 0.3133293, 0.4008097, 0.4356323, + 0.0281233, 0.4662680, 0.2595815, 0.2596988, 0.4808010, 0.1638856, 0.2168891, 0.0049234, + 0.1753686, 0.3741804, 0.4124186, 0.2024299, 0.2787146, 0.3364275, 0.0321264, 0.1997993, + 0.4374486, 0.4439297, 0.2124143, 0.2074694, 0.1906150, 0.1204390, 0.2799277, 0.3869004, + 0.2441548, 0.2863414, 0.1778966, 0.7978231, 0.5805955, 0.0851296, 0.0026993, 0.0508773, + 0.4342381, 0.3946897, 0.1153671, 0.1491689, 0.3155171, 0.4548634, 0.1633865, 0.4795561, + 0.0727838, 0.1663671, 0.1552885, 0.4808156, 0.4563937, 0.1959839, 0.0873055, 0.2884416, + 0.0097513, 0.0770738, 0.2225533, 0.4107678, 0.2653476, 0.4482521, 0.1462075, 0.3816538, + 0.0782135, 0.1552885, 0.1813836, 0.4904932, 0.4955283, 0.3356108, 0.2478454, 0.4269330, + 0.1745262, 0.3370988, 0.4572209, 0.3543404, 0.0725528, 0.0077237, 0.3415696, 0.1628898, + 0.4335400, 0.0675915, 0.1492740, 0.4655451, 0.2777625, 0.1149032, 0.2007709, 0.2400093, + 0.0658719, 0.4063063, 0.1237823, 0.2486204, 0.4374697, 0.0022522, 0.1201562, 0.3725724, + 0.4209127, 0.3532749, 0.4439365, 0.3121863, 0.0642578, 0.0742416, 0.2011374, 0.0563368, + 0.0282417, 0.0297401, 0.3876660, 0.5988698, 0.4610244, 0.2641133, 0.1591760, 0.2415059, + 0.1906150, 0.1628898, 0.3853460, 0.4039690, 0.4887115, 0.4618716, 0.0398270, 0.4915100, + 0.4278218, 0.1974726, 0.4251885, 0.3992334, 0.0068666, 0.4003320, 0.4238202, 0.0421940, + 0.3394504, 0.3677183, 0.1566380, 0.1204390}, + {-2.48497686, 5.47778263}}}; + +const std::vector> inputsd_LA = { + {2, + 20, + 100000, + 0, + 0, + 1e-15, + raft::sparse::solver::LANCZOS_WHICH::LA, + 42, + {0, 29, 51, 74, 103, 120, 142, 161, 181, 199, 217, 235, 254, 271, 295, + 314, 338, 364, 388, 405, 417, 437, 458, 478, 501, 511, 522, 539, 554, 574, + 590, 615, 638, 651, 679, 698, 717, 725, 741, 761, 779, 799, 817, 833, 850, + 864, 879, 896, 921, 938, 961, 985, 1004, 1019, 1035, 1048, 1070, 1084, 1102, 1123, + 1138, 1165, 1182, 1203, 1215, 1232, 1253, 1272, 1289, 1310, 1327, 1344, 1358, 1386, 1406, + 1428, 1450, 1470, 1485, 1503, 1516, 1529, 1553, 1571, 1596, 1614, 1629, 1647, 1676, 1695, + 1709, 1732, 1750, 1765, 1782, 1803, 1818, 1832, 1846, 1866, 1884}, + {0, 3, 5, 8, 14, 23, 29, 31, 33, 34, 35, 36, 39, 47, 49, 50, 51, 61, 62, 63, 75, 76, 80, 85, + 88, 91, 92, 94, 96, 1, 3, 6, 7, 8, 15, 19, 31, 35, 44, 48, 60, 65, 69, 72, 73, 76, 78, 80, + 85, 90, 97, 17, 26, 28, 41, 42, 43, 45, 48, 51, 52, 57, 58, 59, 62, 63, 65, 67, 68, 74, 86, 90, + 91, 92, 0, 1, 3, 4, 11, 15, 16, 18, 21, 30, 33, 35, 37, 40, 46, 49, 54, 55, 57, 59, 60, 66, + 67, 72, 76, 81, 84, 87, 88, 3, 10, 16, 23, 32, 34, 37, 39, 45, 47, 50, 57, 60, 61, 72, 83, 87, + 0, 10, 18, 31, 32, 33, 43, 52, 55, 56, 58, 60, 63, 67, 68, 72, 76, 77, 82, 86, 90, 92, 1, 16, + 21, 23, 24, 29, 30, 37, 47, 52, 53, 55, 56, 68, 69, 73, 83, 87, 94, 1, 11, 13, 21, 30, 33, 35, + 42, 61, 64, 65, 75, 78, 79, 81, 82, 89, 94, 95, 99, 0, 1, 12, 14, 16, 29, 49, 50, 56, 59, 64, + 66, 68, 72, 77, 87, 93, 98, 15, 26, 32, 33, 52, 53, 56, 58, 60, 64, 65, 70, 71, 81, 87, 93, 97, + 99, 4, 5, 21, 23, 26, 29, 34, 42, 56, 59, 64, 68, 71, 78, 83, 84, 87, 90, 3, 7, 11, 12, 21, + 23, 45, 47, 49, 55, 56, 75, 78, 79, 80, 83, 88, 90, 94, 8, 11, 15, 17, 24, 33, 34, 39, 41, 47, + 48, 53, 54, 61, 86, 93, 94, 7, 14, 15, 17, 22, 29, 30, 39, 41, 43, 45, 46, 47, 48, 55, 60, 62, + 72, 73, 77, 83, 84, 93, 98, 0, 8, 13, 18, 26, 33, 44, 45, 53, 54, 58, 72, 74, 75, 82, 87, 92, + 94, 98, 1, 3, 9, 12, 13, 16, 22, 26, 30, 58, 62, 68, 69, 73, 74, 75, 78, 80, 91, 93, 95, 96, + 97, 99, 3, 4, 6, 8, 15, 17, 18, 23, 25, 31, 42, 45, 47, 50, 55, 58, 60, 62, 65, 70, 72, 75, + 83, 84, 91, 92, 2, 12, 13, 16, 24, 26, 30, 31, 32, 33, 38, 42, 58, 60, 65, 68, 70, 74, 75, 85, + 92, 93, 94, 95, 3, 5, 14, 16, 20, 28, 33, 35, 51, 57, 62, 64, 69, 76, 85, 86, 91, 1, 30, 35, + 41, 48, 49, 50, 63, 65, 81, 88, 99, 18, 20, 24, 25, 26, 28, 29, 45, 61, 67, 72, 74, 75, 76, 80, + 85, 87, 94, 98, 99, 3, 6, 7, 10, 11, 24, 39, 43, 45, 47, 49, 52, 54, 55, 60, 65, 66, 68, 78, + 84, 89, 13, 15, 25, 29, 31, 32, 33, 36, 39, 41, 48, 49, 51, 52, 54, 58, 60, 75, 86, 87, 0, 4, + 6, 10, 11, 16, 25, 28, 30, 31, 37, 40, 41, 44, 51, 53, 58, 60, 66, 73, 80, 91, 92, 6, 12, 17, + 20, 21, 58, 73, 84, 92, 98, 16, 20, 22, 23, 34, 45, 46, 66, 78, 86, 92, 2, 9, 10, 14, 15, 17, + 20, 27, 29, 35, 50, 58, 64, 68, 73, 78, 88, 26, 29, 37, 48, 50, 53, 55, 56, 60, 67, 69, 71, 77, + 81, 88, 2, 18, 20, 23, 51, 55, 59, 63, 64, 67, 68, 72, 76, 77, 78, 83, 84, 87, 94, 98, 0, 6, + 8, 10, 13, 20, 22, 26, 27, 35, 49, 63, 73, 75, 86, 87, 3, 6, 7, 13, 15, 17, 19, 23, 31, 32, + 33, 39, 41, 45, 46, 47, 48, 61, 66, 68, 70, 79, 90, 95, 99, 0, 1, 5, 16, 17, 22, 23, 30, 32, + 45, 46, 47, 51, 53, 54, 60, 62, 66, 72, 79, 87, 94, 97, 4, 5, 9, 17, 22, 30, 31, 38, 51, 57, + 70, 79, 85, 0, 3, 5, 7, 9, 12, 14, 17, 18, 22, 30, 34, 37, 50, 55, 58, 60, 73, 79, 83, 87, + 89, 92, 93, 96, 97, 98, 99, 0, 4, 10, 12, 25, 33, 34, 38, 47, 52, 64, 65, 66, 68, 73, 81, 82, + 88, 91, 0, 1, 3, 7, 18, 19, 26, 29, 41, 50, 56, 57, 70, 72, 75, 82, 93, 95, 97, 0, 22, 46, + 62, 74, 76, 83, 86, 3, 4, 6, 23, 27, 33, 38, 39, 43, 55, 67, 71, 81, 85, 87, 90, 17, 32, 34, + 37, 40, 42, 43, 44, 46, 57, 59, 69, 72, 74, 79, 81, 87, 90, 92, 98, 0, 4, 12, 13, 21, 22, 30, + 37, 41, 60, 69, 73, 75, 82, 84, 90, 92, 99, 3, 23, 38, 41, 45, 46, 49, 54, 58, 59, 63, 67, 69, + 71, 76, 80, 81, 84, 93, 98, 2, 12, 13, 19, 22, 23, 30, 35, 39, 40, 51, 57, 70, 78, 83, 85, 90, + 94, 2, 7, 10, 16, 17, 38, 44, 47, 49, 64, 69, 76, 77, 79, 81, 83, 2, 5, 13, 21, 37, 38, 62, + 67, 68, 81, 82, 86, 87, 95, 96, 97, 98, 1, 14, 23, 38, 42, 51, 55, 71, 74, 75, 76, 77, 89, 96, + 2, 4, 11, 13, 14, 16, 20, 21, 25, 30, 31, 40, 60, 75, 94, 3, 13, 25, 30, 31, 36, 38, 40, 66, + 71, 72, 76, 81, 84, 88, 89, 95, 0, 4, 6, 11, 12, 13, 16, 21, 30, 31, 34, 42, 47, 49, 51, 55, + 65, 68, 70, 71, 73, 75, 84, 88, 95, 1, 2, 12, 13, 19, 22, 27, 30, 51, 56, 57, 72, 75, 79, 90, + 91, 98, 0, 3, 8, 11, 19, 21, 22, 29, 40, 42, 47, 49, 50, 55, 57, 61, 63, 77, 83, 88, 90, 91, + 93, 0, 4, 8, 16, 19, 26, 27, 33, 35, 49, 50, 52, 53, 55, 62, 65, 66, 68, 71, 78, 82, 90, 94, + 98, 0, 2, 18, 22, 23, 28, 31, 32, 41, 44, 47, 48, 56, 58, 69, 70, 83, 96, 98, 2, 5, 6, 9, + 21, 22, 34, 50, 62, 65, 66, 69, 72, 79, 84, 6, 9, 12, 14, 23, 27, 31, 50, 56, 58, 59, 67, 76, + 77, 81, 97, 3, 12, 14, 21, 22, 31, 40, 59, 67, 74, 81, 89, 90, 3, 5, 6, 11, 13, 16, 21, 27, + 28, 33, 37, 44, 47, 49, 50, 59, 71, 72, 83, 89, 91, 96, 5, 6, 8, 9, 10, 11, 27, 35, 48, 51, + 53, 62, 65, 74, 2, 3, 4, 18, 32, 35, 38, 41, 48, 49, 64, 66, 74, 86, 87, 94, 95, 98, 2, 5, + 9, 14, 15, 16, 17, 22, 23, 24, 26, 33, 40, 51, 53, 61, 70, 72, 81, 83, 85, 2, 3, 8, 10, 28, + 38, 40, 53, 54, 55, 68, 70, 81, 83, 98, 1, 3, 4, 5, 9, 13, 16, 17, 21, 22, 23, 27, 31, 33, + 39, 45, 60, 62, 70, 77, 80, 82, 83, 84, 85, 86, 98, 0, 4, 7, 12, 20, 30, 49, 58, 61, 62, 63, + 65, 72, 76, 83, 89, 91, 0, 2, 13, 15, 16, 18, 31, 36, 43, 50, 52, 56, 60, 61, 66, 72, 83, 87, + 89, 92, 93, 0, 2, 5, 19, 28, 29, 40, 49, 61, 63, 86, 90, 7, 8, 9, 10, 18, 26, 28, 34, 42, + 57, 72, 74, 82, 87, 88, 96, 99, 1, 2, 7, 9, 16, 17, 19, 21, 34, 47, 50, 52, 56, 61, 67, 83, + 89, 90, 95, 97, 99, 3, 8, 21, 23, 25, 30, 31, 34, 46, 50, 52, 57, 62, 79, 81, 85, 87, 90, 99, + 2, 3, 5, 20, 27, 28, 37, 40, 43, 53, 54, 65, 69, 82, 84, 89, 90, 2, 5, 6, 8, 10, 15, 17, + 21, 26, 28, 30, 34, 43, 47, 50, 59, 69, 70, 79, 88, 97, 1, 6, 15, 18, 27, 38, 39, 40, 42, 51, + 52, 67, 68, 71, 77, 80, 97, 9, 16, 17, 30, 32, 35, 41, 47, 51, 58, 59, 60, 68, 72, 77, 86, 93, + 9, 10, 27, 37, 40, 44, 46, 47, 50, 55, 69, 74, 87, 98, 1, 3, 4, 5, 8, 13, 14, 16, 20, 28, + 31, 35, 38, 46, 48, 52, 55, 58, 61, 62, 64, 70, 77, 78, 82, 86, 89, 99, 1, 6, 13, 15, 23, 24, + 26, 29, 33, 34, 39, 47, 76, 77, 83, 87, 88, 96, 98, 99, 2, 14, 15, 17, 20, 36, 38, 44, 54, 56, + 57, 64, 71, 80, 81, 85, 86, 87, 88, 92, 93, 95, 0, 7, 11, 14, 15, 16, 17, 20, 22, 29, 35, 39, + 44, 45, 47, 48, 78, 85, 90, 92, 94, 99, 0, 1, 3, 5, 18, 20, 28, 36, 40, 42, 44, 46, 53, 61, + 73, 80, 82, 84, 91, 95, 5, 8, 13, 27, 28, 42, 44, 49, 53, 60, 69, 70, 72, 73, 91, 1, 7, 10, + 11, 15, 21, 25, 26, 28, 41, 50, 72, 75, 81, 82, 87, 94, 96, 7, 11, 30, 31, 32, 33, 38, 42, 48, + 52, 66, 68, 82, 0, 1, 11, 15, 20, 23, 40, 60, 69, 74, 76, 80, 93, 3, 7, 9, 19, 27, 34, 37, + 38, 40, 42, 43, 46, 53, 54, 58, 59, 66, 74, 78, 81, 84, 87, 88, 91, 5, 7, 14, 34, 35, 39, 43, + 50, 60, 64, 67, 72, 76, 78, 79, 83, 84, 96, 4, 6, 10, 11, 13, 16, 28, 33, 36, 41, 42, 49, 51, + 55, 58, 59, 60, 61, 62, 65, 73, 82, 84, 86, 97, 3, 10, 13, 16, 21, 24, 28, 39, 40, 46, 47, 52, + 60, 67, 76, 81, 82, 83, 0, 1, 17, 18, 20, 32, 37, 41, 58, 60, 66, 74, 75, 90, 94, 2, 5, 12, + 18, 22, 25, 29, 36, 43, 57, 60, 63, 70, 72, 74, 83, 94, 99, 3, 4, 6, 8, 9, 10, 14, 20, 22, + 28, 29, 31, 33, 37, 38, 43, 57, 62, 64, 66, 71, 73, 74, 78, 81, 91, 94, 95, 99, 0, 3, 11, 19, + 26, 27, 34, 46, 47, 49, 64, 68, 73, 74, 81, 90, 94, 95, 97, 7, 21, 33, 44, 46, 54, 55, 61, 62, + 65, 67, 72, 91, 99, 1, 2, 5, 10, 11, 30, 37, 38, 39, 41, 48, 49, 50, 54, 63, 65, 66, 67, 75, + 85, 88, 91, 96, 0, 2, 15, 16, 18, 23, 34, 48, 49, 55, 61, 76, 77, 81, 87, 89, 90, 97, 0, 2, + 5, 14, 16, 17, 23, 24, 25, 33, 38, 39, 62, 74, 75, 8, 9, 12, 13, 15, 17, 33, 35, 40, 49, 62, + 70, 74, 80, 93, 98, 99, 0, 6, 7, 11, 12, 14, 17, 20, 28, 31, 41, 45, 50, 57, 75, 78, 85, 86, + 87, 88, 95, 7, 15, 17, 30, 35, 43, 46, 47, 57, 65, 74, 76, 87, 88, 94, 0, 15, 33, 43, 44, 51, + 55, 64, 73, 78, 82, 90, 96, 98, 1, 9, 15, 31, 33, 35, 43, 53, 65, 68, 69, 83, 88, 91, 8, 13, + 14, 20, 24, 28, 33, 38, 40, 43, 48, 50, 51, 57, 59, 60, 71, 73, 93, 96, 7, 9, 15, 19, 20, 30, + 33, 39, 64, 65, 66, 72, 73, 75, 86, 87, 89, 93}, + {0.8385492, 0.0887047, 0.4178915, 0.4859754, 0.4469863, 0.2195207, 0.3129920, 0.1031984, + 0.2898832, 0.3742032, 0.0522814, 0.3923617, 0.4283062, 0.2236069, 0.1620676, 0.0181036, + 0.0722899, 0.2825163, 0.2854958, 0.3136983, 0.4021524, 0.3556329, 0.4577443, 0.1463357, + 0.3288944, 0.4404407, 0.3466910, 0.2799277, 0.1813836, 0.4619252, 0.1622771, 0.2565850, + 0.3349850, 0.4806673, 0.2912005, 0.2509201, 0.6396587, 0.5977305, 0.1196116, 0.2077467, + 0.0345871, 0.4918659, 0.4194439, 0.4487811, 0.1682306, 0.3017929, 0.1373989, 0.3152796, + 0.3640917, 0.0489285, 0.4335400, 0.0987368, 0.1548646, 0.2137529, 0.0130792, 0.0752723, + 0.1238085, 0.3553386, 0.4349648, 0.3818015, 0.4697597, 0.4478265, 0.2176154, 0.3768051, + 0.3741169, 0.0550861, 0.3733355, 0.0161616, 0.0404749, 0.0530627, 0.3932415, 0.2313439, + 0.4807387, 0.3860448, 0.0887047, 0.1622771, 0.2646495, 0.4319774, 0.0975544, 0.3953015, + 0.4127654, 0.3950751, 0.0630765, 0.3240158, 0.3895027, 0.0263783, 0.3096741, 0.0810854, + 0.2185860, 0.2931856, 0.4413908, 0.4933484, 0.3265684, 0.3630947, 0.3439550, 0.4709083, + 0.4871525, 0.4059546, 0.2835062, 0.2319805, 0.1080630, 0.1148512, 0.4250860, 0.4319774, + 0.3417962, 0.1542346, 0.1705101, 0.3939655, 0.2228894, 0.2561502, 0.1612249, 0.3348420, + 0.7638237, 0.2223779, 0.1142358, 0.2221761, 0.1023570, 0.0100264, 0.4906516, 0.4211857, + 0.4178915, 0.2112697, 0.0841055, 0.3054300, 0.4681202, 0.3307955, 0.2055745, 0.3013350, + 0.0921099, 0.2272112, 0.4771985, 0.0400448, 0.4924752, 0.3142720, 0.3691756, 0.2582222, + 0.2400539, 0.4489491, 0.5111299, 0.4255019, 0.3747997, 0.1873246, 0.2565850, 0.1914687, + 0.3671139, 0.1276162, 0.3537677, 0.4076773, 0.1181683, 0.7192769, 0.2186738, 0.2885858, + 0.4734213, 0.0072575, 0.0765674, 0.0898227, 0.3649966, 0.2496215, 0.1702205, 0.0710704, + 0.3869004, 0.3349850, 0.1886938, 0.3514959, 0.4643647, 0.4223959, 0.3594954, 0.2522124, + 0.4105392, 0.2470788, 0.2545409, 0.3583593, 0.2345200, 0.0271059, 0.3803033, 0.1930780, + 0.4567223, 0.0613140, 0.2441548, 0.4808156, 0.3853460, 0.4859754, 0.4806673, 0.2801995, + 0.3858915, 0.0090301, 0.4087827, 0.3671360, 0.2667392, 0.4641679, 0.4647529, 0.3445000, + 0.1198545, 0.0282007, 0.1829597, 0.0539266, 0.0914677, 0.1638856, 0.1201562, 0.4388565, + 0.2036911, 0.2046127, 0.4811504, 0.3038480, 0.0642898, 0.2031245, 0.1680801, 0.0394903, + 0.4766186, 0.2023225, 0.0175873, 0.3034133, 0.4123132, 0.0379968, 0.2168891, 0.0675915, + 0.4039690, 0.3417962, 0.2112697, 0.2400451, 0.4558193, 0.1334496, 0.0195393, 0.3627390, + 0.4262152, 0.0403542, 0.3081270, 0.1527164, 0.0121030, 0.6241815, 0.4913400, 0.0157230, + 0.3200969, 0.0437878, 0.3018721, 0.0975544, 0.1886938, 0.8753713, 0.0700827, 0.2364397, + 0.4924574, 0.2563165, 0.1126200, 0.1547797, 0.0241622, 0.3814965, 0.3526533, 0.2161066, + 0.2911978, 0.4464823, 0.3577181, 0.3152088, 0.3317510, 0.2863414, 0.2801995, 0.0700827, + 0.3417172, 0.2610632, 0.4037673, 0.1736438, 0.0880198, 0.4559108, 0.1121846, 0.7814473, + 0.3779829, 0.3405251, 0.1208012, 0.4304054, 0.1807327, 0.0049234, 0.1778966, 0.3514959, + 0.2046946, 0.2997384, 0.2013881, 0.0548181, 0.3352703, 0.2054045, 0.3389475, 0.1449403, + 0.3906285, 0.0580903, 0.3582265, 0.1743012, 0.2712877, 0.4273703, 0.4566499, 0.0667344, + 0.0676206, 0.1248124, 0.0026571, 0.2774455, 0.0032627, 0.1753686, 0.3725724, 0.4469863, + 0.3858915, 0.2046946, 0.3794979, 0.4016317, 0.3370037, 0.0815573, 0.4647915, 0.0563985, + 0.4203163, 0.0915991, 0.0276749, 0.3857849, 0.0461729, 0.3978934, 0.3614717, 0.3266448, + 0.7978231, 0.4209127, 0.2912005, 0.3953015, 0.4388565, 0.3417172, 0.2997384, 0.4108247, + 0.2899171, 0.1479114, 0.4418810, 0.0634220, 0.0929668, 0.4055436, 0.2457036, 0.3701515, + 0.4134036, 0.0947451, 0.2785034, 0.3162361, 0.4036728, 0.3741804, 0.4563937, 0.4904932, + 0.1492740, 0.4887115, 0.4127654, 0.1542346, 0.1914687, 0.0090301, 0.4108247, 0.3533593, + 0.4300368, 0.3572507, 0.1412494, 0.4373029, 0.3273854, 0.2602280, 0.1690700, 0.4756982, + 0.0009060, 0.2393224, 0.0014211, 0.4101384, 0.1580024, 0.0231310, 0.5838791, 0.4132268, + 0.2181222, 0.3529412, 0.3698108, 0.2233849, 0.0987368, 0.2610632, 0.2013881, 0.3533593, + 0.2908257, 0.3609885, 0.2026076, 0.2999429, 0.2079948, 0.2704931, 0.2946429, 0.3154255, + 0.0627621, 0.2774129, 0.4206699, 0.0670598, 0.2860273, 0.3919643, 0.2397596, 0.2703603, + 0.4632739, 0.4124186, 0.5805955, 0.1959839, 0.3950751, 0.0841055, 0.3794979, 0.4300368, + 0.4032480, 0.2078872, 0.0094638, 0.2755707, 0.0376010, 0.4909527, 0.3097841, 0.2355419, + 0.0072671, 0.2746342, 0.0053361, 0.1994108, 0.3969467, 0.2509201, 0.3298818, 0.3886021, + 0.0245763, 0.4638373, 0.4052183, 0.4148478, 0.0242814, 0.2414050, 0.2932298, 0.0475468, + 0.4618716, 0.4032480, 0.8676416, 0.4028524, 0.3012557, 0.1360013, 0.1863026, 0.1490197, + 0.0643736, 0.3395792, 0.2925389, 0.3659366, 0.4948683, 0.4953563, 0.1047673, 0.0355901, + 0.0856992, 0.1778870, 0.0851296, 0.3532749, 0.0398270, 0.0630765, 0.3671139, 0.4643647, + 0.2400451, 0.2364397, 0.4431843, 0.1266264, 0.4763364, 0.7873081, 0.2751093, 0.4222012, + 0.1121367, 0.4474346, 0.3652081, 0.1600931, 0.0614609, 0.0204758, 0.1615355, 0.4293712, + 0.3882434, 0.6431416, 0.0548181, 0.2899171, 0.3634890, 0.4412351, 0.1490288, 0.0447601, + 0.4229826, 0.3807294, 0.0672451, 0.2775799, 0.4666647, 0.4085002, 0.1297752, 0.1563804, + 0.1522877, 0.2532282, 0.2805034, 0.1651538, 0.1046609, 0.1760083, 0.2195207, 0.1705101, + 0.1276162, 0.4558193, 0.4924574, 0.3572507, 0.3401189, 0.0565680, 0.4332137, 0.2150277, + 0.4809324, 0.2783410, 0.1570549, 0.4891155, 0.4529251, 0.2209245, 0.3658022, 0.3961954, + 0.3788675, 0.1621254, 0.3969478, 0.3886663, 0.4372073, 0.3537677, 0.4037673, 0.2908257, + 0.4028524, 0.4431843, 0.7202524, 0.3443225, 0.3538920, 0.3133293, 0.4439365, 0.1412494, + 0.3012557, 0.3634890, 0.3401189, 0.1250412, 0.4831129, 0.0737263, 0.3228796, 0.0975274, + 0.1318027, 0.4008097, 0.1548646, 0.2036911, 0.1334496, 0.4016317, 0.1479114, 0.3609885, + 0.1360013, 0.1494316, 0.4203018, 0.2847606, 0.1855530, 0.3948809, 0.1457941, 0.1710113, + 0.4871747, 0.0616420, 0.2720916, 0.1494316, 0.3342525, 0.4981484, 0.2835164, 0.2201109, + 0.3569505, 0.3228796, 0.2664382, 0.1461955, 0.2912845, 0.2178672, 0.0091858, 0.3888402, + 0.3213883, 0.1017065, 0.2137529, 0.2078872, 0.1863026, 0.0565680, 0.2497744, 0.0917027, + 0.3077455, 0.2898162, 0.1962939, 0.0667715, 0.0511321, 0.4857582, 0.0757288, 0.4719980, + 0.0990155, 0.0358659, 0.3427203, 0.4911953, 0.0026993, 0.3121863, 0.3129920, 0.4076773, + 0.4087827, 0.0195393, 0.3352703, 0.1490197, 0.4412351, 0.4203018, 0.3342525, 0.4991112, + 0.3198876, 0.0273423, 0.1726720, 0.2868139, 0.0167729, 0.3167321, 0.3240158, 0.1181683, + 0.4223959, 0.2054045, 0.4418810, 0.2026076, 0.3298818, 0.4332137, 0.4679078, 0.2938424, + 0.2349892, 0.3265936, 0.4161196, 0.0540847, 0.4671349, 0.4922210, 0.4333457, 0.2783662, + 0.3295173, 0.1414430, 0.4789151, 0.5482149, 0.2405941, 0.0873055, 0.4915100, 0.1031984, + 0.6396587, 0.3054300, 0.4373029, 0.2999429, 0.1490288, 0.2150277, 0.4679078, 0.4463057, + 0.3714156, 0.1611302, 0.3379962, 0.4654491, 0.0994459, 0.4963855, 0.0027219, 0.2011968, + 0.2413642, 0.0713272, 0.0186765, 0.5553801, 0.0508773, 0.4655451, 0.3939655, 0.4681202, + 0.2046127, 0.2079948, 0.0447601, 0.2938424, 0.4463057, 0.4189366, 0.4805591, 0.4724835, + 0.4029289, 0.3810731, 0.3855192, 0.2898832, 0.3895027, 0.3307955, 0.3594954, 0.4811504, + 0.1736438, 0.3370037, 0.2704931, 0.0094638, 0.4229826, 0.2349892, 0.1488369, 0.3299349, + 0.3658398, 0.2805756, 0.1943161, 0.1270155, 0.2077195, 0.1249269, 0.0572191, 0.3217881, + 0.1812549, 0.4356323, 0.2024299, 0.4955283, 0.2777625, 0.0642578, 0.4278218, 0.3742032, + 0.2228894, 0.3627390, 0.0880198, 0.1250412, 0.1488369, 0.6981739, 0.2518100, 0.2364128, + 0.4279115, 0.4212285, 0.4749146, 0.2284694, 0.1864383, 0.0079268, 0.2446150, 0.4631400, + 0.2501489, 0.4844082, 0.0522814, 0.5977305, 0.0263783, 0.2522124, 0.2755707, 0.3886021, + 0.2847606, 0.4991112, 0.0239194, 0.4028964, 0.2294849, 0.2998522, 0.1320064, 0.0275548, + 0.1151714, 0.2652366, 0.2787146, 0.2884416, 0.1149032, 0.3923617, 0.3807294, 0.0540387, + 0.2807390, 0.0142855, 0.3054538, 0.0743166, 0.1352609, 0.3096741, 0.2561502, 0.7192769, + 0.4809324, 0.4981484, 0.3299349, 0.2030550, 0.2820974, 0.3606436, 0.1871530, 0.2116934, + 0.1441479, 0.2874195, 0.3848211, 0.3917919, 0.4778197, 0.2946429, 0.4189366, 0.2518100, + 0.2030550, 0.4912895, 0.1356941, 0.2409017, 0.4399648, 0.2600915, 0.1039219, 0.0522639, + 0.1473574, 0.1156571, 0.2768389, 0.4478964, 0.1246019, 0.1488771, 0.3747582, 0.0281233, + 0.0742416, 0.4283062, 0.1612249, 0.4559108, 0.3389475, 0.1266264, 0.0672451, 0.3265936, + 0.2820974, 0.3309392, 0.0915848, 0.0509763, 0.4962989, 0.4802843, 0.0841302, 0.1918956, + 0.3192275, 0.4662680, 0.1974726, 0.0810854, 0.2783410, 0.4912895, 0.3111583, 0.4521906, + 0.2043965, 0.3393941, 0.2771504, 0.4931641, 0.1747926, 0.0280012, 0.3078630, 0.0456258, + 0.1170995, 0.0880413, 0.2797376, 0.2573348, 0.2639170, 0.3364275, 0.2011374, 0.0130792, + 0.1121846, 0.1449403, 0.0245763, 0.2775799, 0.1570549, 0.4161196, 0.0239194, 0.3309392, + 0.3111583, 0.3020653, 0.0100230, 0.4954931, 0.4227756, 0.3662207, 0.4669757, 0.1495063, + 0.4342381, 0.0752723, 0.4105392, 0.4262152, 0.3273854, 0.3154255, 0.1356941, 0.1063635, + 0.3477053, 0.4418667, 0.4065750, 0.2158301, 0.0978730, 0.3474138, 0.0941925, 0.2502904, + 0.4167871, 0.1238085, 0.2055745, 0.3906285, 0.4763364, 0.3606436, 0.2409017, 0.2856070, + 0.4519934, 0.0640926, 0.3494168, 0.2239768, 0.1506959, 0.3404586, 0.0097513, 0.3356108, + 0.2007709, 0.0563368, 0.1196116, 0.0815573, 0.4891155, 0.4399648, 0.1063635, 0.0469109, + 0.4409516, 0.2269343, 0.1728651, 0.4690269, 0.4568825, 0.3838028, 0.1701081, 0.2478454, + 0.3553386, 0.3348420, 0.2563165, 0.0580903, 0.4647915, 0.2602280, 0.0643736, 0.7873081, + 0.4831129, 0.0540847, 0.3714156, 0.4521906, 0.0529002, 0.1118892, 0.3946897, 0.2185860, + 0.3582265, 0.0737263, 0.4671349, 0.1611302, 0.0540387, 0.2600915, 0.2043965, 0.0178831, + 0.3605796, 0.4215185, 0.3441654, 0.3192719, 0.2912215, 0.2253530, 0.4059448, 0.0770738, + 0.2236069, 0.7638237, 0.2186738, 0.1126200, 0.7814473, 0.1743012, 0.1690700, 0.2751093, + 0.4922210, 0.3379962, 0.2364128, 0.3477053, 0.7218004, 0.3724327, 0.2531753, 0.0252278, + 0.2816279, 0.1346799, 0.1643871, 0.3633022, 0.1110411, 0.2297511, 0.4249687, 0.4478221, + 0.2225533, 0.2077467, 0.4349648, 0.3779829, 0.2712877, 0.4638373, 0.4666647, 0.2835164, + 0.4333457, 0.4028734, 0.3229839, 0.3908435, 0.3720633, 0.3528297, 0.4553215, 0.1170026, + 0.4753753, 0.0282417, 0.1620676, 0.2931856, 0.3671360, 0.1547797, 0.4052183, 0.4222012, + 0.4085002, 0.3198876, 0.3393941, 0.4418667, 0.3724327, 0.0297363, 0.4194855, 0.1562718, + 0.1693750, 0.3152241, 0.3387593, 0.2933232, 0.0599440, 0.1064471, 0.2469246, 0.0528503, + 0.0321264, 0.0181036, 0.2223779, 0.2667392, 0.4756982, 0.4148478, 0.1855530, 0.2201109, + 0.3658398, 0.4028964, 0.4194855, 0.1724464, 0.2184300, 0.4806912, 0.3213868, 0.4946703, + 0.0183148, 0.4068079, 0.3882787, 0.1461515, 0.3377662, 0.1434079, 0.1656042, 0.1153671, + 0.0297401, 0.0722899, 0.3818015, 0.0376010, 0.1297752, 0.4529251, 0.2497744, 0.4654491, + 0.4805591, 0.3020653, 0.0469109, 0.2531753, 0.4028734, 0.3104094, 0.0983794, 0.3041750, + 0.7444220, 0.0469955, 0.4269330, 0.3876660, 0.4697597, 0.3013350, 0.2885858, 0.3038480, + 0.1121367, 0.1563804, 0.4279115, 0.2184300, 0.3897764, 0.1165223, 0.1623044, 0.3694641, + 0.4647038, 0.1950430, 0.0223306, 0.4734213, 0.0642898, 0.3405251, 0.0563985, 0.2209245, + 0.3569505, 0.0994459, 0.4806912, 0.3142114, 0.1688596, 0.2013356, 0.3616973, 0.1345261, + 0.3665765, 0.1457076, 0.2400093, 0.4413908, 0.1208012, 0.4203163, 0.4474346, 0.1522877, + 0.4963855, 0.2771504, 0.3932629, 0.2256821, 0.3466487, 0.1397347, 0.4893270, 0.1162840, + 0.4933484, 0.0921099, 0.0072575, 0.0241622, 0.4273703, 0.0009060, 0.3652081, 0.3228796, + 0.0917027, 0.2805756, 0.1871530, 0.4409516, 0.0252278, 0.1562718, 0.3213868, 0.0526326, + 0.2417610, 0.1361428, 0.4773201, 0.2157922, 0.2075818, 0.1745262, 0.2272112, 0.0765674, + 0.4641679, 0.2031245, 0.0403542, 0.3814965, 0.2664382, 0.2294849, 0.3229839, 0.3104094, + 0.3142114, 0.1920804, 0.3407301, 0.3448193, 0.4478265, 0.3265684, 0.1142358, 0.4909527, + 0.4724835, 0.2998522, 0.1039219, 0.0100230, 0.3908435, 0.1693750, 0.1674092, 0.0846982, + 0.3384884, 0.1067837, 0.3844901, 0.1491689, 0.4107678, 0.5988698, 0.2176154, 0.4771985, + 0.1680801, 0.0915991, 0.0634220, 0.2393224, 0.0627621, 0.2532282, 0.3658022, 0.7202524, + 0.3948809, 0.1943161, 0.4931641, 0.0983794, 0.1688596, 0.4067034, 0.2580674, 0.4757213, + 0.3928346, 0.1995547, 0.2107771, 0.3768051, 0.3630947, 0.4647529, 0.3081270, 0.3077455, + 0.0522639, 0.1747926, 0.2013356, 0.3932629, 0.0526326, 0.3694007, 0.0972740, 0.3075456, + 0.2167318, 0.4610244, 0.0345871, 0.3439550, 0.2221761, 0.0400448, 0.0394903, 0.4566499, + 0.0014211, 0.2774129, 0.1600931, 0.2805034, 0.3961954, 0.1461955, 0.0027219, 0.1270155, + 0.0915848, 0.0529002, 0.0703681, 0.0187762, 0.2613653, 0.1867701, 0.1502444, 0.3600508, + 0.4655130, 0.3398629, 0.4028377, 0.1709328, 0.2641133, 0.2825163, 0.1023570, 0.2470788, + 0.4304054, 0.3395792, 0.2783662, 0.3152241, 0.4067034, 0.9997413, 0.3054797, 0.4133712, + 0.0630975, 0.0166616, 0.3381947, 0.2909326, 0.2139573, 0.0475201, 0.2854958, 0.3741169, + 0.0667344, 0.0929668, 0.4101384, 0.3097841, 0.2011968, 0.2807390, 0.2856070, 0.4946703, + 0.3897764, 0.1920804, 0.0187762, 0.3054797, 0.0461345, 0.2358043, 0.4405020, 0.2239718, + 0.0232168, 0.2595815, 0.1997993, 0.3136983, 0.0550861, 0.4924752, 0.0242814, 0.2898162, + 0.0273423, 0.0280012, 0.3387593, 0.4133712, 0.1691249, 0.4277944, 0.3262424, 0.2545409, + 0.3445000, 0.4766186, 0.1527164, 0.2355419, 0.1457941, 0.1962939, 0.4212285, 0.4065750, + 0.1674092, 0.0040041, 0.3576335, 0.6885277, 0.0684911, 0.0949263, 0.3370988, 0.4251885, + 0.4918659, 0.3733355, 0.3583593, 0.2023225, 0.1580024, 0.4206699, 0.2414050, 0.0614609, + 0.4749146, 0.2816279, 0.0183148, 0.1165223, 0.3407301, 0.0630975, 0.3476292, 0.2974767, + 0.0964920, 0.2228194, 0.2653476, 0.0658719, 0.3992334, 0.4709083, 0.1198545, 0.0204758, + 0.3788675, 0.3228796, 0.3295173, 0.2413642, 0.2284694, 0.0178831, 0.4068079, 0.1623044, + 0.0846982, 0.0461345, 0.1464626, 0.1254936, 0.4546162, 0.0599609, 0.2089537, 0.0068666, + 0.0161616, 0.4871525, 0.3142720, 0.2925389, 0.2912845, 0.0667715, 0.2116934, 0.3078630, + 0.4519934, 0.3616973, 0.2256821, 0.3476292, 0.1306226, 0.2562920, 0.1834991, 0.1524191, + 0.4803574, 0.0404749, 0.3691756, 0.0898227, 0.0282007, 0.0121030, 0.4055436, 0.0670598, + 0.1615355, 0.1710113, 0.0511321, 0.1414430, 0.1864383, 0.0640926, 0.1346799, 0.3882787, + 0.3694007, 0.0812578, 0.3378220, 0.2461788, 0.3674253, 0.4063063, 0.4194439, 0.3649966, + 0.2457036, 0.0072671, 0.2178672, 0.1473574, 0.0509763, 0.0456258, 0.2158301, 0.3041750, + 0.3694641, 0.1306226, 0.0812578, 0.4179677, 0.0273935, 0.1376181, 0.1237823, 0.0175873, + 0.0231310, 0.2860273, 0.4789151, 0.4029289, 0.1320064, 0.4954931, 0.1643871, 0.7444220, + 0.2580674, 0.0972740, 0.2613653, 0.3378220, 0.0734471, 0.5716440, 0.3270837, 0.4374486, + 0.3034133, 0.6241815, 0.0091858, 0.1441479, 0.1170995, 0.2269343, 0.3605796, 0.3633022, + 0.1461515, 0.2417610, 0.4179677, 0.1296077, 0.4877253, 0.1591760, 0.4487811, 0.4059546, + 0.0100264, 0.2582222, 0.1829597, 0.0676206, 0.0276749, 0.5838791, 0.3659366, 0.4857582, + 0.0713272, 0.0275548, 0.1156571, 0.4215185, 0.3720633, 0.4647038, 0.1361428, 0.4757213, + 0.0166616, 0.2358043, 0.0040041, 0.0734471, 0.1602434, 0.0591811, 0.1030985, 0.1983638, + 0.4710790, 0.4003320, 0.1682306, 0.2496215, 0.1248124, 0.3701515, 0.1621254, 0.3443225, + 0.4871747, 0.1726720, 0.2077195, 0.0079268, 0.4962989, 0.1110411, 0.2440522, 0.4165031, + 0.0252984, 0.3045145, 0.4441046, 0.4572209, 0.2415059, 0.4238202, 0.0530627, 0.3857849, + 0.4134036, 0.3919643, 0.4948683, 0.0142855, 0.2768389, 0.1728651, 0.3466487, 0.3448193, + 0.3384884, 0.3576335, 0.1296077, 0.1268078, 0.2563025, 0.1895228, 0.3345918, 0.4166048, + 0.4054141, 0.2596988, 0.4439297, 0.4482521, 0.4021524, 0.2345200, 0.3526533, 0.0461729, + 0.0947451, 0.4132268, 0.2397596, 0.4953563, 0.1651538, 0.2868139, 0.1151714, 0.4802843, + 0.4690269, 0.1118892, 0.2297511, 0.3528297, 0.0649494, 0.1603665, 0.3632484, 0.4808010, + 0.3155171, 0.0421940, 0.3556329, 0.3017929, 0.2835062, 0.2400539, 0.2746342, 0.1047673, + 0.0757288, 0.3054538, 0.0880413, 0.0978730, 0.4568825, 0.3441654, 0.1345261, 0.3381947, + 0.2440522, 0.1453612, 0.0627209, 0.4289585, 0.3434332, 0.1462075, 0.4489491, 0.0539266, + 0.0026571, 0.3888402, 0.4719980, 0.3474138, 0.3838028, 0.2933232, 0.3665765, 0.1867701, + 0.0273935, 0.5716440, 0.1602434, 0.4165031, 0.3889723, 0.1373989, 0.0271059, 0.4913400, + 0.2161066, 0.2785034, 0.4293712, 0.0975274, 0.0616420, 0.0990155, 0.4227756, 0.3377662, + 0.0591811, 0.0649494, 0.4863133, 0.3123243, 0.3094676, 0.4548634, 0.3543404, 0.3803033, + 0.2911978, 0.5482149, 0.0186765, 0.3810731, 0.1249269, 0.4478964, 0.0941925, 0.4553215, + 0.1950430, 0.1464626, 0.2461788, 0.2376485, 0.4577443, 0.3152796, 0.4464823, 0.3162361, + 0.0355901, 0.3969478, 0.2797376, 0.1502444, 0.1376181, 0.1268078, 0.1453612, 0.8429500, + 0.2124143, 0.2319805, 0.1930780, 0.4123132, 0.2932298, 0.3213883, 0.2446150, 0.2874195, + 0.1246019, 0.2573348, 0.2502904, 0.3494168, 0.3192719, 0.1457076, 0.1397347, 0.3928346, + 0.3075456, 0.1254936, 0.2563025, 0.4863133, 0.2630258, 0.1192136, 0.1283403, 0.3361003, + 0.3254332, 0.5111299, 0.4567223, 0.3978934, 0.4631400, 0.2652366, 0.0841302, 0.2239768, + 0.1434079, 0.3600508, 0.6885277, 0.2562920, 0.1030985, 0.0627209, 0.3123243, 0.2376485, + 0.6660228, 0.2737032, 0.0725528, 0.4906516, 0.1702205, 0.0157230, 0.3577181, 0.2774455, + 0.2181222, 0.0358659, 0.0572191, 0.0743166, 0.3662207, 0.4167871, 0.0599440, 0.0469955, + 0.4773201, 0.1995547, 0.2167318, 0.4655130, 0.2909326, 0.4405020, 0.2974767, 0.0252984, + 0.6660228, 0.4688708, 0.4444213, 0.2486204, 0.1080630, 0.3200969, 0.0032627, 0.3529412, + 0.3882434, 0.3538920, 0.3427203, 0.1918956, 0.2639170, 0.2912215, 0.4249687, 0.0223306, + 0.3398629, 0.1834991, 0.4289585, 0.1192136, 0.2737032, 0.4688708, 0.1463357, 0.3640917, + 0.2703603, 0.0053361, 0.0856992, 0.3855192, 0.3848211, 0.4669757, 0.2107771, 0.4028377, + 0.4546162, 0.1895228, 0.1603665, 0.1891034, 0.1633865, 0.3932415, 0.4255019, 0.1807327, + 0.1994108, 0.1046609, 0.1318027, 0.0167729, 0.1352609, 0.1506959, 0.1067837, 0.1709328, + 0.4277944, 0.3270837, 0.1983638, 0.3345918, 0.4444213, 0.4795561, 0.3394504, 0.1148512, + 0.4211857, 0.0710704, 0.0914677, 0.0379968, 0.0437878, 0.3614717, 0.1778870, 0.1760083, + 0.4911953, 0.3167321, 0.5553801, 0.3217881, 0.3917919, 0.1488771, 0.3404586, 0.3844901, + 0.2239718, 0.0684911, 0.0599609, 0.4877253, 0.3045145, 0.4166048, 0.3094676, 0.1283403, + 0.4126990, 0.0727838, 0.3816538, 0.3677183, 0.3288944, 0.4250860, 0.3152088, 0.0475468, + 0.2720916, 0.1017065, 0.2501489, 0.2253530, 0.4478221, 0.1064471, 0.0949263, 0.3674253, + 0.4441046, 0.4054141, 0.3361003, 0.3239112, 0.1663671, 0.0782135, 0.4374697, 0.0613140, + 0.6431416, 0.1812549, 0.1701081, 0.4059448, 0.4893270, 0.2157922, 0.2139573, 0.0232168, + 0.0964920, 0.1524191, 0.4710790, 0.4609937, 0.1566380, 0.0489285, 0.2313439, 0.3747997, + 0.3018721, 0.3317510, 0.2405941, 0.4778197, 0.3747582, 0.3192275, 0.1495063, 0.1170026, + 0.2469246, 0.1656042, 0.1162840, 0.3262424, 0.2228194, 0.2089537, 0.4803574, 0.3632484, + 0.1891034, 0.3239112, 0.1381195, 0.0077237, 0.4404407, 0.4807387, 0.4036728, 0.3698108, + 0.3969467, 0.3886663, 0.4844082, 0.4753753, 0.0528503, 0.2075818, 0.0475201, 0.3434332, + 0.3889723, 0.3254332, 0.4126990, 0.4609937, 0.1381195, 0.0022522, 0.3466910, 0.3860448, + 0.1873246, 0.3266448, 0.2233849, 0.4632739, 0.4372073, 0.3133293, 0.4008097, 0.4356323, + 0.0281233, 0.4662680, 0.2595815, 0.2596988, 0.4808010, 0.1638856, 0.2168891, 0.0049234, + 0.1753686, 0.3741804, 0.4124186, 0.2024299, 0.2787146, 0.3364275, 0.0321264, 0.1997993, + 0.4374486, 0.4439297, 0.2124143, 0.2074694, 0.1906150, 0.1204390, 0.2799277, 0.3869004, + 0.2441548, 0.2863414, 0.1778966, 0.7978231, 0.5805955, 0.0851296, 0.0026993, 0.0508773, + 0.4342381, 0.3946897, 0.1153671, 0.1491689, 0.3155171, 0.4548634, 0.1633865, 0.4795561, + 0.0727838, 0.1663671, 0.1552885, 0.4808156, 0.4563937, 0.1959839, 0.0873055, 0.2884416, + 0.0097513, 0.0770738, 0.2225533, 0.4107678, 0.2653476, 0.4482521, 0.1462075, 0.3816538, + 0.0782135, 0.1552885, 0.1813836, 0.4904932, 0.4955283, 0.3356108, 0.2478454, 0.4269330, + 0.1745262, 0.3370988, 0.4572209, 0.3543404, 0.0725528, 0.0077237, 0.3415696, 0.1628898, + 0.4335400, 0.0675915, 0.1492740, 0.4655451, 0.2777625, 0.1149032, 0.2007709, 0.2400093, + 0.0658719, 0.4063063, 0.1237823, 0.2486204, 0.4374697, 0.0022522, 0.1201562, 0.3725724, + 0.4209127, 0.3532749, 0.4439365, 0.3121863, 0.0642578, 0.0742416, 0.2011374, 0.0563368, + 0.0282417, 0.0297401, 0.3876660, 0.5988698, 0.4610244, 0.2641133, 0.1591760, 0.2415059, + 0.1906150, 0.1628898, 0.3853460, 0.4039690, 0.4887115, 0.4618716, 0.0398270, 0.4915100, + 0.4278218, 0.1974726, 0.4251885, 0.3992334, 0.0068666, 0.4003320, 0.4238202, 0.0421940, + 0.3394504, 0.3677183, 0.1566380, 0.1204390}, + {2.40271478, 5.47778263}}}; + +const std::vector> inputsd_SA = { + {2, + 20, + 100000, + 0, + 0, + 1e-15, + raft::sparse::solver::LANCZOS_WHICH::SA, + 42, + {0, 29, 51, 74, 103, 120, 142, 161, 181, 199, 217, 235, 254, 271, 295, + 314, 338, 364, 388, 405, 417, 437, 458, 478, 501, 511, 522, 539, 554, 574, + 590, 615, 638, 651, 679, 698, 717, 725, 741, 761, 779, 799, 817, 833, 850, + 864, 879, 896, 921, 938, 961, 985, 1004, 1019, 1035, 1048, 1070, 1084, 1102, 1123, + 1138, 1165, 1182, 1203, 1215, 1232, 1253, 1272, 1289, 1310, 1327, 1344, 1358, 1386, 1406, + 1428, 1450, 1470, 1485, 1503, 1516, 1529, 1553, 1571, 1596, 1614, 1629, 1647, 1676, 1695, + 1709, 1732, 1750, 1765, 1782, 1803, 1818, 1832, 1846, 1866, 1884}, + {0, 3, 5, 8, 14, 23, 29, 31, 33, 34, 35, 36, 39, 47, 49, 50, 51, 61, 62, 63, 75, 76, 80, 85, + 88, 91, 92, 94, 96, 1, 3, 6, 7, 8, 15, 19, 31, 35, 44, 48, 60, 65, 69, 72, 73, 76, 78, 80, + 85, 90, 97, 17, 26, 28, 41, 42, 43, 45, 48, 51, 52, 57, 58, 59, 62, 63, 65, 67, 68, 74, 86, 90, + 91, 92, 0, 1, 3, 4, 11, 15, 16, 18, 21, 30, 33, 35, 37, 40, 46, 49, 54, 55, 57, 59, 60, 66, + 67, 72, 76, 81, 84, 87, 88, 3, 10, 16, 23, 32, 34, 37, 39, 45, 47, 50, 57, 60, 61, 72, 83, 87, + 0, 10, 18, 31, 32, 33, 43, 52, 55, 56, 58, 60, 63, 67, 68, 72, 76, 77, 82, 86, 90, 92, 1, 16, + 21, 23, 24, 29, 30, 37, 47, 52, 53, 55, 56, 68, 69, 73, 83, 87, 94, 1, 11, 13, 21, 30, 33, 35, + 42, 61, 64, 65, 75, 78, 79, 81, 82, 89, 94, 95, 99, 0, 1, 12, 14, 16, 29, 49, 50, 56, 59, 64, + 66, 68, 72, 77, 87, 93, 98, 15, 26, 32, 33, 52, 53, 56, 58, 60, 64, 65, 70, 71, 81, 87, 93, 97, + 99, 4, 5, 21, 23, 26, 29, 34, 42, 56, 59, 64, 68, 71, 78, 83, 84, 87, 90, 3, 7, 11, 12, 21, + 23, 45, 47, 49, 55, 56, 75, 78, 79, 80, 83, 88, 90, 94, 8, 11, 15, 17, 24, 33, 34, 39, 41, 47, + 48, 53, 54, 61, 86, 93, 94, 7, 14, 15, 17, 22, 29, 30, 39, 41, 43, 45, 46, 47, 48, 55, 60, 62, + 72, 73, 77, 83, 84, 93, 98, 0, 8, 13, 18, 26, 33, 44, 45, 53, 54, 58, 72, 74, 75, 82, 87, 92, + 94, 98, 1, 3, 9, 12, 13, 16, 22, 26, 30, 58, 62, 68, 69, 73, 74, 75, 78, 80, 91, 93, 95, 96, + 97, 99, 3, 4, 6, 8, 15, 17, 18, 23, 25, 31, 42, 45, 47, 50, 55, 58, 60, 62, 65, 70, 72, 75, + 83, 84, 91, 92, 2, 12, 13, 16, 24, 26, 30, 31, 32, 33, 38, 42, 58, 60, 65, 68, 70, 74, 75, 85, + 92, 93, 94, 95, 3, 5, 14, 16, 20, 28, 33, 35, 51, 57, 62, 64, 69, 76, 85, 86, 91, 1, 30, 35, + 41, 48, 49, 50, 63, 65, 81, 88, 99, 18, 20, 24, 25, 26, 28, 29, 45, 61, 67, 72, 74, 75, 76, 80, + 85, 87, 94, 98, 99, 3, 6, 7, 10, 11, 24, 39, 43, 45, 47, 49, 52, 54, 55, 60, 65, 66, 68, 78, + 84, 89, 13, 15, 25, 29, 31, 32, 33, 36, 39, 41, 48, 49, 51, 52, 54, 58, 60, 75, 86, 87, 0, 4, + 6, 10, 11, 16, 25, 28, 30, 31, 37, 40, 41, 44, 51, 53, 58, 60, 66, 73, 80, 91, 92, 6, 12, 17, + 20, 21, 58, 73, 84, 92, 98, 16, 20, 22, 23, 34, 45, 46, 66, 78, 86, 92, 2, 9, 10, 14, 15, 17, + 20, 27, 29, 35, 50, 58, 64, 68, 73, 78, 88, 26, 29, 37, 48, 50, 53, 55, 56, 60, 67, 69, 71, 77, + 81, 88, 2, 18, 20, 23, 51, 55, 59, 63, 64, 67, 68, 72, 76, 77, 78, 83, 84, 87, 94, 98, 0, 6, + 8, 10, 13, 20, 22, 26, 27, 35, 49, 63, 73, 75, 86, 87, 3, 6, 7, 13, 15, 17, 19, 23, 31, 32, + 33, 39, 41, 45, 46, 47, 48, 61, 66, 68, 70, 79, 90, 95, 99, 0, 1, 5, 16, 17, 22, 23, 30, 32, + 45, 46, 47, 51, 53, 54, 60, 62, 66, 72, 79, 87, 94, 97, 4, 5, 9, 17, 22, 30, 31, 38, 51, 57, + 70, 79, 85, 0, 3, 5, 7, 9, 12, 14, 17, 18, 22, 30, 34, 37, 50, 55, 58, 60, 73, 79, 83, 87, + 89, 92, 93, 96, 97, 98, 99, 0, 4, 10, 12, 25, 33, 34, 38, 47, 52, 64, 65, 66, 68, 73, 81, 82, + 88, 91, 0, 1, 3, 7, 18, 19, 26, 29, 41, 50, 56, 57, 70, 72, 75, 82, 93, 95, 97, 0, 22, 46, + 62, 74, 76, 83, 86, 3, 4, 6, 23, 27, 33, 38, 39, 43, 55, 67, 71, 81, 85, 87, 90, 17, 32, 34, + 37, 40, 42, 43, 44, 46, 57, 59, 69, 72, 74, 79, 81, 87, 90, 92, 98, 0, 4, 12, 13, 21, 22, 30, + 37, 41, 60, 69, 73, 75, 82, 84, 90, 92, 99, 3, 23, 38, 41, 45, 46, 49, 54, 58, 59, 63, 67, 69, + 71, 76, 80, 81, 84, 93, 98, 2, 12, 13, 19, 22, 23, 30, 35, 39, 40, 51, 57, 70, 78, 83, 85, 90, + 94, 2, 7, 10, 16, 17, 38, 44, 47, 49, 64, 69, 76, 77, 79, 81, 83, 2, 5, 13, 21, 37, 38, 62, + 67, 68, 81, 82, 86, 87, 95, 96, 97, 98, 1, 14, 23, 38, 42, 51, 55, 71, 74, 75, 76, 77, 89, 96, + 2, 4, 11, 13, 14, 16, 20, 21, 25, 30, 31, 40, 60, 75, 94, 3, 13, 25, 30, 31, 36, 38, 40, 66, + 71, 72, 76, 81, 84, 88, 89, 95, 0, 4, 6, 11, 12, 13, 16, 21, 30, 31, 34, 42, 47, 49, 51, 55, + 65, 68, 70, 71, 73, 75, 84, 88, 95, 1, 2, 12, 13, 19, 22, 27, 30, 51, 56, 57, 72, 75, 79, 90, + 91, 98, 0, 3, 8, 11, 19, 21, 22, 29, 40, 42, 47, 49, 50, 55, 57, 61, 63, 77, 83, 88, 90, 91, + 93, 0, 4, 8, 16, 19, 26, 27, 33, 35, 49, 50, 52, 53, 55, 62, 65, 66, 68, 71, 78, 82, 90, 94, + 98, 0, 2, 18, 22, 23, 28, 31, 32, 41, 44, 47, 48, 56, 58, 69, 70, 83, 96, 98, 2, 5, 6, 9, + 21, 22, 34, 50, 62, 65, 66, 69, 72, 79, 84, 6, 9, 12, 14, 23, 27, 31, 50, 56, 58, 59, 67, 76, + 77, 81, 97, 3, 12, 14, 21, 22, 31, 40, 59, 67, 74, 81, 89, 90, 3, 5, 6, 11, 13, 16, 21, 27, + 28, 33, 37, 44, 47, 49, 50, 59, 71, 72, 83, 89, 91, 96, 5, 6, 8, 9, 10, 11, 27, 35, 48, 51, + 53, 62, 65, 74, 2, 3, 4, 18, 32, 35, 38, 41, 48, 49, 64, 66, 74, 86, 87, 94, 95, 98, 2, 5, + 9, 14, 15, 16, 17, 22, 23, 24, 26, 33, 40, 51, 53, 61, 70, 72, 81, 83, 85, 2, 3, 8, 10, 28, + 38, 40, 53, 54, 55, 68, 70, 81, 83, 98, 1, 3, 4, 5, 9, 13, 16, 17, 21, 22, 23, 27, 31, 33, + 39, 45, 60, 62, 70, 77, 80, 82, 83, 84, 85, 86, 98, 0, 4, 7, 12, 20, 30, 49, 58, 61, 62, 63, + 65, 72, 76, 83, 89, 91, 0, 2, 13, 15, 16, 18, 31, 36, 43, 50, 52, 56, 60, 61, 66, 72, 83, 87, + 89, 92, 93, 0, 2, 5, 19, 28, 29, 40, 49, 61, 63, 86, 90, 7, 8, 9, 10, 18, 26, 28, 34, 42, + 57, 72, 74, 82, 87, 88, 96, 99, 1, 2, 7, 9, 16, 17, 19, 21, 34, 47, 50, 52, 56, 61, 67, 83, + 89, 90, 95, 97, 99, 3, 8, 21, 23, 25, 30, 31, 34, 46, 50, 52, 57, 62, 79, 81, 85, 87, 90, 99, + 2, 3, 5, 20, 27, 28, 37, 40, 43, 53, 54, 65, 69, 82, 84, 89, 90, 2, 5, 6, 8, 10, 15, 17, + 21, 26, 28, 30, 34, 43, 47, 50, 59, 69, 70, 79, 88, 97, 1, 6, 15, 18, 27, 38, 39, 40, 42, 51, + 52, 67, 68, 71, 77, 80, 97, 9, 16, 17, 30, 32, 35, 41, 47, 51, 58, 59, 60, 68, 72, 77, 86, 93, + 9, 10, 27, 37, 40, 44, 46, 47, 50, 55, 69, 74, 87, 98, 1, 3, 4, 5, 8, 13, 14, 16, 20, 28, + 31, 35, 38, 46, 48, 52, 55, 58, 61, 62, 64, 70, 77, 78, 82, 86, 89, 99, 1, 6, 13, 15, 23, 24, + 26, 29, 33, 34, 39, 47, 76, 77, 83, 87, 88, 96, 98, 99, 2, 14, 15, 17, 20, 36, 38, 44, 54, 56, + 57, 64, 71, 80, 81, 85, 86, 87, 88, 92, 93, 95, 0, 7, 11, 14, 15, 16, 17, 20, 22, 29, 35, 39, + 44, 45, 47, 48, 78, 85, 90, 92, 94, 99, 0, 1, 3, 5, 18, 20, 28, 36, 40, 42, 44, 46, 53, 61, + 73, 80, 82, 84, 91, 95, 5, 8, 13, 27, 28, 42, 44, 49, 53, 60, 69, 70, 72, 73, 91, 1, 7, 10, + 11, 15, 21, 25, 26, 28, 41, 50, 72, 75, 81, 82, 87, 94, 96, 7, 11, 30, 31, 32, 33, 38, 42, 48, + 52, 66, 68, 82, 0, 1, 11, 15, 20, 23, 40, 60, 69, 74, 76, 80, 93, 3, 7, 9, 19, 27, 34, 37, + 38, 40, 42, 43, 46, 53, 54, 58, 59, 66, 74, 78, 81, 84, 87, 88, 91, 5, 7, 14, 34, 35, 39, 43, + 50, 60, 64, 67, 72, 76, 78, 79, 83, 84, 96, 4, 6, 10, 11, 13, 16, 28, 33, 36, 41, 42, 49, 51, + 55, 58, 59, 60, 61, 62, 65, 73, 82, 84, 86, 97, 3, 10, 13, 16, 21, 24, 28, 39, 40, 46, 47, 52, + 60, 67, 76, 81, 82, 83, 0, 1, 17, 18, 20, 32, 37, 41, 58, 60, 66, 74, 75, 90, 94, 2, 5, 12, + 18, 22, 25, 29, 36, 43, 57, 60, 63, 70, 72, 74, 83, 94, 99, 3, 4, 6, 8, 9, 10, 14, 20, 22, + 28, 29, 31, 33, 37, 38, 43, 57, 62, 64, 66, 71, 73, 74, 78, 81, 91, 94, 95, 99, 0, 3, 11, 19, + 26, 27, 34, 46, 47, 49, 64, 68, 73, 74, 81, 90, 94, 95, 97, 7, 21, 33, 44, 46, 54, 55, 61, 62, + 65, 67, 72, 91, 99, 1, 2, 5, 10, 11, 30, 37, 38, 39, 41, 48, 49, 50, 54, 63, 65, 66, 67, 75, + 85, 88, 91, 96, 0, 2, 15, 16, 18, 23, 34, 48, 49, 55, 61, 76, 77, 81, 87, 89, 90, 97, 0, 2, + 5, 14, 16, 17, 23, 24, 25, 33, 38, 39, 62, 74, 75, 8, 9, 12, 13, 15, 17, 33, 35, 40, 49, 62, + 70, 74, 80, 93, 98, 99, 0, 6, 7, 11, 12, 14, 17, 20, 28, 31, 41, 45, 50, 57, 75, 78, 85, 86, + 87, 88, 95, 7, 15, 17, 30, 35, 43, 46, 47, 57, 65, 74, 76, 87, 88, 94, 0, 15, 33, 43, 44, 51, + 55, 64, 73, 78, 82, 90, 96, 98, 1, 9, 15, 31, 33, 35, 43, 53, 65, 68, 69, 83, 88, 91, 8, 13, + 14, 20, 24, 28, 33, 38, 40, 43, 48, 50, 51, 57, 59, 60, 71, 73, 93, 96, 7, 9, 15, 19, 20, 30, + 33, 39, 64, 65, 66, 72, 73, 75, 86, 87, 89, 93}, + {0.8385492, 0.0887047, 0.4178915, 0.4859754, 0.4469863, 0.2195207, 0.3129920, 0.1031984, + 0.2898832, 0.3742032, 0.0522814, 0.3923617, 0.4283062, 0.2236069, 0.1620676, 0.0181036, + 0.0722899, 0.2825163, 0.2854958, 0.3136983, 0.4021524, 0.3556329, 0.4577443, 0.1463357, + 0.3288944, 0.4404407, 0.3466910, 0.2799277, 0.1813836, 0.4619252, 0.1622771, 0.2565850, + 0.3349850, 0.4806673, 0.2912005, 0.2509201, 0.6396587, 0.5977305, 0.1196116, 0.2077467, + 0.0345871, 0.4918659, 0.4194439, 0.4487811, 0.1682306, 0.3017929, 0.1373989, 0.3152796, + 0.3640917, 0.0489285, 0.4335400, 0.0987368, 0.1548646, 0.2137529, 0.0130792, 0.0752723, + 0.1238085, 0.3553386, 0.4349648, 0.3818015, 0.4697597, 0.4478265, 0.2176154, 0.3768051, + 0.3741169, 0.0550861, 0.3733355, 0.0161616, 0.0404749, 0.0530627, 0.3932415, 0.2313439, + 0.4807387, 0.3860448, 0.0887047, 0.1622771, 0.2646495, 0.4319774, 0.0975544, 0.3953015, + 0.4127654, 0.3950751, 0.0630765, 0.3240158, 0.3895027, 0.0263783, 0.3096741, 0.0810854, + 0.2185860, 0.2931856, 0.4413908, 0.4933484, 0.3265684, 0.3630947, 0.3439550, 0.4709083, + 0.4871525, 0.4059546, 0.2835062, 0.2319805, 0.1080630, 0.1148512, 0.4250860, 0.4319774, + 0.3417962, 0.1542346, 0.1705101, 0.3939655, 0.2228894, 0.2561502, 0.1612249, 0.3348420, + 0.7638237, 0.2223779, 0.1142358, 0.2221761, 0.1023570, 0.0100264, 0.4906516, 0.4211857, + 0.4178915, 0.2112697, 0.0841055, 0.3054300, 0.4681202, 0.3307955, 0.2055745, 0.3013350, + 0.0921099, 0.2272112, 0.4771985, 0.0400448, 0.4924752, 0.3142720, 0.3691756, 0.2582222, + 0.2400539, 0.4489491, 0.5111299, 0.4255019, 0.3747997, 0.1873246, 0.2565850, 0.1914687, + 0.3671139, 0.1276162, 0.3537677, 0.4076773, 0.1181683, 0.7192769, 0.2186738, 0.2885858, + 0.4734213, 0.0072575, 0.0765674, 0.0898227, 0.3649966, 0.2496215, 0.1702205, 0.0710704, + 0.3869004, 0.3349850, 0.1886938, 0.3514959, 0.4643647, 0.4223959, 0.3594954, 0.2522124, + 0.4105392, 0.2470788, 0.2545409, 0.3583593, 0.2345200, 0.0271059, 0.3803033, 0.1930780, + 0.4567223, 0.0613140, 0.2441548, 0.4808156, 0.3853460, 0.4859754, 0.4806673, 0.2801995, + 0.3858915, 0.0090301, 0.4087827, 0.3671360, 0.2667392, 0.4641679, 0.4647529, 0.3445000, + 0.1198545, 0.0282007, 0.1829597, 0.0539266, 0.0914677, 0.1638856, 0.1201562, 0.4388565, + 0.2036911, 0.2046127, 0.4811504, 0.3038480, 0.0642898, 0.2031245, 0.1680801, 0.0394903, + 0.4766186, 0.2023225, 0.0175873, 0.3034133, 0.4123132, 0.0379968, 0.2168891, 0.0675915, + 0.4039690, 0.3417962, 0.2112697, 0.2400451, 0.4558193, 0.1334496, 0.0195393, 0.3627390, + 0.4262152, 0.0403542, 0.3081270, 0.1527164, 0.0121030, 0.6241815, 0.4913400, 0.0157230, + 0.3200969, 0.0437878, 0.3018721, 0.0975544, 0.1886938, 0.8753713, 0.0700827, 0.2364397, + 0.4924574, 0.2563165, 0.1126200, 0.1547797, 0.0241622, 0.3814965, 0.3526533, 0.2161066, + 0.2911978, 0.4464823, 0.3577181, 0.3152088, 0.3317510, 0.2863414, 0.2801995, 0.0700827, + 0.3417172, 0.2610632, 0.4037673, 0.1736438, 0.0880198, 0.4559108, 0.1121846, 0.7814473, + 0.3779829, 0.3405251, 0.1208012, 0.4304054, 0.1807327, 0.0049234, 0.1778966, 0.3514959, + 0.2046946, 0.2997384, 0.2013881, 0.0548181, 0.3352703, 0.2054045, 0.3389475, 0.1449403, + 0.3906285, 0.0580903, 0.3582265, 0.1743012, 0.2712877, 0.4273703, 0.4566499, 0.0667344, + 0.0676206, 0.1248124, 0.0026571, 0.2774455, 0.0032627, 0.1753686, 0.3725724, 0.4469863, + 0.3858915, 0.2046946, 0.3794979, 0.4016317, 0.3370037, 0.0815573, 0.4647915, 0.0563985, + 0.4203163, 0.0915991, 0.0276749, 0.3857849, 0.0461729, 0.3978934, 0.3614717, 0.3266448, + 0.7978231, 0.4209127, 0.2912005, 0.3953015, 0.4388565, 0.3417172, 0.2997384, 0.4108247, + 0.2899171, 0.1479114, 0.4418810, 0.0634220, 0.0929668, 0.4055436, 0.2457036, 0.3701515, + 0.4134036, 0.0947451, 0.2785034, 0.3162361, 0.4036728, 0.3741804, 0.4563937, 0.4904932, + 0.1492740, 0.4887115, 0.4127654, 0.1542346, 0.1914687, 0.0090301, 0.4108247, 0.3533593, + 0.4300368, 0.3572507, 0.1412494, 0.4373029, 0.3273854, 0.2602280, 0.1690700, 0.4756982, + 0.0009060, 0.2393224, 0.0014211, 0.4101384, 0.1580024, 0.0231310, 0.5838791, 0.4132268, + 0.2181222, 0.3529412, 0.3698108, 0.2233849, 0.0987368, 0.2610632, 0.2013881, 0.3533593, + 0.2908257, 0.3609885, 0.2026076, 0.2999429, 0.2079948, 0.2704931, 0.2946429, 0.3154255, + 0.0627621, 0.2774129, 0.4206699, 0.0670598, 0.2860273, 0.3919643, 0.2397596, 0.2703603, + 0.4632739, 0.4124186, 0.5805955, 0.1959839, 0.3950751, 0.0841055, 0.3794979, 0.4300368, + 0.4032480, 0.2078872, 0.0094638, 0.2755707, 0.0376010, 0.4909527, 0.3097841, 0.2355419, + 0.0072671, 0.2746342, 0.0053361, 0.1994108, 0.3969467, 0.2509201, 0.3298818, 0.3886021, + 0.0245763, 0.4638373, 0.4052183, 0.4148478, 0.0242814, 0.2414050, 0.2932298, 0.0475468, + 0.4618716, 0.4032480, 0.8676416, 0.4028524, 0.3012557, 0.1360013, 0.1863026, 0.1490197, + 0.0643736, 0.3395792, 0.2925389, 0.3659366, 0.4948683, 0.4953563, 0.1047673, 0.0355901, + 0.0856992, 0.1778870, 0.0851296, 0.3532749, 0.0398270, 0.0630765, 0.3671139, 0.4643647, + 0.2400451, 0.2364397, 0.4431843, 0.1266264, 0.4763364, 0.7873081, 0.2751093, 0.4222012, + 0.1121367, 0.4474346, 0.3652081, 0.1600931, 0.0614609, 0.0204758, 0.1615355, 0.4293712, + 0.3882434, 0.6431416, 0.0548181, 0.2899171, 0.3634890, 0.4412351, 0.1490288, 0.0447601, + 0.4229826, 0.3807294, 0.0672451, 0.2775799, 0.4666647, 0.4085002, 0.1297752, 0.1563804, + 0.1522877, 0.2532282, 0.2805034, 0.1651538, 0.1046609, 0.1760083, 0.2195207, 0.1705101, + 0.1276162, 0.4558193, 0.4924574, 0.3572507, 0.3401189, 0.0565680, 0.4332137, 0.2150277, + 0.4809324, 0.2783410, 0.1570549, 0.4891155, 0.4529251, 0.2209245, 0.3658022, 0.3961954, + 0.3788675, 0.1621254, 0.3969478, 0.3886663, 0.4372073, 0.3537677, 0.4037673, 0.2908257, + 0.4028524, 0.4431843, 0.7202524, 0.3443225, 0.3538920, 0.3133293, 0.4439365, 0.1412494, + 0.3012557, 0.3634890, 0.3401189, 0.1250412, 0.4831129, 0.0737263, 0.3228796, 0.0975274, + 0.1318027, 0.4008097, 0.1548646, 0.2036911, 0.1334496, 0.4016317, 0.1479114, 0.3609885, + 0.1360013, 0.1494316, 0.4203018, 0.2847606, 0.1855530, 0.3948809, 0.1457941, 0.1710113, + 0.4871747, 0.0616420, 0.2720916, 0.1494316, 0.3342525, 0.4981484, 0.2835164, 0.2201109, + 0.3569505, 0.3228796, 0.2664382, 0.1461955, 0.2912845, 0.2178672, 0.0091858, 0.3888402, + 0.3213883, 0.1017065, 0.2137529, 0.2078872, 0.1863026, 0.0565680, 0.2497744, 0.0917027, + 0.3077455, 0.2898162, 0.1962939, 0.0667715, 0.0511321, 0.4857582, 0.0757288, 0.4719980, + 0.0990155, 0.0358659, 0.3427203, 0.4911953, 0.0026993, 0.3121863, 0.3129920, 0.4076773, + 0.4087827, 0.0195393, 0.3352703, 0.1490197, 0.4412351, 0.4203018, 0.3342525, 0.4991112, + 0.3198876, 0.0273423, 0.1726720, 0.2868139, 0.0167729, 0.3167321, 0.3240158, 0.1181683, + 0.4223959, 0.2054045, 0.4418810, 0.2026076, 0.3298818, 0.4332137, 0.4679078, 0.2938424, + 0.2349892, 0.3265936, 0.4161196, 0.0540847, 0.4671349, 0.4922210, 0.4333457, 0.2783662, + 0.3295173, 0.1414430, 0.4789151, 0.5482149, 0.2405941, 0.0873055, 0.4915100, 0.1031984, + 0.6396587, 0.3054300, 0.4373029, 0.2999429, 0.1490288, 0.2150277, 0.4679078, 0.4463057, + 0.3714156, 0.1611302, 0.3379962, 0.4654491, 0.0994459, 0.4963855, 0.0027219, 0.2011968, + 0.2413642, 0.0713272, 0.0186765, 0.5553801, 0.0508773, 0.4655451, 0.3939655, 0.4681202, + 0.2046127, 0.2079948, 0.0447601, 0.2938424, 0.4463057, 0.4189366, 0.4805591, 0.4724835, + 0.4029289, 0.3810731, 0.3855192, 0.2898832, 0.3895027, 0.3307955, 0.3594954, 0.4811504, + 0.1736438, 0.3370037, 0.2704931, 0.0094638, 0.4229826, 0.2349892, 0.1488369, 0.3299349, + 0.3658398, 0.2805756, 0.1943161, 0.1270155, 0.2077195, 0.1249269, 0.0572191, 0.3217881, + 0.1812549, 0.4356323, 0.2024299, 0.4955283, 0.2777625, 0.0642578, 0.4278218, 0.3742032, + 0.2228894, 0.3627390, 0.0880198, 0.1250412, 0.1488369, 0.6981739, 0.2518100, 0.2364128, + 0.4279115, 0.4212285, 0.4749146, 0.2284694, 0.1864383, 0.0079268, 0.2446150, 0.4631400, + 0.2501489, 0.4844082, 0.0522814, 0.5977305, 0.0263783, 0.2522124, 0.2755707, 0.3886021, + 0.2847606, 0.4991112, 0.0239194, 0.4028964, 0.2294849, 0.2998522, 0.1320064, 0.0275548, + 0.1151714, 0.2652366, 0.2787146, 0.2884416, 0.1149032, 0.3923617, 0.3807294, 0.0540387, + 0.2807390, 0.0142855, 0.3054538, 0.0743166, 0.1352609, 0.3096741, 0.2561502, 0.7192769, + 0.4809324, 0.4981484, 0.3299349, 0.2030550, 0.2820974, 0.3606436, 0.1871530, 0.2116934, + 0.1441479, 0.2874195, 0.3848211, 0.3917919, 0.4778197, 0.2946429, 0.4189366, 0.2518100, + 0.2030550, 0.4912895, 0.1356941, 0.2409017, 0.4399648, 0.2600915, 0.1039219, 0.0522639, + 0.1473574, 0.1156571, 0.2768389, 0.4478964, 0.1246019, 0.1488771, 0.3747582, 0.0281233, + 0.0742416, 0.4283062, 0.1612249, 0.4559108, 0.3389475, 0.1266264, 0.0672451, 0.3265936, + 0.2820974, 0.3309392, 0.0915848, 0.0509763, 0.4962989, 0.4802843, 0.0841302, 0.1918956, + 0.3192275, 0.4662680, 0.1974726, 0.0810854, 0.2783410, 0.4912895, 0.3111583, 0.4521906, + 0.2043965, 0.3393941, 0.2771504, 0.4931641, 0.1747926, 0.0280012, 0.3078630, 0.0456258, + 0.1170995, 0.0880413, 0.2797376, 0.2573348, 0.2639170, 0.3364275, 0.2011374, 0.0130792, + 0.1121846, 0.1449403, 0.0245763, 0.2775799, 0.1570549, 0.4161196, 0.0239194, 0.3309392, + 0.3111583, 0.3020653, 0.0100230, 0.4954931, 0.4227756, 0.3662207, 0.4669757, 0.1495063, + 0.4342381, 0.0752723, 0.4105392, 0.4262152, 0.3273854, 0.3154255, 0.1356941, 0.1063635, + 0.3477053, 0.4418667, 0.4065750, 0.2158301, 0.0978730, 0.3474138, 0.0941925, 0.2502904, + 0.4167871, 0.1238085, 0.2055745, 0.3906285, 0.4763364, 0.3606436, 0.2409017, 0.2856070, + 0.4519934, 0.0640926, 0.3494168, 0.2239768, 0.1506959, 0.3404586, 0.0097513, 0.3356108, + 0.2007709, 0.0563368, 0.1196116, 0.0815573, 0.4891155, 0.4399648, 0.1063635, 0.0469109, + 0.4409516, 0.2269343, 0.1728651, 0.4690269, 0.4568825, 0.3838028, 0.1701081, 0.2478454, + 0.3553386, 0.3348420, 0.2563165, 0.0580903, 0.4647915, 0.2602280, 0.0643736, 0.7873081, + 0.4831129, 0.0540847, 0.3714156, 0.4521906, 0.0529002, 0.1118892, 0.3946897, 0.2185860, + 0.3582265, 0.0737263, 0.4671349, 0.1611302, 0.0540387, 0.2600915, 0.2043965, 0.0178831, + 0.3605796, 0.4215185, 0.3441654, 0.3192719, 0.2912215, 0.2253530, 0.4059448, 0.0770738, + 0.2236069, 0.7638237, 0.2186738, 0.1126200, 0.7814473, 0.1743012, 0.1690700, 0.2751093, + 0.4922210, 0.3379962, 0.2364128, 0.3477053, 0.7218004, 0.3724327, 0.2531753, 0.0252278, + 0.2816279, 0.1346799, 0.1643871, 0.3633022, 0.1110411, 0.2297511, 0.4249687, 0.4478221, + 0.2225533, 0.2077467, 0.4349648, 0.3779829, 0.2712877, 0.4638373, 0.4666647, 0.2835164, + 0.4333457, 0.4028734, 0.3229839, 0.3908435, 0.3720633, 0.3528297, 0.4553215, 0.1170026, + 0.4753753, 0.0282417, 0.1620676, 0.2931856, 0.3671360, 0.1547797, 0.4052183, 0.4222012, + 0.4085002, 0.3198876, 0.3393941, 0.4418667, 0.3724327, 0.0297363, 0.4194855, 0.1562718, + 0.1693750, 0.3152241, 0.3387593, 0.2933232, 0.0599440, 0.1064471, 0.2469246, 0.0528503, + 0.0321264, 0.0181036, 0.2223779, 0.2667392, 0.4756982, 0.4148478, 0.1855530, 0.2201109, + 0.3658398, 0.4028964, 0.4194855, 0.1724464, 0.2184300, 0.4806912, 0.3213868, 0.4946703, + 0.0183148, 0.4068079, 0.3882787, 0.1461515, 0.3377662, 0.1434079, 0.1656042, 0.1153671, + 0.0297401, 0.0722899, 0.3818015, 0.0376010, 0.1297752, 0.4529251, 0.2497744, 0.4654491, + 0.4805591, 0.3020653, 0.0469109, 0.2531753, 0.4028734, 0.3104094, 0.0983794, 0.3041750, + 0.7444220, 0.0469955, 0.4269330, 0.3876660, 0.4697597, 0.3013350, 0.2885858, 0.3038480, + 0.1121367, 0.1563804, 0.4279115, 0.2184300, 0.3897764, 0.1165223, 0.1623044, 0.3694641, + 0.4647038, 0.1950430, 0.0223306, 0.4734213, 0.0642898, 0.3405251, 0.0563985, 0.2209245, + 0.3569505, 0.0994459, 0.4806912, 0.3142114, 0.1688596, 0.2013356, 0.3616973, 0.1345261, + 0.3665765, 0.1457076, 0.2400093, 0.4413908, 0.1208012, 0.4203163, 0.4474346, 0.1522877, + 0.4963855, 0.2771504, 0.3932629, 0.2256821, 0.3466487, 0.1397347, 0.4893270, 0.1162840, + 0.4933484, 0.0921099, 0.0072575, 0.0241622, 0.4273703, 0.0009060, 0.3652081, 0.3228796, + 0.0917027, 0.2805756, 0.1871530, 0.4409516, 0.0252278, 0.1562718, 0.3213868, 0.0526326, + 0.2417610, 0.1361428, 0.4773201, 0.2157922, 0.2075818, 0.1745262, 0.2272112, 0.0765674, + 0.4641679, 0.2031245, 0.0403542, 0.3814965, 0.2664382, 0.2294849, 0.3229839, 0.3104094, + 0.3142114, 0.1920804, 0.3407301, 0.3448193, 0.4478265, 0.3265684, 0.1142358, 0.4909527, + 0.4724835, 0.2998522, 0.1039219, 0.0100230, 0.3908435, 0.1693750, 0.1674092, 0.0846982, + 0.3384884, 0.1067837, 0.3844901, 0.1491689, 0.4107678, 0.5988698, 0.2176154, 0.4771985, + 0.1680801, 0.0915991, 0.0634220, 0.2393224, 0.0627621, 0.2532282, 0.3658022, 0.7202524, + 0.3948809, 0.1943161, 0.4931641, 0.0983794, 0.1688596, 0.4067034, 0.2580674, 0.4757213, + 0.3928346, 0.1995547, 0.2107771, 0.3768051, 0.3630947, 0.4647529, 0.3081270, 0.3077455, + 0.0522639, 0.1747926, 0.2013356, 0.3932629, 0.0526326, 0.3694007, 0.0972740, 0.3075456, + 0.2167318, 0.4610244, 0.0345871, 0.3439550, 0.2221761, 0.0400448, 0.0394903, 0.4566499, + 0.0014211, 0.2774129, 0.1600931, 0.2805034, 0.3961954, 0.1461955, 0.0027219, 0.1270155, + 0.0915848, 0.0529002, 0.0703681, 0.0187762, 0.2613653, 0.1867701, 0.1502444, 0.3600508, + 0.4655130, 0.3398629, 0.4028377, 0.1709328, 0.2641133, 0.2825163, 0.1023570, 0.2470788, + 0.4304054, 0.3395792, 0.2783662, 0.3152241, 0.4067034, 0.9997413, 0.3054797, 0.4133712, + 0.0630975, 0.0166616, 0.3381947, 0.2909326, 0.2139573, 0.0475201, 0.2854958, 0.3741169, + 0.0667344, 0.0929668, 0.4101384, 0.3097841, 0.2011968, 0.2807390, 0.2856070, 0.4946703, + 0.3897764, 0.1920804, 0.0187762, 0.3054797, 0.0461345, 0.2358043, 0.4405020, 0.2239718, + 0.0232168, 0.2595815, 0.1997993, 0.3136983, 0.0550861, 0.4924752, 0.0242814, 0.2898162, + 0.0273423, 0.0280012, 0.3387593, 0.4133712, 0.1691249, 0.4277944, 0.3262424, 0.2545409, + 0.3445000, 0.4766186, 0.1527164, 0.2355419, 0.1457941, 0.1962939, 0.4212285, 0.4065750, + 0.1674092, 0.0040041, 0.3576335, 0.6885277, 0.0684911, 0.0949263, 0.3370988, 0.4251885, + 0.4918659, 0.3733355, 0.3583593, 0.2023225, 0.1580024, 0.4206699, 0.2414050, 0.0614609, + 0.4749146, 0.2816279, 0.0183148, 0.1165223, 0.3407301, 0.0630975, 0.3476292, 0.2974767, + 0.0964920, 0.2228194, 0.2653476, 0.0658719, 0.3992334, 0.4709083, 0.1198545, 0.0204758, + 0.3788675, 0.3228796, 0.3295173, 0.2413642, 0.2284694, 0.0178831, 0.4068079, 0.1623044, + 0.0846982, 0.0461345, 0.1464626, 0.1254936, 0.4546162, 0.0599609, 0.2089537, 0.0068666, + 0.0161616, 0.4871525, 0.3142720, 0.2925389, 0.2912845, 0.0667715, 0.2116934, 0.3078630, + 0.4519934, 0.3616973, 0.2256821, 0.3476292, 0.1306226, 0.2562920, 0.1834991, 0.1524191, + 0.4803574, 0.0404749, 0.3691756, 0.0898227, 0.0282007, 0.0121030, 0.4055436, 0.0670598, + 0.1615355, 0.1710113, 0.0511321, 0.1414430, 0.1864383, 0.0640926, 0.1346799, 0.3882787, + 0.3694007, 0.0812578, 0.3378220, 0.2461788, 0.3674253, 0.4063063, 0.4194439, 0.3649966, + 0.2457036, 0.0072671, 0.2178672, 0.1473574, 0.0509763, 0.0456258, 0.2158301, 0.3041750, + 0.3694641, 0.1306226, 0.0812578, 0.4179677, 0.0273935, 0.1376181, 0.1237823, 0.0175873, + 0.0231310, 0.2860273, 0.4789151, 0.4029289, 0.1320064, 0.4954931, 0.1643871, 0.7444220, + 0.2580674, 0.0972740, 0.2613653, 0.3378220, 0.0734471, 0.5716440, 0.3270837, 0.4374486, + 0.3034133, 0.6241815, 0.0091858, 0.1441479, 0.1170995, 0.2269343, 0.3605796, 0.3633022, + 0.1461515, 0.2417610, 0.4179677, 0.1296077, 0.4877253, 0.1591760, 0.4487811, 0.4059546, + 0.0100264, 0.2582222, 0.1829597, 0.0676206, 0.0276749, 0.5838791, 0.3659366, 0.4857582, + 0.0713272, 0.0275548, 0.1156571, 0.4215185, 0.3720633, 0.4647038, 0.1361428, 0.4757213, + 0.0166616, 0.2358043, 0.0040041, 0.0734471, 0.1602434, 0.0591811, 0.1030985, 0.1983638, + 0.4710790, 0.4003320, 0.1682306, 0.2496215, 0.1248124, 0.3701515, 0.1621254, 0.3443225, + 0.4871747, 0.1726720, 0.2077195, 0.0079268, 0.4962989, 0.1110411, 0.2440522, 0.4165031, + 0.0252984, 0.3045145, 0.4441046, 0.4572209, 0.2415059, 0.4238202, 0.0530627, 0.3857849, + 0.4134036, 0.3919643, 0.4948683, 0.0142855, 0.2768389, 0.1728651, 0.3466487, 0.3448193, + 0.3384884, 0.3576335, 0.1296077, 0.1268078, 0.2563025, 0.1895228, 0.3345918, 0.4166048, + 0.4054141, 0.2596988, 0.4439297, 0.4482521, 0.4021524, 0.2345200, 0.3526533, 0.0461729, + 0.0947451, 0.4132268, 0.2397596, 0.4953563, 0.1651538, 0.2868139, 0.1151714, 0.4802843, + 0.4690269, 0.1118892, 0.2297511, 0.3528297, 0.0649494, 0.1603665, 0.3632484, 0.4808010, + 0.3155171, 0.0421940, 0.3556329, 0.3017929, 0.2835062, 0.2400539, 0.2746342, 0.1047673, + 0.0757288, 0.3054538, 0.0880413, 0.0978730, 0.4568825, 0.3441654, 0.1345261, 0.3381947, + 0.2440522, 0.1453612, 0.0627209, 0.4289585, 0.3434332, 0.1462075, 0.4489491, 0.0539266, + 0.0026571, 0.3888402, 0.4719980, 0.3474138, 0.3838028, 0.2933232, 0.3665765, 0.1867701, + 0.0273935, 0.5716440, 0.1602434, 0.4165031, 0.3889723, 0.1373989, 0.0271059, 0.4913400, + 0.2161066, 0.2785034, 0.4293712, 0.0975274, 0.0616420, 0.0990155, 0.4227756, 0.3377662, + 0.0591811, 0.0649494, 0.4863133, 0.3123243, 0.3094676, 0.4548634, 0.3543404, 0.3803033, + 0.2911978, 0.5482149, 0.0186765, 0.3810731, 0.1249269, 0.4478964, 0.0941925, 0.4553215, + 0.1950430, 0.1464626, 0.2461788, 0.2376485, 0.4577443, 0.3152796, 0.4464823, 0.3162361, + 0.0355901, 0.3969478, 0.2797376, 0.1502444, 0.1376181, 0.1268078, 0.1453612, 0.8429500, + 0.2124143, 0.2319805, 0.1930780, 0.4123132, 0.2932298, 0.3213883, 0.2446150, 0.2874195, + 0.1246019, 0.2573348, 0.2502904, 0.3494168, 0.3192719, 0.1457076, 0.1397347, 0.3928346, + 0.3075456, 0.1254936, 0.2563025, 0.4863133, 0.2630258, 0.1192136, 0.1283403, 0.3361003, + 0.3254332, 0.5111299, 0.4567223, 0.3978934, 0.4631400, 0.2652366, 0.0841302, 0.2239768, + 0.1434079, 0.3600508, 0.6885277, 0.2562920, 0.1030985, 0.0627209, 0.3123243, 0.2376485, + 0.6660228, 0.2737032, 0.0725528, 0.4906516, 0.1702205, 0.0157230, 0.3577181, 0.2774455, + 0.2181222, 0.0358659, 0.0572191, 0.0743166, 0.3662207, 0.4167871, 0.0599440, 0.0469955, + 0.4773201, 0.1995547, 0.2167318, 0.4655130, 0.2909326, 0.4405020, 0.2974767, 0.0252984, + 0.6660228, 0.4688708, 0.4444213, 0.2486204, 0.1080630, 0.3200969, 0.0032627, 0.3529412, + 0.3882434, 0.3538920, 0.3427203, 0.1918956, 0.2639170, 0.2912215, 0.4249687, 0.0223306, + 0.3398629, 0.1834991, 0.4289585, 0.1192136, 0.2737032, 0.4688708, 0.1463357, 0.3640917, + 0.2703603, 0.0053361, 0.0856992, 0.3855192, 0.3848211, 0.4669757, 0.2107771, 0.4028377, + 0.4546162, 0.1895228, 0.1603665, 0.1891034, 0.1633865, 0.3932415, 0.4255019, 0.1807327, + 0.1994108, 0.1046609, 0.1318027, 0.0167729, 0.1352609, 0.1506959, 0.1067837, 0.1709328, + 0.4277944, 0.3270837, 0.1983638, 0.3345918, 0.4444213, 0.4795561, 0.3394504, 0.1148512, + 0.4211857, 0.0710704, 0.0914677, 0.0379968, 0.0437878, 0.3614717, 0.1778870, 0.1760083, + 0.4911953, 0.3167321, 0.5553801, 0.3217881, 0.3917919, 0.1488771, 0.3404586, 0.3844901, + 0.2239718, 0.0684911, 0.0599609, 0.4877253, 0.3045145, 0.4166048, 0.3094676, 0.1283403, + 0.4126990, 0.0727838, 0.3816538, 0.3677183, 0.3288944, 0.4250860, 0.3152088, 0.0475468, + 0.2720916, 0.1017065, 0.2501489, 0.2253530, 0.4478221, 0.1064471, 0.0949263, 0.3674253, + 0.4441046, 0.4054141, 0.3361003, 0.3239112, 0.1663671, 0.0782135, 0.4374697, 0.0613140, + 0.6431416, 0.1812549, 0.1701081, 0.4059448, 0.4893270, 0.2157922, 0.2139573, 0.0232168, + 0.0964920, 0.1524191, 0.4710790, 0.4609937, 0.1566380, 0.0489285, 0.2313439, 0.3747997, + 0.3018721, 0.3317510, 0.2405941, 0.4778197, 0.3747582, 0.3192275, 0.1495063, 0.1170026, + 0.2469246, 0.1656042, 0.1162840, 0.3262424, 0.2228194, 0.2089537, 0.4803574, 0.3632484, + 0.1891034, 0.3239112, 0.1381195, 0.0077237, 0.4404407, 0.4807387, 0.4036728, 0.3698108, + 0.3969467, 0.3886663, 0.4844082, 0.4753753, 0.0528503, 0.2075818, 0.0475201, 0.3434332, + 0.3889723, 0.3254332, 0.4126990, 0.4609937, 0.1381195, 0.0022522, 0.3466910, 0.3860448, + 0.1873246, 0.3266448, 0.2233849, 0.4632739, 0.4372073, 0.3133293, 0.4008097, 0.4356323, + 0.0281233, 0.4662680, 0.2595815, 0.2596988, 0.4808010, 0.1638856, 0.2168891, 0.0049234, + 0.1753686, 0.3741804, 0.4124186, 0.2024299, 0.2787146, 0.3364275, 0.0321264, 0.1997993, + 0.4374486, 0.4439297, 0.2124143, 0.2074694, 0.1906150, 0.1204390, 0.2799277, 0.3869004, + 0.2441548, 0.2863414, 0.1778966, 0.7978231, 0.5805955, 0.0851296, 0.0026993, 0.0508773, + 0.4342381, 0.3946897, 0.1153671, 0.1491689, 0.3155171, 0.4548634, 0.1633865, 0.4795561, + 0.0727838, 0.1663671, 0.1552885, 0.4808156, 0.4563937, 0.1959839, 0.0873055, 0.2884416, + 0.0097513, 0.0770738, 0.2225533, 0.4107678, 0.2653476, 0.4482521, 0.1462075, 0.3816538, + 0.0782135, 0.1552885, 0.1813836, 0.4904932, 0.4955283, 0.3356108, 0.2478454, 0.4269330, + 0.1745262, 0.3370988, 0.4572209, 0.3543404, 0.0725528, 0.0077237, 0.3415696, 0.1628898, + 0.4335400, 0.0675915, 0.1492740, 0.4655451, 0.2777625, 0.1149032, 0.2007709, 0.2400093, + 0.0658719, 0.4063063, 0.1237823, 0.2486204, 0.4374697, 0.0022522, 0.1201562, 0.3725724, + 0.4209127, 0.3532749, 0.4439365, 0.3121863, 0.0642578, 0.0742416, 0.2011374, 0.0563368, + 0.0282417, 0.0297401, 0.3876660, 0.5988698, 0.4610244, 0.2641133, 0.1591760, 0.2415059, + 0.1906150, 0.1628898, 0.3853460, 0.4039690, 0.4887115, 0.4618716, 0.0398270, 0.4915100, + 0.4278218, 0.1974726, 0.4251885, 0.3992334, 0.0068666, 0.4003320, 0.4238202, 0.0421940, + 0.3394504, 0.3677183, 0.1566380, 0.1204390}, + {-2.48497686, -2.31603463}}}; + const std::vector> rmat_inputsf = { {50, 100, @@ -470,6 +1802,18 @@ TEST_P(LanczosTestF, Result) { Run(); } using LanczosTestD = lanczos_tests; TEST_P(LanczosTestD, Result) { Run(); } +using LanczosTestD_SM = lanczos_tests; +TEST_P(LanczosTestD_SM, Result) { Run(); } + +using LanczosTestD_LA = lanczos_tests; +TEST_P(LanczosTestD_LA, Result) { Run(); } + +using LanczosTestD_LM = lanczos_tests; +TEST_P(LanczosTestD_LM, Result) { Run(); } + +using LanczosTestD_SA = lanczos_tests; +TEST_P(LanczosTestD_SA, Result) { Run(); } + using RmatLanczosTestF = rmat_lanczos_tests; TEST_P(RmatLanczosTestF, Result) { Run(); } @@ -477,4 +1821,9 @@ INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestF, ::testing::ValuesIn(inputsf) INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestD, ::testing::ValuesIn(inputsd)); INSTANTIATE_TEST_CASE_P(LanczosTests, RmatLanczosTestF, ::testing::ValuesIn(rmat_inputsf)); +INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestD_SM, ::testing::ValuesIn(inputsd_SM)); +INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestD_LA, ::testing::ValuesIn(inputsd_LA)); +INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestD_LM, ::testing::ValuesIn(inputsd_LM)); +INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestD_SA, ::testing::ValuesIn(inputsd_SA)); + } // namespace raft::sparse From 3d5823cb61a006296dfdd2d1e816b8b5ecf8c62b Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 7 May 2025 05:11:47 +0000 Subject: [PATCH 18/35] doxygen format --- .../raft/sparse/solver/lanczos_types.hpp | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/cpp/include/raft/sparse/solver/lanczos_types.hpp b/cpp/include/raft/sparse/solver/lanczos_types.hpp index c01b2a270f..f96316f672 100644 --- a/cpp/include/raft/sparse/solver/lanczos_types.hpp +++ b/cpp/include/raft/sparse/solver/lanczos_types.hpp @@ -35,19 +35,42 @@ enum LANCZOS_WHICH { SM }; +/** + * @brief Configuration parameters for the Lanczos eigensolver + * + * This structure encapsulates all configuration parameters needed to run the + * Lanczos algorithm for computing eigenvalues and eigenvectors of large sparse matrices. + * + * @tparam ValueTypeT Data type for values (float or double) + */ template struct lanczos_solver_config { - /** The number of eigenvalues and eigenvectors to compute. Must be 1 <= k < n.*/ + /** @brief The number of eigenvalues and eigenvectors to compute + * @note Must be 1 <= n_components < n, where n is the matrix dimension + */ int n_components; - /** Maximum number of iteration. */ + + /** @brief Maximum number of iterations allowed for the algorithm to converge */ int max_iterations; - /** The number of Lanczos vectors generated. Must be k + 1 < ncv < n. */ + + /** @brief The number of Lanczos vectors to generate + * @note Must satisfy n_components + 1 < ncv < n, where n is the matrix dimension + */ int ncv; - /** Tolerance for residuals ``||Ax - wx||`` */ + + /** @brief Convergence tolerance for residuals + * @note Used to determine when to stop iteration based on ||Ax - wx|| < tolerance + */ ValueTypeT tolerance; - /** Enumeration specifying which eigenvalues to compute in the Lanczos algorithm. */ + + /** @brief Specifies which eigenvalues to compute in the Lanczos algorithm + * @see LANCZOS_WHICH for possible values (SA, LA, SM, LM) + */ LANCZOS_WHICH which; - /** random seed */ + + /** @brief Random seed for initialization of the algorithm + * @note Controls reproducibility of results + */ uint64_t seed; }; From 3cd12bbb87f26d1649531fa7675581401f2bae75 Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 7 May 2025 05:44:30 +0000 Subject: [PATCH 19/35] update gtests --- cpp/tests/sparse/solver/lanczos.cu | 1678 +++++++--------------------- 1 file changed, 390 insertions(+), 1288 deletions(-) diff --git a/cpp/tests/sparse/solver/lanczos.cu b/cpp/tests/sparse/solver/lanczos.cu index a456901119..d53ce5b347 100644 --- a/cpp/tests/sparse/solver/lanczos.cu +++ b/cpp/tests/sparse/solver/lanczos.cu @@ -340,6 +340,311 @@ class lanczos_tests : public ::testing::TestWithParam expected_eigenvalues; }; +template +std::vector rows = { + 0, 29, 51, 74, 103, 120, 142, 161, 181, 199, 217, 235, 254, 271, 295, + 314, 338, 364, 388, 405, 417, 437, 458, 478, 501, 511, 522, 539, 554, 574, + 590, 615, 638, 651, 679, 698, 717, 725, 741, 761, 779, 799, 817, 833, 850, + 864, 879, 896, 921, 938, 961, 985, 1004, 1019, 1035, 1048, 1070, 1084, 1102, 1123, + 1138, 1165, 1182, 1203, 1215, 1232, 1253, 1272, 1289, 1310, 1327, 1344, 1358, 1386, 1406, + 1428, 1450, 1470, 1485, 1503, 1516, 1529, 1553, 1571, 1596, 1614, 1629, 1647, 1676, 1695, + 1709, 1732, 1750, 1765, 1782, 1803, 1818, 1832, 1846, 1866, 1884}; + +template +std::vector cols = { + 0, 3, 5, 8, 14, 23, 29, 31, 33, 34, 35, 36, 39, 47, 49, 50, 51, 61, 62, 63, 75, 76, 80, 85, + 88, 91, 92, 94, 96, 1, 3, 6, 7, 8, 15, 19, 31, 35, 44, 48, 60, 65, 69, 72, 73, 76, 78, 80, + 85, 90, 97, 17, 26, 28, 41, 42, 43, 45, 48, 51, 52, 57, 58, 59, 62, 63, 65, 67, 68, 74, 86, 90, + 91, 92, 0, 1, 3, 4, 11, 15, 16, 18, 21, 30, 33, 35, 37, 40, 46, 49, 54, 55, 57, 59, 60, 66, + 67, 72, 76, 81, 84, 87, 88, 3, 10, 16, 23, 32, 34, 37, 39, 45, 47, 50, 57, 60, 61, 72, 83, 87, + 0, 10, 18, 31, 32, 33, 43, 52, 55, 56, 58, 60, 63, 67, 68, 72, 76, 77, 82, 86, 90, 92, 1, 16, + 21, 23, 24, 29, 30, 37, 47, 52, 53, 55, 56, 68, 69, 73, 83, 87, 94, 1, 11, 13, 21, 30, 33, 35, + 42, 61, 64, 65, 75, 78, 79, 81, 82, 89, 94, 95, 99, 0, 1, 12, 14, 16, 29, 49, 50, 56, 59, 64, + 66, 68, 72, 77, 87, 93, 98, 15, 26, 32, 33, 52, 53, 56, 58, 60, 64, 65, 70, 71, 81, 87, 93, 97, + 99, 4, 5, 21, 23, 26, 29, 34, 42, 56, 59, 64, 68, 71, 78, 83, 84, 87, 90, 3, 7, 11, 12, 21, + 23, 45, 47, 49, 55, 56, 75, 78, 79, 80, 83, 88, 90, 94, 8, 11, 15, 17, 24, 33, 34, 39, 41, 47, + 48, 53, 54, 61, 86, 93, 94, 7, 14, 15, 17, 22, 29, 30, 39, 41, 43, 45, 46, 47, 48, 55, 60, 62, + 72, 73, 77, 83, 84, 93, 98, 0, 8, 13, 18, 26, 33, 44, 45, 53, 54, 58, 72, 74, 75, 82, 87, 92, + 94, 98, 1, 3, 9, 12, 13, 16, 22, 26, 30, 58, 62, 68, 69, 73, 74, 75, 78, 80, 91, 93, 95, 96, + 97, 99, 3, 4, 6, 8, 15, 17, 18, 23, 25, 31, 42, 45, 47, 50, 55, 58, 60, 62, 65, 70, 72, 75, + 83, 84, 91, 92, 2, 12, 13, 16, 24, 26, 30, 31, 32, 33, 38, 42, 58, 60, 65, 68, 70, 74, 75, 85, + 92, 93, 94, 95, 3, 5, 14, 16, 20, 28, 33, 35, 51, 57, 62, 64, 69, 76, 85, 86, 91, 1, 30, 35, + 41, 48, 49, 50, 63, 65, 81, 88, 99, 18, 20, 24, 25, 26, 28, 29, 45, 61, 67, 72, 74, 75, 76, 80, + 85, 87, 94, 98, 99, 3, 6, 7, 10, 11, 24, 39, 43, 45, 47, 49, 52, 54, 55, 60, 65, 66, 68, 78, + 84, 89, 13, 15, 25, 29, 31, 32, 33, 36, 39, 41, 48, 49, 51, 52, 54, 58, 60, 75, 86, 87, 0, 4, + 6, 10, 11, 16, 25, 28, 30, 31, 37, 40, 41, 44, 51, 53, 58, 60, 66, 73, 80, 91, 92, 6, 12, 17, + 20, 21, 58, 73, 84, 92, 98, 16, 20, 22, 23, 34, 45, 46, 66, 78, 86, 92, 2, 9, 10, 14, 15, 17, + 20, 27, 29, 35, 50, 58, 64, 68, 73, 78, 88, 26, 29, 37, 48, 50, 53, 55, 56, 60, 67, 69, 71, 77, + 81, 88, 2, 18, 20, 23, 51, 55, 59, 63, 64, 67, 68, 72, 76, 77, 78, 83, 84, 87, 94, 98, 0, 6, + 8, 10, 13, 20, 22, 26, 27, 35, 49, 63, 73, 75, 86, 87, 3, 6, 7, 13, 15, 17, 19, 23, 31, 32, + 33, 39, 41, 45, 46, 47, 48, 61, 66, 68, 70, 79, 90, 95, 99, 0, 1, 5, 16, 17, 22, 23, 30, 32, + 45, 46, 47, 51, 53, 54, 60, 62, 66, 72, 79, 87, 94, 97, 4, 5, 9, 17, 22, 30, 31, 38, 51, 57, + 70, 79, 85, 0, 3, 5, 7, 9, 12, 14, 17, 18, 22, 30, 34, 37, 50, 55, 58, 60, 73, 79, 83, 87, + 89, 92, 93, 96, 97, 98, 99, 0, 4, 10, 12, 25, 33, 34, 38, 47, 52, 64, 65, 66, 68, 73, 81, 82, + 88, 91, 0, 1, 3, 7, 18, 19, 26, 29, 41, 50, 56, 57, 70, 72, 75, 82, 93, 95, 97, 0, 22, 46, + 62, 74, 76, 83, 86, 3, 4, 6, 23, 27, 33, 38, 39, 43, 55, 67, 71, 81, 85, 87, 90, 17, 32, 34, + 37, 40, 42, 43, 44, 46, 57, 59, 69, 72, 74, 79, 81, 87, 90, 92, 98, 0, 4, 12, 13, 21, 22, 30, + 37, 41, 60, 69, 73, 75, 82, 84, 90, 92, 99, 3, 23, 38, 41, 45, 46, 49, 54, 58, 59, 63, 67, 69, + 71, 76, 80, 81, 84, 93, 98, 2, 12, 13, 19, 22, 23, 30, 35, 39, 40, 51, 57, 70, 78, 83, 85, 90, + 94, 2, 7, 10, 16, 17, 38, 44, 47, 49, 64, 69, 76, 77, 79, 81, 83, 2, 5, 13, 21, 37, 38, 62, + 67, 68, 81, 82, 86, 87, 95, 96, 97, 98, 1, 14, 23, 38, 42, 51, 55, 71, 74, 75, 76, 77, 89, 96, + 2, 4, 11, 13, 14, 16, 20, 21, 25, 30, 31, 40, 60, 75, 94, 3, 13, 25, 30, 31, 36, 38, 40, 66, + 71, 72, 76, 81, 84, 88, 89, 95, 0, 4, 6, 11, 12, 13, 16, 21, 30, 31, 34, 42, 47, 49, 51, 55, + 65, 68, 70, 71, 73, 75, 84, 88, 95, 1, 2, 12, 13, 19, 22, 27, 30, 51, 56, 57, 72, 75, 79, 90, + 91, 98, 0, 3, 8, 11, 19, 21, 22, 29, 40, 42, 47, 49, 50, 55, 57, 61, 63, 77, 83, 88, 90, 91, + 93, 0, 4, 8, 16, 19, 26, 27, 33, 35, 49, 50, 52, 53, 55, 62, 65, 66, 68, 71, 78, 82, 90, 94, + 98, 0, 2, 18, 22, 23, 28, 31, 32, 41, 44, 47, 48, 56, 58, 69, 70, 83, 96, 98, 2, 5, 6, 9, + 21, 22, 34, 50, 62, 65, 66, 69, 72, 79, 84, 6, 9, 12, 14, 23, 27, 31, 50, 56, 58, 59, 67, 76, + 77, 81, 97, 3, 12, 14, 21, 22, 31, 40, 59, 67, 74, 81, 89, 90, 3, 5, 6, 11, 13, 16, 21, 27, + 28, 33, 37, 44, 47, 49, 50, 59, 71, 72, 83, 89, 91, 96, 5, 6, 8, 9, 10, 11, 27, 35, 48, 51, + 53, 62, 65, 74, 2, 3, 4, 18, 32, 35, 38, 41, 48, 49, 64, 66, 74, 86, 87, 94, 95, 98, 2, 5, + 9, 14, 15, 16, 17, 22, 23, 24, 26, 33, 40, 51, 53, 61, 70, 72, 81, 83, 85, 2, 3, 8, 10, 28, + 38, 40, 53, 54, 55, 68, 70, 81, 83, 98, 1, 3, 4, 5, 9, 13, 16, 17, 21, 22, 23, 27, 31, 33, + 39, 45, 60, 62, 70, 77, 80, 82, 83, 84, 85, 86, 98, 0, 4, 7, 12, 20, 30, 49, 58, 61, 62, 63, + 65, 72, 76, 83, 89, 91, 0, 2, 13, 15, 16, 18, 31, 36, 43, 50, 52, 56, 60, 61, 66, 72, 83, 87, + 89, 92, 93, 0, 2, 5, 19, 28, 29, 40, 49, 61, 63, 86, 90, 7, 8, 9, 10, 18, 26, 28, 34, 42, + 57, 72, 74, 82, 87, 88, 96, 99, 1, 2, 7, 9, 16, 17, 19, 21, 34, 47, 50, 52, 56, 61, 67, 83, + 89, 90, 95, 97, 99, 3, 8, 21, 23, 25, 30, 31, 34, 46, 50, 52, 57, 62, 79, 81, 85, 87, 90, 99, + 2, 3, 5, 20, 27, 28, 37, 40, 43, 53, 54, 65, 69, 82, 84, 89, 90, 2, 5, 6, 8, 10, 15, 17, + 21, 26, 28, 30, 34, 43, 47, 50, 59, 69, 70, 79, 88, 97, 1, 6, 15, 18, 27, 38, 39, 40, 42, 51, + 52, 67, 68, 71, 77, 80, 97, 9, 16, 17, 30, 32, 35, 41, 47, 51, 58, 59, 60, 68, 72, 77, 86, 93, + 9, 10, 27, 37, 40, 44, 46, 47, 50, 55, 69, 74, 87, 98, 1, 3, 4, 5, 8, 13, 14, 16, 20, 28, + 31, 35, 38, 46, 48, 52, 55, 58, 61, 62, 64, 70, 77, 78, 82, 86, 89, 99, 1, 6, 13, 15, 23, 24, + 26, 29, 33, 34, 39, 47, 76, 77, 83, 87, 88, 96, 98, 99, 2, 14, 15, 17, 20, 36, 38, 44, 54, 56, + 57, 64, 71, 80, 81, 85, 86, 87, 88, 92, 93, 95, 0, 7, 11, 14, 15, 16, 17, 20, 22, 29, 35, 39, + 44, 45, 47, 48, 78, 85, 90, 92, 94, 99, 0, 1, 3, 5, 18, 20, 28, 36, 40, 42, 44, 46, 53, 61, + 73, 80, 82, 84, 91, 95, 5, 8, 13, 27, 28, 42, 44, 49, 53, 60, 69, 70, 72, 73, 91, 1, 7, 10, + 11, 15, 21, 25, 26, 28, 41, 50, 72, 75, 81, 82, 87, 94, 96, 7, 11, 30, 31, 32, 33, 38, 42, 48, + 52, 66, 68, 82, 0, 1, 11, 15, 20, 23, 40, 60, 69, 74, 76, 80, 93, 3, 7, 9, 19, 27, 34, 37, + 38, 40, 42, 43, 46, 53, 54, 58, 59, 66, 74, 78, 81, 84, 87, 88, 91, 5, 7, 14, 34, 35, 39, 43, + 50, 60, 64, 67, 72, 76, 78, 79, 83, 84, 96, 4, 6, 10, 11, 13, 16, 28, 33, 36, 41, 42, 49, 51, + 55, 58, 59, 60, 61, 62, 65, 73, 82, 84, 86, 97, 3, 10, 13, 16, 21, 24, 28, 39, 40, 46, 47, 52, + 60, 67, 76, 81, 82, 83, 0, 1, 17, 18, 20, 32, 37, 41, 58, 60, 66, 74, 75, 90, 94, 2, 5, 12, + 18, 22, 25, 29, 36, 43, 57, 60, 63, 70, 72, 74, 83, 94, 99, 3, 4, 6, 8, 9, 10, 14, 20, 22, + 28, 29, 31, 33, 37, 38, 43, 57, 62, 64, 66, 71, 73, 74, 78, 81, 91, 94, 95, 99, 0, 3, 11, 19, + 26, 27, 34, 46, 47, 49, 64, 68, 73, 74, 81, 90, 94, 95, 97, 7, 21, 33, 44, 46, 54, 55, 61, 62, + 65, 67, 72, 91, 99, 1, 2, 5, 10, 11, 30, 37, 38, 39, 41, 48, 49, 50, 54, 63, 65, 66, 67, 75, + 85, 88, 91, 96, 0, 2, 15, 16, 18, 23, 34, 48, 49, 55, 61, 76, 77, 81, 87, 89, 90, 97, 0, 2, + 5, 14, 16, 17, 23, 24, 25, 33, 38, 39, 62, 74, 75, 8, 9, 12, 13, 15, 17, 33, 35, 40, 49, 62, + 70, 74, 80, 93, 98, 99, 0, 6, 7, 11, 12, 14, 17, 20, 28, 31, 41, 45, 50, 57, 75, 78, 85, 86, + 87, 88, 95, 7, 15, 17, 30, 35, 43, 46, 47, 57, 65, 74, 76, 87, 88, 94, 0, 15, 33, 43, 44, 51, + 55, 64, 73, 78, 82, 90, 96, 98, 1, 9, 15, 31, 33, 35, 43, 53, 65, 68, 69, 83, 88, 91, 8, 13, + 14, 20, 24, 28, 33, 38, 40, 43, 48, 50, 51, 57, 59, 60, 71, 73, 93, 96, 7, 9, 15, 19, 20, 30, + 33, 39, 64, 65, 66, 72, 73, 75, 86, 87, 89, 93}; + +template +std::vector vals = { + 0.8385492, 0.0887047, 0.4178915, 0.4859754, 0.4469863, 0.2195207, 0.3129920, 0.1031984, 0.2898832, + 0.3742032, 0.0522814, 0.3923617, 0.4283062, 0.2236069, 0.1620676, 0.0181036, 0.0722899, 0.2825163, + 0.2854958, 0.3136983, 0.4021524, 0.3556329, 0.4577443, 0.1463357, 0.3288944, 0.4404407, 0.3466910, + 0.2799277, 0.1813836, 0.4619252, 0.1622771, 0.2565850, 0.3349850, 0.4806673, 0.2912005, 0.2509201, + 0.6396587, 0.5977305, 0.1196116, 0.2077467, 0.0345871, 0.4918659, 0.4194439, 0.4487811, 0.1682306, + 0.3017929, 0.1373989, 0.3152796, 0.3640917, 0.0489285, 0.4335400, 0.0987368, 0.1548646, 0.2137529, + 0.0130792, 0.0752723, 0.1238085, 0.3553386, 0.4349648, 0.3818015, 0.4697597, 0.4478265, 0.2176154, + 0.3768051, 0.3741169, 0.0550861, 0.3733355, 0.0161616, 0.0404749, 0.0530627, 0.3932415, 0.2313439, + 0.4807387, 0.3860448, 0.0887047, 0.1622771, 0.2646495, 0.4319774, 0.0975544, 0.3953015, 0.4127654, + 0.3950751, 0.0630765, 0.3240158, 0.3895027, 0.0263783, 0.3096741, 0.0810854, 0.2185860, 0.2931856, + 0.4413908, 0.4933484, 0.3265684, 0.3630947, 0.3439550, 0.4709083, 0.4871525, 0.4059546, 0.2835062, + 0.2319805, 0.1080630, 0.1148512, 0.4250860, 0.4319774, 0.3417962, 0.1542346, 0.1705101, 0.3939655, + 0.2228894, 0.2561502, 0.1612249, 0.3348420, 0.7638237, 0.2223779, 0.1142358, 0.2221761, 0.1023570, + 0.0100264, 0.4906516, 0.4211857, 0.4178915, 0.2112697, 0.0841055, 0.3054300, 0.4681202, 0.3307955, + 0.2055745, 0.3013350, 0.0921099, 0.2272112, 0.4771985, 0.0400448, 0.4924752, 0.3142720, 0.3691756, + 0.2582222, 0.2400539, 0.4489491, 0.5111299, 0.4255019, 0.3747997, 0.1873246, 0.2565850, 0.1914687, + 0.3671139, 0.1276162, 0.3537677, 0.4076773, 0.1181683, 0.7192769, 0.2186738, 0.2885858, 0.4734213, + 0.0072575, 0.0765674, 0.0898227, 0.3649966, 0.2496215, 0.1702205, 0.0710704, 0.3869004, 0.3349850, + 0.1886938, 0.3514959, 0.4643647, 0.4223959, 0.3594954, 0.2522124, 0.4105392, 0.2470788, 0.2545409, + 0.3583593, 0.2345200, 0.0271059, 0.3803033, 0.1930780, 0.4567223, 0.0613140, 0.2441548, 0.4808156, + 0.3853460, 0.4859754, 0.4806673, 0.2801995, 0.3858915, 0.0090301, 0.4087827, 0.3671360, 0.2667392, + 0.4641679, 0.4647529, 0.3445000, 0.1198545, 0.0282007, 0.1829597, 0.0539266, 0.0914677, 0.1638856, + 0.1201562, 0.4388565, 0.2036911, 0.2046127, 0.4811504, 0.3038480, 0.0642898, 0.2031245, 0.1680801, + 0.0394903, 0.4766186, 0.2023225, 0.0175873, 0.3034133, 0.4123132, 0.0379968, 0.2168891, 0.0675915, + 0.4039690, 0.3417962, 0.2112697, 0.2400451, 0.4558193, 0.1334496, 0.0195393, 0.3627390, 0.4262152, + 0.0403542, 0.3081270, 0.1527164, 0.0121030, 0.6241815, 0.4913400, 0.0157230, 0.3200969, 0.0437878, + 0.3018721, 0.0975544, 0.1886938, 0.8753713, 0.0700827, 0.2364397, 0.4924574, 0.2563165, 0.1126200, + 0.1547797, 0.0241622, 0.3814965, 0.3526533, 0.2161066, 0.2911978, 0.4464823, 0.3577181, 0.3152088, + 0.3317510, 0.2863414, 0.2801995, 0.0700827, 0.3417172, 0.2610632, 0.4037673, 0.1736438, 0.0880198, + 0.4559108, 0.1121846, 0.7814473, 0.3779829, 0.3405251, 0.1208012, 0.4304054, 0.1807327, 0.0049234, + 0.1778966, 0.3514959, 0.2046946, 0.2997384, 0.2013881, 0.0548181, 0.3352703, 0.2054045, 0.3389475, + 0.1449403, 0.3906285, 0.0580903, 0.3582265, 0.1743012, 0.2712877, 0.4273703, 0.4566499, 0.0667344, + 0.0676206, 0.1248124, 0.0026571, 0.2774455, 0.0032627, 0.1753686, 0.3725724, 0.4469863, 0.3858915, + 0.2046946, 0.3794979, 0.4016317, 0.3370037, 0.0815573, 0.4647915, 0.0563985, 0.4203163, 0.0915991, + 0.0276749, 0.3857849, 0.0461729, 0.3978934, 0.3614717, 0.3266448, 0.7978231, 0.4209127, 0.2912005, + 0.3953015, 0.4388565, 0.3417172, 0.2997384, 0.4108247, 0.2899171, 0.1479114, 0.4418810, 0.0634220, + 0.0929668, 0.4055436, 0.2457036, 0.3701515, 0.4134036, 0.0947451, 0.2785034, 0.3162361, 0.4036728, + 0.3741804, 0.4563937, 0.4904932, 0.1492740, 0.4887115, 0.4127654, 0.1542346, 0.1914687, 0.0090301, + 0.4108247, 0.3533593, 0.4300368, 0.3572507, 0.1412494, 0.4373029, 0.3273854, 0.2602280, 0.1690700, + 0.4756982, 0.0009060, 0.2393224, 0.0014211, 0.4101384, 0.1580024, 0.0231310, 0.5838791, 0.4132268, + 0.2181222, 0.3529412, 0.3698108, 0.2233849, 0.0987368, 0.2610632, 0.2013881, 0.3533593, 0.2908257, + 0.3609885, 0.2026076, 0.2999429, 0.2079948, 0.2704931, 0.2946429, 0.3154255, 0.0627621, 0.2774129, + 0.4206699, 0.0670598, 0.2860273, 0.3919643, 0.2397596, 0.2703603, 0.4632739, 0.4124186, 0.5805955, + 0.1959839, 0.3950751, 0.0841055, 0.3794979, 0.4300368, 0.4032480, 0.2078872, 0.0094638, 0.2755707, + 0.0376010, 0.4909527, 0.3097841, 0.2355419, 0.0072671, 0.2746342, 0.0053361, 0.1994108, 0.3969467, + 0.2509201, 0.3298818, 0.3886021, 0.0245763, 0.4638373, 0.4052183, 0.4148478, 0.0242814, 0.2414050, + 0.2932298, 0.0475468, 0.4618716, 0.4032480, 0.8676416, 0.4028524, 0.3012557, 0.1360013, 0.1863026, + 0.1490197, 0.0643736, 0.3395792, 0.2925389, 0.3659366, 0.4948683, 0.4953563, 0.1047673, 0.0355901, + 0.0856992, 0.1778870, 0.0851296, 0.3532749, 0.0398270, 0.0630765, 0.3671139, 0.4643647, 0.2400451, + 0.2364397, 0.4431843, 0.1266264, 0.4763364, 0.7873081, 0.2751093, 0.4222012, 0.1121367, 0.4474346, + 0.3652081, 0.1600931, 0.0614609, 0.0204758, 0.1615355, 0.4293712, 0.3882434, 0.6431416, 0.0548181, + 0.2899171, 0.3634890, 0.4412351, 0.1490288, 0.0447601, 0.4229826, 0.3807294, 0.0672451, 0.2775799, + 0.4666647, 0.4085002, 0.1297752, 0.1563804, 0.1522877, 0.2532282, 0.2805034, 0.1651538, 0.1046609, + 0.1760083, 0.2195207, 0.1705101, 0.1276162, 0.4558193, 0.4924574, 0.3572507, 0.3401189, 0.0565680, + 0.4332137, 0.2150277, 0.4809324, 0.2783410, 0.1570549, 0.4891155, 0.4529251, 0.2209245, 0.3658022, + 0.3961954, 0.3788675, 0.1621254, 0.3969478, 0.3886663, 0.4372073, 0.3537677, 0.4037673, 0.2908257, + 0.4028524, 0.4431843, 0.7202524, 0.3443225, 0.3538920, 0.3133293, 0.4439365, 0.1412494, 0.3012557, + 0.3634890, 0.3401189, 0.1250412, 0.4831129, 0.0737263, 0.3228796, 0.0975274, 0.1318027, 0.4008097, + 0.1548646, 0.2036911, 0.1334496, 0.4016317, 0.1479114, 0.3609885, 0.1360013, 0.1494316, 0.4203018, + 0.2847606, 0.1855530, 0.3948809, 0.1457941, 0.1710113, 0.4871747, 0.0616420, 0.2720916, 0.1494316, + 0.3342525, 0.4981484, 0.2835164, 0.2201109, 0.3569505, 0.3228796, 0.2664382, 0.1461955, 0.2912845, + 0.2178672, 0.0091858, 0.3888402, 0.3213883, 0.1017065, 0.2137529, 0.2078872, 0.1863026, 0.0565680, + 0.2497744, 0.0917027, 0.3077455, 0.2898162, 0.1962939, 0.0667715, 0.0511321, 0.4857582, 0.0757288, + 0.4719980, 0.0990155, 0.0358659, 0.3427203, 0.4911953, 0.0026993, 0.3121863, 0.3129920, 0.4076773, + 0.4087827, 0.0195393, 0.3352703, 0.1490197, 0.4412351, 0.4203018, 0.3342525, 0.4991112, 0.3198876, + 0.0273423, 0.1726720, 0.2868139, 0.0167729, 0.3167321, 0.3240158, 0.1181683, 0.4223959, 0.2054045, + 0.4418810, 0.2026076, 0.3298818, 0.4332137, 0.4679078, 0.2938424, 0.2349892, 0.3265936, 0.4161196, + 0.0540847, 0.4671349, 0.4922210, 0.4333457, 0.2783662, 0.3295173, 0.1414430, 0.4789151, 0.5482149, + 0.2405941, 0.0873055, 0.4915100, 0.1031984, 0.6396587, 0.3054300, 0.4373029, 0.2999429, 0.1490288, + 0.2150277, 0.4679078, 0.4463057, 0.3714156, 0.1611302, 0.3379962, 0.4654491, 0.0994459, 0.4963855, + 0.0027219, 0.2011968, 0.2413642, 0.0713272, 0.0186765, 0.5553801, 0.0508773, 0.4655451, 0.3939655, + 0.4681202, 0.2046127, 0.2079948, 0.0447601, 0.2938424, 0.4463057, 0.4189366, 0.4805591, 0.4724835, + 0.4029289, 0.3810731, 0.3855192, 0.2898832, 0.3895027, 0.3307955, 0.3594954, 0.4811504, 0.1736438, + 0.3370037, 0.2704931, 0.0094638, 0.4229826, 0.2349892, 0.1488369, 0.3299349, 0.3658398, 0.2805756, + 0.1943161, 0.1270155, 0.2077195, 0.1249269, 0.0572191, 0.3217881, 0.1812549, 0.4356323, 0.2024299, + 0.4955283, 0.2777625, 0.0642578, 0.4278218, 0.3742032, 0.2228894, 0.3627390, 0.0880198, 0.1250412, + 0.1488369, 0.6981739, 0.2518100, 0.2364128, 0.4279115, 0.4212285, 0.4749146, 0.2284694, 0.1864383, + 0.0079268, 0.2446150, 0.4631400, 0.2501489, 0.4844082, 0.0522814, 0.5977305, 0.0263783, 0.2522124, + 0.2755707, 0.3886021, 0.2847606, 0.4991112, 0.0239194, 0.4028964, 0.2294849, 0.2998522, 0.1320064, + 0.0275548, 0.1151714, 0.2652366, 0.2787146, 0.2884416, 0.1149032, 0.3923617, 0.3807294, 0.0540387, + 0.2807390, 0.0142855, 0.3054538, 0.0743166, 0.1352609, 0.3096741, 0.2561502, 0.7192769, 0.4809324, + 0.4981484, 0.3299349, 0.2030550, 0.2820974, 0.3606436, 0.1871530, 0.2116934, 0.1441479, 0.2874195, + 0.3848211, 0.3917919, 0.4778197, 0.2946429, 0.4189366, 0.2518100, 0.2030550, 0.4912895, 0.1356941, + 0.2409017, 0.4399648, 0.2600915, 0.1039219, 0.0522639, 0.1473574, 0.1156571, 0.2768389, 0.4478964, + 0.1246019, 0.1488771, 0.3747582, 0.0281233, 0.0742416, 0.4283062, 0.1612249, 0.4559108, 0.3389475, + 0.1266264, 0.0672451, 0.3265936, 0.2820974, 0.3309392, 0.0915848, 0.0509763, 0.4962989, 0.4802843, + 0.0841302, 0.1918956, 0.3192275, 0.4662680, 0.1974726, 0.0810854, 0.2783410, 0.4912895, 0.3111583, + 0.4521906, 0.2043965, 0.3393941, 0.2771504, 0.4931641, 0.1747926, 0.0280012, 0.3078630, 0.0456258, + 0.1170995, 0.0880413, 0.2797376, 0.2573348, 0.2639170, 0.3364275, 0.2011374, 0.0130792, 0.1121846, + 0.1449403, 0.0245763, 0.2775799, 0.1570549, 0.4161196, 0.0239194, 0.3309392, 0.3111583, 0.3020653, + 0.0100230, 0.4954931, 0.4227756, 0.3662207, 0.4669757, 0.1495063, 0.4342381, 0.0752723, 0.4105392, + 0.4262152, 0.3273854, 0.3154255, 0.1356941, 0.1063635, 0.3477053, 0.4418667, 0.4065750, 0.2158301, + 0.0978730, 0.3474138, 0.0941925, 0.2502904, 0.4167871, 0.1238085, 0.2055745, 0.3906285, 0.4763364, + 0.3606436, 0.2409017, 0.2856070, 0.4519934, 0.0640926, 0.3494168, 0.2239768, 0.1506959, 0.3404586, + 0.0097513, 0.3356108, 0.2007709, 0.0563368, 0.1196116, 0.0815573, 0.4891155, 0.4399648, 0.1063635, + 0.0469109, 0.4409516, 0.2269343, 0.1728651, 0.4690269, 0.4568825, 0.3838028, 0.1701081, 0.2478454, + 0.3553386, 0.3348420, 0.2563165, 0.0580903, 0.4647915, 0.2602280, 0.0643736, 0.7873081, 0.4831129, + 0.0540847, 0.3714156, 0.4521906, 0.0529002, 0.1118892, 0.3946897, 0.2185860, 0.3582265, 0.0737263, + 0.4671349, 0.1611302, 0.0540387, 0.2600915, 0.2043965, 0.0178831, 0.3605796, 0.4215185, 0.3441654, + 0.3192719, 0.2912215, 0.2253530, 0.4059448, 0.0770738, 0.2236069, 0.7638237, 0.2186738, 0.1126200, + 0.7814473, 0.1743012, 0.1690700, 0.2751093, 0.4922210, 0.3379962, 0.2364128, 0.3477053, 0.7218004, + 0.3724327, 0.2531753, 0.0252278, 0.2816279, 0.1346799, 0.1643871, 0.3633022, 0.1110411, 0.2297511, + 0.4249687, 0.4478221, 0.2225533, 0.2077467, 0.4349648, 0.3779829, 0.2712877, 0.4638373, 0.4666647, + 0.2835164, 0.4333457, 0.4028734, 0.3229839, 0.3908435, 0.3720633, 0.3528297, 0.4553215, 0.1170026, + 0.4753753, 0.0282417, 0.1620676, 0.2931856, 0.3671360, 0.1547797, 0.4052183, 0.4222012, 0.4085002, + 0.3198876, 0.3393941, 0.4418667, 0.3724327, 0.0297363, 0.4194855, 0.1562718, 0.1693750, 0.3152241, + 0.3387593, 0.2933232, 0.0599440, 0.1064471, 0.2469246, 0.0528503, 0.0321264, 0.0181036, 0.2223779, + 0.2667392, 0.4756982, 0.4148478, 0.1855530, 0.2201109, 0.3658398, 0.4028964, 0.4194855, 0.1724464, + 0.2184300, 0.4806912, 0.3213868, 0.4946703, 0.0183148, 0.4068079, 0.3882787, 0.1461515, 0.3377662, + 0.1434079, 0.1656042, 0.1153671, 0.0297401, 0.0722899, 0.3818015, 0.0376010, 0.1297752, 0.4529251, + 0.2497744, 0.4654491, 0.4805591, 0.3020653, 0.0469109, 0.2531753, 0.4028734, 0.3104094, 0.0983794, + 0.3041750, 0.7444220, 0.0469955, 0.4269330, 0.3876660, 0.4697597, 0.3013350, 0.2885858, 0.3038480, + 0.1121367, 0.1563804, 0.4279115, 0.2184300, 0.3897764, 0.1165223, 0.1623044, 0.3694641, 0.4647038, + 0.1950430, 0.0223306, 0.4734213, 0.0642898, 0.3405251, 0.0563985, 0.2209245, 0.3569505, 0.0994459, + 0.4806912, 0.3142114, 0.1688596, 0.2013356, 0.3616973, 0.1345261, 0.3665765, 0.1457076, 0.2400093, + 0.4413908, 0.1208012, 0.4203163, 0.4474346, 0.1522877, 0.4963855, 0.2771504, 0.3932629, 0.2256821, + 0.3466487, 0.1397347, 0.4893270, 0.1162840, 0.4933484, 0.0921099, 0.0072575, 0.0241622, 0.4273703, + 0.0009060, 0.3652081, 0.3228796, 0.0917027, 0.2805756, 0.1871530, 0.4409516, 0.0252278, 0.1562718, + 0.3213868, 0.0526326, 0.2417610, 0.1361428, 0.4773201, 0.2157922, 0.2075818, 0.1745262, 0.2272112, + 0.0765674, 0.4641679, 0.2031245, 0.0403542, 0.3814965, 0.2664382, 0.2294849, 0.3229839, 0.3104094, + 0.3142114, 0.1920804, 0.3407301, 0.3448193, 0.4478265, 0.3265684, 0.1142358, 0.4909527, 0.4724835, + 0.2998522, 0.1039219, 0.0100230, 0.3908435, 0.1693750, 0.1674092, 0.0846982, 0.3384884, 0.1067837, + 0.3844901, 0.1491689, 0.4107678, 0.5988698, 0.2176154, 0.4771985, 0.1680801, 0.0915991, 0.0634220, + 0.2393224, 0.0627621, 0.2532282, 0.3658022, 0.7202524, 0.3948809, 0.1943161, 0.4931641, 0.0983794, + 0.1688596, 0.4067034, 0.2580674, 0.4757213, 0.3928346, 0.1995547, 0.2107771, 0.3768051, 0.3630947, + 0.4647529, 0.3081270, 0.3077455, 0.0522639, 0.1747926, 0.2013356, 0.3932629, 0.0526326, 0.3694007, + 0.0972740, 0.3075456, 0.2167318, 0.4610244, 0.0345871, 0.3439550, 0.2221761, 0.0400448, 0.0394903, + 0.4566499, 0.0014211, 0.2774129, 0.1600931, 0.2805034, 0.3961954, 0.1461955, 0.0027219, 0.1270155, + 0.0915848, 0.0529002, 0.0703681, 0.0187762, 0.2613653, 0.1867701, 0.1502444, 0.3600508, 0.4655130, + 0.3398629, 0.4028377, 0.1709328, 0.2641133, 0.2825163, 0.1023570, 0.2470788, 0.4304054, 0.3395792, + 0.2783662, 0.3152241, 0.4067034, 0.9997413, 0.3054797, 0.4133712, 0.0630975, 0.0166616, 0.3381947, + 0.2909326, 0.2139573, 0.0475201, 0.2854958, 0.3741169, 0.0667344, 0.0929668, 0.4101384, 0.3097841, + 0.2011968, 0.2807390, 0.2856070, 0.4946703, 0.3897764, 0.1920804, 0.0187762, 0.3054797, 0.0461345, + 0.2358043, 0.4405020, 0.2239718, 0.0232168, 0.2595815, 0.1997993, 0.3136983, 0.0550861, 0.4924752, + 0.0242814, 0.2898162, 0.0273423, 0.0280012, 0.3387593, 0.4133712, 0.1691249, 0.4277944, 0.3262424, + 0.2545409, 0.3445000, 0.4766186, 0.1527164, 0.2355419, 0.1457941, 0.1962939, 0.4212285, 0.4065750, + 0.1674092, 0.0040041, 0.3576335, 0.6885277, 0.0684911, 0.0949263, 0.3370988, 0.4251885, 0.4918659, + 0.3733355, 0.3583593, 0.2023225, 0.1580024, 0.4206699, 0.2414050, 0.0614609, 0.4749146, 0.2816279, + 0.0183148, 0.1165223, 0.3407301, 0.0630975, 0.3476292, 0.2974767, 0.0964920, 0.2228194, 0.2653476, + 0.0658719, 0.3992334, 0.4709083, 0.1198545, 0.0204758, 0.3788675, 0.3228796, 0.3295173, 0.2413642, + 0.2284694, 0.0178831, 0.4068079, 0.1623044, 0.0846982, 0.0461345, 0.1464626, 0.1254936, 0.4546162, + 0.0599609, 0.2089537, 0.0068666, 0.0161616, 0.4871525, 0.3142720, 0.2925389, 0.2912845, 0.0667715, + 0.2116934, 0.3078630, 0.4519934, 0.3616973, 0.2256821, 0.3476292, 0.1306226, 0.2562920, 0.1834991, + 0.1524191, 0.4803574, 0.0404749, 0.3691756, 0.0898227, 0.0282007, 0.0121030, 0.4055436, 0.0670598, + 0.1615355, 0.1710113, 0.0511321, 0.1414430, 0.1864383, 0.0640926, 0.1346799, 0.3882787, 0.3694007, + 0.0812578, 0.3378220, 0.2461788, 0.3674253, 0.4063063, 0.4194439, 0.3649966, 0.2457036, 0.0072671, + 0.2178672, 0.1473574, 0.0509763, 0.0456258, 0.2158301, 0.3041750, 0.3694641, 0.1306226, 0.0812578, + 0.4179677, 0.0273935, 0.1376181, 0.1237823, 0.0175873, 0.0231310, 0.2860273, 0.4789151, 0.4029289, + 0.1320064, 0.4954931, 0.1643871, 0.7444220, 0.2580674, 0.0972740, 0.2613653, 0.3378220, 0.0734471, + 0.5716440, 0.3270837, 0.4374486, 0.3034133, 0.6241815, 0.0091858, 0.1441479, 0.1170995, 0.2269343, + 0.3605796, 0.3633022, 0.1461515, 0.2417610, 0.4179677, 0.1296077, 0.4877253, 0.1591760, 0.4487811, + 0.4059546, 0.0100264, 0.2582222, 0.1829597, 0.0676206, 0.0276749, 0.5838791, 0.3659366, 0.4857582, + 0.0713272, 0.0275548, 0.1156571, 0.4215185, 0.3720633, 0.4647038, 0.1361428, 0.4757213, 0.0166616, + 0.2358043, 0.0040041, 0.0734471, 0.1602434, 0.0591811, 0.1030985, 0.1983638, 0.4710790, 0.4003320, + 0.1682306, 0.2496215, 0.1248124, 0.3701515, 0.1621254, 0.3443225, 0.4871747, 0.1726720, 0.2077195, + 0.0079268, 0.4962989, 0.1110411, 0.2440522, 0.4165031, 0.0252984, 0.3045145, 0.4441046, 0.4572209, + 0.2415059, 0.4238202, 0.0530627, 0.3857849, 0.4134036, 0.3919643, 0.4948683, 0.0142855, 0.2768389, + 0.1728651, 0.3466487, 0.3448193, 0.3384884, 0.3576335, 0.1296077, 0.1268078, 0.2563025, 0.1895228, + 0.3345918, 0.4166048, 0.4054141, 0.2596988, 0.4439297, 0.4482521, 0.4021524, 0.2345200, 0.3526533, + 0.0461729, 0.0947451, 0.4132268, 0.2397596, 0.4953563, 0.1651538, 0.2868139, 0.1151714, 0.4802843, + 0.4690269, 0.1118892, 0.2297511, 0.3528297, 0.0649494, 0.1603665, 0.3632484, 0.4808010, 0.3155171, + 0.0421940, 0.3556329, 0.3017929, 0.2835062, 0.2400539, 0.2746342, 0.1047673, 0.0757288, 0.3054538, + 0.0880413, 0.0978730, 0.4568825, 0.3441654, 0.1345261, 0.3381947, 0.2440522, 0.1453612, 0.0627209, + 0.4289585, 0.3434332, 0.1462075, 0.4489491, 0.0539266, 0.0026571, 0.3888402, 0.4719980, 0.3474138, + 0.3838028, 0.2933232, 0.3665765, 0.1867701, 0.0273935, 0.5716440, 0.1602434, 0.4165031, 0.3889723, + 0.1373989, 0.0271059, 0.4913400, 0.2161066, 0.2785034, 0.4293712, 0.0975274, 0.0616420, 0.0990155, + 0.4227756, 0.3377662, 0.0591811, 0.0649494, 0.4863133, 0.3123243, 0.3094676, 0.4548634, 0.3543404, + 0.3803033, 0.2911978, 0.5482149, 0.0186765, 0.3810731, 0.1249269, 0.4478964, 0.0941925, 0.4553215, + 0.1950430, 0.1464626, 0.2461788, 0.2376485, 0.4577443, 0.3152796, 0.4464823, 0.3162361, 0.0355901, + 0.3969478, 0.2797376, 0.1502444, 0.1376181, 0.1268078, 0.1453612, 0.8429500, 0.2124143, 0.2319805, + 0.1930780, 0.4123132, 0.2932298, 0.3213883, 0.2446150, 0.2874195, 0.1246019, 0.2573348, 0.2502904, + 0.3494168, 0.3192719, 0.1457076, 0.1397347, 0.3928346, 0.3075456, 0.1254936, 0.2563025, 0.4863133, + 0.2630258, 0.1192136, 0.1283403, 0.3361003, 0.3254332, 0.5111299, 0.4567223, 0.3978934, 0.4631400, + 0.2652366, 0.0841302, 0.2239768, 0.1434079, 0.3600508, 0.6885277, 0.2562920, 0.1030985, 0.0627209, + 0.3123243, 0.2376485, 0.6660228, 0.2737032, 0.0725528, 0.4906516, 0.1702205, 0.0157230, 0.3577181, + 0.2774455, 0.2181222, 0.0358659, 0.0572191, 0.0743166, 0.3662207, 0.4167871, 0.0599440, 0.0469955, + 0.4773201, 0.1995547, 0.2167318, 0.4655130, 0.2909326, 0.4405020, 0.2974767, 0.0252984, 0.6660228, + 0.4688708, 0.4444213, 0.2486204, 0.1080630, 0.3200969, 0.0032627, 0.3529412, 0.3882434, 0.3538920, + 0.3427203, 0.1918956, 0.2639170, 0.2912215, 0.4249687, 0.0223306, 0.3398629, 0.1834991, 0.4289585, + 0.1192136, 0.2737032, 0.4688708, 0.1463357, 0.3640917, 0.2703603, 0.0053361, 0.0856992, 0.3855192, + 0.3848211, 0.4669757, 0.2107771, 0.4028377, 0.4546162, 0.1895228, 0.1603665, 0.1891034, 0.1633865, + 0.3932415, 0.4255019, 0.1807327, 0.1994108, 0.1046609, 0.1318027, 0.0167729, 0.1352609, 0.1506959, + 0.1067837, 0.1709328, 0.4277944, 0.3270837, 0.1983638, 0.3345918, 0.4444213, 0.4795561, 0.3394504, + 0.1148512, 0.4211857, 0.0710704, 0.0914677, 0.0379968, 0.0437878, 0.3614717, 0.1778870, 0.1760083, + 0.4911953, 0.3167321, 0.5553801, 0.3217881, 0.3917919, 0.1488771, 0.3404586, 0.3844901, 0.2239718, + 0.0684911, 0.0599609, 0.4877253, 0.3045145, 0.4166048, 0.3094676, 0.1283403, 0.4126990, 0.0727838, + 0.3816538, 0.3677183, 0.3288944, 0.4250860, 0.3152088, 0.0475468, 0.2720916, 0.1017065, 0.2501489, + 0.2253530, 0.4478221, 0.1064471, 0.0949263, 0.3674253, 0.4441046, 0.4054141, 0.3361003, 0.3239112, + 0.1663671, 0.0782135, 0.4374697, 0.0613140, 0.6431416, 0.1812549, 0.1701081, 0.4059448, 0.4893270, + 0.2157922, 0.2139573, 0.0232168, 0.0964920, 0.1524191, 0.4710790, 0.4609937, 0.1566380, 0.0489285, + 0.2313439, 0.3747997, 0.3018721, 0.3317510, 0.2405941, 0.4778197, 0.3747582, 0.3192275, 0.1495063, + 0.1170026, 0.2469246, 0.1656042, 0.1162840, 0.3262424, 0.2228194, 0.2089537, 0.4803574, 0.3632484, + 0.1891034, 0.3239112, 0.1381195, 0.0077237, 0.4404407, 0.4807387, 0.4036728, 0.3698108, 0.3969467, + 0.3886663, 0.4844082, 0.4753753, 0.0528503, 0.2075818, 0.0475201, 0.3434332, 0.3889723, 0.3254332, + 0.4126990, 0.4609937, 0.1381195, 0.0022522, 0.3466910, 0.3860448, 0.1873246, 0.3266448, 0.2233849, + 0.4632739, 0.4372073, 0.3133293, 0.4008097, 0.4356323, 0.0281233, 0.4662680, 0.2595815, 0.2596988, + 0.4808010, 0.1638856, 0.2168891, 0.0049234, 0.1753686, 0.3741804, 0.4124186, 0.2024299, 0.2787146, + 0.3364275, 0.0321264, 0.1997993, 0.4374486, 0.4439297, 0.2124143, 0.2074694, 0.1906150, 0.1204390, + 0.2799277, 0.3869004, 0.2441548, 0.2863414, 0.1778966, 0.7978231, 0.5805955, 0.0851296, 0.0026993, + 0.0508773, 0.4342381, 0.3946897, 0.1153671, 0.1491689, 0.3155171, 0.4548634, 0.1633865, 0.4795561, + 0.0727838, 0.1663671, 0.1552885, 0.4808156, 0.4563937, 0.1959839, 0.0873055, 0.2884416, 0.0097513, + 0.0770738, 0.2225533, 0.4107678, 0.2653476, 0.4482521, 0.1462075, 0.3816538, 0.0782135, 0.1552885, + 0.1813836, 0.4904932, 0.4955283, 0.3356108, 0.2478454, 0.4269330, 0.1745262, 0.3370988, 0.4572209, + 0.3543404, 0.0725528, 0.0077237, 0.3415696, 0.1628898, 0.4335400, 0.0675915, 0.1492740, 0.4655451, + 0.2777625, 0.1149032, 0.2007709, 0.2400093, 0.0658719, 0.4063063, 0.1237823, 0.2486204, 0.4374697, + 0.0022522, 0.1201562, 0.3725724, 0.4209127, 0.3532749, 0.4439365, 0.3121863, 0.0642578, 0.0742416, + 0.2011374, 0.0563368, 0.0282417, 0.0297401, 0.3876660, 0.5988698, 0.4610244, 0.2641133, 0.1591760, + 0.2415059, 0.1906150, 0.1628898, 0.3853460, 0.4039690, 0.4887115, 0.4618716, 0.0398270, 0.4915100, + 0.4278218, 0.1974726, 0.4251885, 0.3992334, 0.0068666, 0.4003320, 0.4238202, 0.0421940, 0.3394504, + 0.3677183, 0.1566380, 0.1204390}; + // TODO: Find a way to generate and validate test data without hardcoding them (issue #2485) const std::vector> inputsf = { {2, @@ -452,328 +757,9 @@ const std::vector> inputsd_SM = { 1e-15, raft::sparse::solver::LANCZOS_WHICH::SM, 42, - {0, 29, 51, 74, 103, 120, 142, 161, 181, 199, 217, 235, 254, 271, 295, - 314, 338, 364, 388, 405, 417, 437, 458, 478, 501, 511, 522, 539, 554, 574, - 590, 615, 638, 651, 679, 698, 717, 725, 741, 761, 779, 799, 817, 833, 850, - 864, 879, 896, 921, 938, 961, 985, 1004, 1019, 1035, 1048, 1070, 1084, 1102, 1123, - 1138, 1165, 1182, 1203, 1215, 1232, 1253, 1272, 1289, 1310, 1327, 1344, 1358, 1386, 1406, - 1428, 1450, 1470, 1485, 1503, 1516, 1529, 1553, 1571, 1596, 1614, 1629, 1647, 1676, 1695, - 1709, 1732, 1750, 1765, 1782, 1803, 1818, 1832, 1846, 1866, 1884}, - {0, 3, 5, 8, 14, 23, 29, 31, 33, 34, 35, 36, 39, 47, 49, 50, 51, 61, 62, 63, 75, 76, 80, 85, - 88, 91, 92, 94, 96, 1, 3, 6, 7, 8, 15, 19, 31, 35, 44, 48, 60, 65, 69, 72, 73, 76, 78, 80, - 85, 90, 97, 17, 26, 28, 41, 42, 43, 45, 48, 51, 52, 57, 58, 59, 62, 63, 65, 67, 68, 74, 86, 90, - 91, 92, 0, 1, 3, 4, 11, 15, 16, 18, 21, 30, 33, 35, 37, 40, 46, 49, 54, 55, 57, 59, 60, 66, - 67, 72, 76, 81, 84, 87, 88, 3, 10, 16, 23, 32, 34, 37, 39, 45, 47, 50, 57, 60, 61, 72, 83, 87, - 0, 10, 18, 31, 32, 33, 43, 52, 55, 56, 58, 60, 63, 67, 68, 72, 76, 77, 82, 86, 90, 92, 1, 16, - 21, 23, 24, 29, 30, 37, 47, 52, 53, 55, 56, 68, 69, 73, 83, 87, 94, 1, 11, 13, 21, 30, 33, 35, - 42, 61, 64, 65, 75, 78, 79, 81, 82, 89, 94, 95, 99, 0, 1, 12, 14, 16, 29, 49, 50, 56, 59, 64, - 66, 68, 72, 77, 87, 93, 98, 15, 26, 32, 33, 52, 53, 56, 58, 60, 64, 65, 70, 71, 81, 87, 93, 97, - 99, 4, 5, 21, 23, 26, 29, 34, 42, 56, 59, 64, 68, 71, 78, 83, 84, 87, 90, 3, 7, 11, 12, 21, - 23, 45, 47, 49, 55, 56, 75, 78, 79, 80, 83, 88, 90, 94, 8, 11, 15, 17, 24, 33, 34, 39, 41, 47, - 48, 53, 54, 61, 86, 93, 94, 7, 14, 15, 17, 22, 29, 30, 39, 41, 43, 45, 46, 47, 48, 55, 60, 62, - 72, 73, 77, 83, 84, 93, 98, 0, 8, 13, 18, 26, 33, 44, 45, 53, 54, 58, 72, 74, 75, 82, 87, 92, - 94, 98, 1, 3, 9, 12, 13, 16, 22, 26, 30, 58, 62, 68, 69, 73, 74, 75, 78, 80, 91, 93, 95, 96, - 97, 99, 3, 4, 6, 8, 15, 17, 18, 23, 25, 31, 42, 45, 47, 50, 55, 58, 60, 62, 65, 70, 72, 75, - 83, 84, 91, 92, 2, 12, 13, 16, 24, 26, 30, 31, 32, 33, 38, 42, 58, 60, 65, 68, 70, 74, 75, 85, - 92, 93, 94, 95, 3, 5, 14, 16, 20, 28, 33, 35, 51, 57, 62, 64, 69, 76, 85, 86, 91, 1, 30, 35, - 41, 48, 49, 50, 63, 65, 81, 88, 99, 18, 20, 24, 25, 26, 28, 29, 45, 61, 67, 72, 74, 75, 76, 80, - 85, 87, 94, 98, 99, 3, 6, 7, 10, 11, 24, 39, 43, 45, 47, 49, 52, 54, 55, 60, 65, 66, 68, 78, - 84, 89, 13, 15, 25, 29, 31, 32, 33, 36, 39, 41, 48, 49, 51, 52, 54, 58, 60, 75, 86, 87, 0, 4, - 6, 10, 11, 16, 25, 28, 30, 31, 37, 40, 41, 44, 51, 53, 58, 60, 66, 73, 80, 91, 92, 6, 12, 17, - 20, 21, 58, 73, 84, 92, 98, 16, 20, 22, 23, 34, 45, 46, 66, 78, 86, 92, 2, 9, 10, 14, 15, 17, - 20, 27, 29, 35, 50, 58, 64, 68, 73, 78, 88, 26, 29, 37, 48, 50, 53, 55, 56, 60, 67, 69, 71, 77, - 81, 88, 2, 18, 20, 23, 51, 55, 59, 63, 64, 67, 68, 72, 76, 77, 78, 83, 84, 87, 94, 98, 0, 6, - 8, 10, 13, 20, 22, 26, 27, 35, 49, 63, 73, 75, 86, 87, 3, 6, 7, 13, 15, 17, 19, 23, 31, 32, - 33, 39, 41, 45, 46, 47, 48, 61, 66, 68, 70, 79, 90, 95, 99, 0, 1, 5, 16, 17, 22, 23, 30, 32, - 45, 46, 47, 51, 53, 54, 60, 62, 66, 72, 79, 87, 94, 97, 4, 5, 9, 17, 22, 30, 31, 38, 51, 57, - 70, 79, 85, 0, 3, 5, 7, 9, 12, 14, 17, 18, 22, 30, 34, 37, 50, 55, 58, 60, 73, 79, 83, 87, - 89, 92, 93, 96, 97, 98, 99, 0, 4, 10, 12, 25, 33, 34, 38, 47, 52, 64, 65, 66, 68, 73, 81, 82, - 88, 91, 0, 1, 3, 7, 18, 19, 26, 29, 41, 50, 56, 57, 70, 72, 75, 82, 93, 95, 97, 0, 22, 46, - 62, 74, 76, 83, 86, 3, 4, 6, 23, 27, 33, 38, 39, 43, 55, 67, 71, 81, 85, 87, 90, 17, 32, 34, - 37, 40, 42, 43, 44, 46, 57, 59, 69, 72, 74, 79, 81, 87, 90, 92, 98, 0, 4, 12, 13, 21, 22, 30, - 37, 41, 60, 69, 73, 75, 82, 84, 90, 92, 99, 3, 23, 38, 41, 45, 46, 49, 54, 58, 59, 63, 67, 69, - 71, 76, 80, 81, 84, 93, 98, 2, 12, 13, 19, 22, 23, 30, 35, 39, 40, 51, 57, 70, 78, 83, 85, 90, - 94, 2, 7, 10, 16, 17, 38, 44, 47, 49, 64, 69, 76, 77, 79, 81, 83, 2, 5, 13, 21, 37, 38, 62, - 67, 68, 81, 82, 86, 87, 95, 96, 97, 98, 1, 14, 23, 38, 42, 51, 55, 71, 74, 75, 76, 77, 89, 96, - 2, 4, 11, 13, 14, 16, 20, 21, 25, 30, 31, 40, 60, 75, 94, 3, 13, 25, 30, 31, 36, 38, 40, 66, - 71, 72, 76, 81, 84, 88, 89, 95, 0, 4, 6, 11, 12, 13, 16, 21, 30, 31, 34, 42, 47, 49, 51, 55, - 65, 68, 70, 71, 73, 75, 84, 88, 95, 1, 2, 12, 13, 19, 22, 27, 30, 51, 56, 57, 72, 75, 79, 90, - 91, 98, 0, 3, 8, 11, 19, 21, 22, 29, 40, 42, 47, 49, 50, 55, 57, 61, 63, 77, 83, 88, 90, 91, - 93, 0, 4, 8, 16, 19, 26, 27, 33, 35, 49, 50, 52, 53, 55, 62, 65, 66, 68, 71, 78, 82, 90, 94, - 98, 0, 2, 18, 22, 23, 28, 31, 32, 41, 44, 47, 48, 56, 58, 69, 70, 83, 96, 98, 2, 5, 6, 9, - 21, 22, 34, 50, 62, 65, 66, 69, 72, 79, 84, 6, 9, 12, 14, 23, 27, 31, 50, 56, 58, 59, 67, 76, - 77, 81, 97, 3, 12, 14, 21, 22, 31, 40, 59, 67, 74, 81, 89, 90, 3, 5, 6, 11, 13, 16, 21, 27, - 28, 33, 37, 44, 47, 49, 50, 59, 71, 72, 83, 89, 91, 96, 5, 6, 8, 9, 10, 11, 27, 35, 48, 51, - 53, 62, 65, 74, 2, 3, 4, 18, 32, 35, 38, 41, 48, 49, 64, 66, 74, 86, 87, 94, 95, 98, 2, 5, - 9, 14, 15, 16, 17, 22, 23, 24, 26, 33, 40, 51, 53, 61, 70, 72, 81, 83, 85, 2, 3, 8, 10, 28, - 38, 40, 53, 54, 55, 68, 70, 81, 83, 98, 1, 3, 4, 5, 9, 13, 16, 17, 21, 22, 23, 27, 31, 33, - 39, 45, 60, 62, 70, 77, 80, 82, 83, 84, 85, 86, 98, 0, 4, 7, 12, 20, 30, 49, 58, 61, 62, 63, - 65, 72, 76, 83, 89, 91, 0, 2, 13, 15, 16, 18, 31, 36, 43, 50, 52, 56, 60, 61, 66, 72, 83, 87, - 89, 92, 93, 0, 2, 5, 19, 28, 29, 40, 49, 61, 63, 86, 90, 7, 8, 9, 10, 18, 26, 28, 34, 42, - 57, 72, 74, 82, 87, 88, 96, 99, 1, 2, 7, 9, 16, 17, 19, 21, 34, 47, 50, 52, 56, 61, 67, 83, - 89, 90, 95, 97, 99, 3, 8, 21, 23, 25, 30, 31, 34, 46, 50, 52, 57, 62, 79, 81, 85, 87, 90, 99, - 2, 3, 5, 20, 27, 28, 37, 40, 43, 53, 54, 65, 69, 82, 84, 89, 90, 2, 5, 6, 8, 10, 15, 17, - 21, 26, 28, 30, 34, 43, 47, 50, 59, 69, 70, 79, 88, 97, 1, 6, 15, 18, 27, 38, 39, 40, 42, 51, - 52, 67, 68, 71, 77, 80, 97, 9, 16, 17, 30, 32, 35, 41, 47, 51, 58, 59, 60, 68, 72, 77, 86, 93, - 9, 10, 27, 37, 40, 44, 46, 47, 50, 55, 69, 74, 87, 98, 1, 3, 4, 5, 8, 13, 14, 16, 20, 28, - 31, 35, 38, 46, 48, 52, 55, 58, 61, 62, 64, 70, 77, 78, 82, 86, 89, 99, 1, 6, 13, 15, 23, 24, - 26, 29, 33, 34, 39, 47, 76, 77, 83, 87, 88, 96, 98, 99, 2, 14, 15, 17, 20, 36, 38, 44, 54, 56, - 57, 64, 71, 80, 81, 85, 86, 87, 88, 92, 93, 95, 0, 7, 11, 14, 15, 16, 17, 20, 22, 29, 35, 39, - 44, 45, 47, 48, 78, 85, 90, 92, 94, 99, 0, 1, 3, 5, 18, 20, 28, 36, 40, 42, 44, 46, 53, 61, - 73, 80, 82, 84, 91, 95, 5, 8, 13, 27, 28, 42, 44, 49, 53, 60, 69, 70, 72, 73, 91, 1, 7, 10, - 11, 15, 21, 25, 26, 28, 41, 50, 72, 75, 81, 82, 87, 94, 96, 7, 11, 30, 31, 32, 33, 38, 42, 48, - 52, 66, 68, 82, 0, 1, 11, 15, 20, 23, 40, 60, 69, 74, 76, 80, 93, 3, 7, 9, 19, 27, 34, 37, - 38, 40, 42, 43, 46, 53, 54, 58, 59, 66, 74, 78, 81, 84, 87, 88, 91, 5, 7, 14, 34, 35, 39, 43, - 50, 60, 64, 67, 72, 76, 78, 79, 83, 84, 96, 4, 6, 10, 11, 13, 16, 28, 33, 36, 41, 42, 49, 51, - 55, 58, 59, 60, 61, 62, 65, 73, 82, 84, 86, 97, 3, 10, 13, 16, 21, 24, 28, 39, 40, 46, 47, 52, - 60, 67, 76, 81, 82, 83, 0, 1, 17, 18, 20, 32, 37, 41, 58, 60, 66, 74, 75, 90, 94, 2, 5, 12, - 18, 22, 25, 29, 36, 43, 57, 60, 63, 70, 72, 74, 83, 94, 99, 3, 4, 6, 8, 9, 10, 14, 20, 22, - 28, 29, 31, 33, 37, 38, 43, 57, 62, 64, 66, 71, 73, 74, 78, 81, 91, 94, 95, 99, 0, 3, 11, 19, - 26, 27, 34, 46, 47, 49, 64, 68, 73, 74, 81, 90, 94, 95, 97, 7, 21, 33, 44, 46, 54, 55, 61, 62, - 65, 67, 72, 91, 99, 1, 2, 5, 10, 11, 30, 37, 38, 39, 41, 48, 49, 50, 54, 63, 65, 66, 67, 75, - 85, 88, 91, 96, 0, 2, 15, 16, 18, 23, 34, 48, 49, 55, 61, 76, 77, 81, 87, 89, 90, 97, 0, 2, - 5, 14, 16, 17, 23, 24, 25, 33, 38, 39, 62, 74, 75, 8, 9, 12, 13, 15, 17, 33, 35, 40, 49, 62, - 70, 74, 80, 93, 98, 99, 0, 6, 7, 11, 12, 14, 17, 20, 28, 31, 41, 45, 50, 57, 75, 78, 85, 86, - 87, 88, 95, 7, 15, 17, 30, 35, 43, 46, 47, 57, 65, 74, 76, 87, 88, 94, 0, 15, 33, 43, 44, 51, - 55, 64, 73, 78, 82, 90, 96, 98, 1, 9, 15, 31, 33, 35, 43, 53, 65, 68, 69, 83, 88, 91, 8, 13, - 14, 20, 24, 28, 33, 38, 40, 43, 48, 50, 51, 57, 59, 60, 71, 73, 93, 96, 7, 9, 15, 19, 20, 30, - 33, 39, 64, 65, 66, 72, 73, 75, 86, 87, 89, 93}, - {0.8385492, 0.0887047, 0.4178915, 0.4859754, 0.4469863, 0.2195207, 0.3129920, 0.1031984, - 0.2898832, 0.3742032, 0.0522814, 0.3923617, 0.4283062, 0.2236069, 0.1620676, 0.0181036, - 0.0722899, 0.2825163, 0.2854958, 0.3136983, 0.4021524, 0.3556329, 0.4577443, 0.1463357, - 0.3288944, 0.4404407, 0.3466910, 0.2799277, 0.1813836, 0.4619252, 0.1622771, 0.2565850, - 0.3349850, 0.4806673, 0.2912005, 0.2509201, 0.6396587, 0.5977305, 0.1196116, 0.2077467, - 0.0345871, 0.4918659, 0.4194439, 0.4487811, 0.1682306, 0.3017929, 0.1373989, 0.3152796, - 0.3640917, 0.0489285, 0.4335400, 0.0987368, 0.1548646, 0.2137529, 0.0130792, 0.0752723, - 0.1238085, 0.3553386, 0.4349648, 0.3818015, 0.4697597, 0.4478265, 0.2176154, 0.3768051, - 0.3741169, 0.0550861, 0.3733355, 0.0161616, 0.0404749, 0.0530627, 0.3932415, 0.2313439, - 0.4807387, 0.3860448, 0.0887047, 0.1622771, 0.2646495, 0.4319774, 0.0975544, 0.3953015, - 0.4127654, 0.3950751, 0.0630765, 0.3240158, 0.3895027, 0.0263783, 0.3096741, 0.0810854, - 0.2185860, 0.2931856, 0.4413908, 0.4933484, 0.3265684, 0.3630947, 0.3439550, 0.4709083, - 0.4871525, 0.4059546, 0.2835062, 0.2319805, 0.1080630, 0.1148512, 0.4250860, 0.4319774, - 0.3417962, 0.1542346, 0.1705101, 0.3939655, 0.2228894, 0.2561502, 0.1612249, 0.3348420, - 0.7638237, 0.2223779, 0.1142358, 0.2221761, 0.1023570, 0.0100264, 0.4906516, 0.4211857, - 0.4178915, 0.2112697, 0.0841055, 0.3054300, 0.4681202, 0.3307955, 0.2055745, 0.3013350, - 0.0921099, 0.2272112, 0.4771985, 0.0400448, 0.4924752, 0.3142720, 0.3691756, 0.2582222, - 0.2400539, 0.4489491, 0.5111299, 0.4255019, 0.3747997, 0.1873246, 0.2565850, 0.1914687, - 0.3671139, 0.1276162, 0.3537677, 0.4076773, 0.1181683, 0.7192769, 0.2186738, 0.2885858, - 0.4734213, 0.0072575, 0.0765674, 0.0898227, 0.3649966, 0.2496215, 0.1702205, 0.0710704, - 0.3869004, 0.3349850, 0.1886938, 0.3514959, 0.4643647, 0.4223959, 0.3594954, 0.2522124, - 0.4105392, 0.2470788, 0.2545409, 0.3583593, 0.2345200, 0.0271059, 0.3803033, 0.1930780, - 0.4567223, 0.0613140, 0.2441548, 0.4808156, 0.3853460, 0.4859754, 0.4806673, 0.2801995, - 0.3858915, 0.0090301, 0.4087827, 0.3671360, 0.2667392, 0.4641679, 0.4647529, 0.3445000, - 0.1198545, 0.0282007, 0.1829597, 0.0539266, 0.0914677, 0.1638856, 0.1201562, 0.4388565, - 0.2036911, 0.2046127, 0.4811504, 0.3038480, 0.0642898, 0.2031245, 0.1680801, 0.0394903, - 0.4766186, 0.2023225, 0.0175873, 0.3034133, 0.4123132, 0.0379968, 0.2168891, 0.0675915, - 0.4039690, 0.3417962, 0.2112697, 0.2400451, 0.4558193, 0.1334496, 0.0195393, 0.3627390, - 0.4262152, 0.0403542, 0.3081270, 0.1527164, 0.0121030, 0.6241815, 0.4913400, 0.0157230, - 0.3200969, 0.0437878, 0.3018721, 0.0975544, 0.1886938, 0.8753713, 0.0700827, 0.2364397, - 0.4924574, 0.2563165, 0.1126200, 0.1547797, 0.0241622, 0.3814965, 0.3526533, 0.2161066, - 0.2911978, 0.4464823, 0.3577181, 0.3152088, 0.3317510, 0.2863414, 0.2801995, 0.0700827, - 0.3417172, 0.2610632, 0.4037673, 0.1736438, 0.0880198, 0.4559108, 0.1121846, 0.7814473, - 0.3779829, 0.3405251, 0.1208012, 0.4304054, 0.1807327, 0.0049234, 0.1778966, 0.3514959, - 0.2046946, 0.2997384, 0.2013881, 0.0548181, 0.3352703, 0.2054045, 0.3389475, 0.1449403, - 0.3906285, 0.0580903, 0.3582265, 0.1743012, 0.2712877, 0.4273703, 0.4566499, 0.0667344, - 0.0676206, 0.1248124, 0.0026571, 0.2774455, 0.0032627, 0.1753686, 0.3725724, 0.4469863, - 0.3858915, 0.2046946, 0.3794979, 0.4016317, 0.3370037, 0.0815573, 0.4647915, 0.0563985, - 0.4203163, 0.0915991, 0.0276749, 0.3857849, 0.0461729, 0.3978934, 0.3614717, 0.3266448, - 0.7978231, 0.4209127, 0.2912005, 0.3953015, 0.4388565, 0.3417172, 0.2997384, 0.4108247, - 0.2899171, 0.1479114, 0.4418810, 0.0634220, 0.0929668, 0.4055436, 0.2457036, 0.3701515, - 0.4134036, 0.0947451, 0.2785034, 0.3162361, 0.4036728, 0.3741804, 0.4563937, 0.4904932, - 0.1492740, 0.4887115, 0.4127654, 0.1542346, 0.1914687, 0.0090301, 0.4108247, 0.3533593, - 0.4300368, 0.3572507, 0.1412494, 0.4373029, 0.3273854, 0.2602280, 0.1690700, 0.4756982, - 0.0009060, 0.2393224, 0.0014211, 0.4101384, 0.1580024, 0.0231310, 0.5838791, 0.4132268, - 0.2181222, 0.3529412, 0.3698108, 0.2233849, 0.0987368, 0.2610632, 0.2013881, 0.3533593, - 0.2908257, 0.3609885, 0.2026076, 0.2999429, 0.2079948, 0.2704931, 0.2946429, 0.3154255, - 0.0627621, 0.2774129, 0.4206699, 0.0670598, 0.2860273, 0.3919643, 0.2397596, 0.2703603, - 0.4632739, 0.4124186, 0.5805955, 0.1959839, 0.3950751, 0.0841055, 0.3794979, 0.4300368, - 0.4032480, 0.2078872, 0.0094638, 0.2755707, 0.0376010, 0.4909527, 0.3097841, 0.2355419, - 0.0072671, 0.2746342, 0.0053361, 0.1994108, 0.3969467, 0.2509201, 0.3298818, 0.3886021, - 0.0245763, 0.4638373, 0.4052183, 0.4148478, 0.0242814, 0.2414050, 0.2932298, 0.0475468, - 0.4618716, 0.4032480, 0.8676416, 0.4028524, 0.3012557, 0.1360013, 0.1863026, 0.1490197, - 0.0643736, 0.3395792, 0.2925389, 0.3659366, 0.4948683, 0.4953563, 0.1047673, 0.0355901, - 0.0856992, 0.1778870, 0.0851296, 0.3532749, 0.0398270, 0.0630765, 0.3671139, 0.4643647, - 0.2400451, 0.2364397, 0.4431843, 0.1266264, 0.4763364, 0.7873081, 0.2751093, 0.4222012, - 0.1121367, 0.4474346, 0.3652081, 0.1600931, 0.0614609, 0.0204758, 0.1615355, 0.4293712, - 0.3882434, 0.6431416, 0.0548181, 0.2899171, 0.3634890, 0.4412351, 0.1490288, 0.0447601, - 0.4229826, 0.3807294, 0.0672451, 0.2775799, 0.4666647, 0.4085002, 0.1297752, 0.1563804, - 0.1522877, 0.2532282, 0.2805034, 0.1651538, 0.1046609, 0.1760083, 0.2195207, 0.1705101, - 0.1276162, 0.4558193, 0.4924574, 0.3572507, 0.3401189, 0.0565680, 0.4332137, 0.2150277, - 0.4809324, 0.2783410, 0.1570549, 0.4891155, 0.4529251, 0.2209245, 0.3658022, 0.3961954, - 0.3788675, 0.1621254, 0.3969478, 0.3886663, 0.4372073, 0.3537677, 0.4037673, 0.2908257, - 0.4028524, 0.4431843, 0.7202524, 0.3443225, 0.3538920, 0.3133293, 0.4439365, 0.1412494, - 0.3012557, 0.3634890, 0.3401189, 0.1250412, 0.4831129, 0.0737263, 0.3228796, 0.0975274, - 0.1318027, 0.4008097, 0.1548646, 0.2036911, 0.1334496, 0.4016317, 0.1479114, 0.3609885, - 0.1360013, 0.1494316, 0.4203018, 0.2847606, 0.1855530, 0.3948809, 0.1457941, 0.1710113, - 0.4871747, 0.0616420, 0.2720916, 0.1494316, 0.3342525, 0.4981484, 0.2835164, 0.2201109, - 0.3569505, 0.3228796, 0.2664382, 0.1461955, 0.2912845, 0.2178672, 0.0091858, 0.3888402, - 0.3213883, 0.1017065, 0.2137529, 0.2078872, 0.1863026, 0.0565680, 0.2497744, 0.0917027, - 0.3077455, 0.2898162, 0.1962939, 0.0667715, 0.0511321, 0.4857582, 0.0757288, 0.4719980, - 0.0990155, 0.0358659, 0.3427203, 0.4911953, 0.0026993, 0.3121863, 0.3129920, 0.4076773, - 0.4087827, 0.0195393, 0.3352703, 0.1490197, 0.4412351, 0.4203018, 0.3342525, 0.4991112, - 0.3198876, 0.0273423, 0.1726720, 0.2868139, 0.0167729, 0.3167321, 0.3240158, 0.1181683, - 0.4223959, 0.2054045, 0.4418810, 0.2026076, 0.3298818, 0.4332137, 0.4679078, 0.2938424, - 0.2349892, 0.3265936, 0.4161196, 0.0540847, 0.4671349, 0.4922210, 0.4333457, 0.2783662, - 0.3295173, 0.1414430, 0.4789151, 0.5482149, 0.2405941, 0.0873055, 0.4915100, 0.1031984, - 0.6396587, 0.3054300, 0.4373029, 0.2999429, 0.1490288, 0.2150277, 0.4679078, 0.4463057, - 0.3714156, 0.1611302, 0.3379962, 0.4654491, 0.0994459, 0.4963855, 0.0027219, 0.2011968, - 0.2413642, 0.0713272, 0.0186765, 0.5553801, 0.0508773, 0.4655451, 0.3939655, 0.4681202, - 0.2046127, 0.2079948, 0.0447601, 0.2938424, 0.4463057, 0.4189366, 0.4805591, 0.4724835, - 0.4029289, 0.3810731, 0.3855192, 0.2898832, 0.3895027, 0.3307955, 0.3594954, 0.4811504, - 0.1736438, 0.3370037, 0.2704931, 0.0094638, 0.4229826, 0.2349892, 0.1488369, 0.3299349, - 0.3658398, 0.2805756, 0.1943161, 0.1270155, 0.2077195, 0.1249269, 0.0572191, 0.3217881, - 0.1812549, 0.4356323, 0.2024299, 0.4955283, 0.2777625, 0.0642578, 0.4278218, 0.3742032, - 0.2228894, 0.3627390, 0.0880198, 0.1250412, 0.1488369, 0.6981739, 0.2518100, 0.2364128, - 0.4279115, 0.4212285, 0.4749146, 0.2284694, 0.1864383, 0.0079268, 0.2446150, 0.4631400, - 0.2501489, 0.4844082, 0.0522814, 0.5977305, 0.0263783, 0.2522124, 0.2755707, 0.3886021, - 0.2847606, 0.4991112, 0.0239194, 0.4028964, 0.2294849, 0.2998522, 0.1320064, 0.0275548, - 0.1151714, 0.2652366, 0.2787146, 0.2884416, 0.1149032, 0.3923617, 0.3807294, 0.0540387, - 0.2807390, 0.0142855, 0.3054538, 0.0743166, 0.1352609, 0.3096741, 0.2561502, 0.7192769, - 0.4809324, 0.4981484, 0.3299349, 0.2030550, 0.2820974, 0.3606436, 0.1871530, 0.2116934, - 0.1441479, 0.2874195, 0.3848211, 0.3917919, 0.4778197, 0.2946429, 0.4189366, 0.2518100, - 0.2030550, 0.4912895, 0.1356941, 0.2409017, 0.4399648, 0.2600915, 0.1039219, 0.0522639, - 0.1473574, 0.1156571, 0.2768389, 0.4478964, 0.1246019, 0.1488771, 0.3747582, 0.0281233, - 0.0742416, 0.4283062, 0.1612249, 0.4559108, 0.3389475, 0.1266264, 0.0672451, 0.3265936, - 0.2820974, 0.3309392, 0.0915848, 0.0509763, 0.4962989, 0.4802843, 0.0841302, 0.1918956, - 0.3192275, 0.4662680, 0.1974726, 0.0810854, 0.2783410, 0.4912895, 0.3111583, 0.4521906, - 0.2043965, 0.3393941, 0.2771504, 0.4931641, 0.1747926, 0.0280012, 0.3078630, 0.0456258, - 0.1170995, 0.0880413, 0.2797376, 0.2573348, 0.2639170, 0.3364275, 0.2011374, 0.0130792, - 0.1121846, 0.1449403, 0.0245763, 0.2775799, 0.1570549, 0.4161196, 0.0239194, 0.3309392, - 0.3111583, 0.3020653, 0.0100230, 0.4954931, 0.4227756, 0.3662207, 0.4669757, 0.1495063, - 0.4342381, 0.0752723, 0.4105392, 0.4262152, 0.3273854, 0.3154255, 0.1356941, 0.1063635, - 0.3477053, 0.4418667, 0.4065750, 0.2158301, 0.0978730, 0.3474138, 0.0941925, 0.2502904, - 0.4167871, 0.1238085, 0.2055745, 0.3906285, 0.4763364, 0.3606436, 0.2409017, 0.2856070, - 0.4519934, 0.0640926, 0.3494168, 0.2239768, 0.1506959, 0.3404586, 0.0097513, 0.3356108, - 0.2007709, 0.0563368, 0.1196116, 0.0815573, 0.4891155, 0.4399648, 0.1063635, 0.0469109, - 0.4409516, 0.2269343, 0.1728651, 0.4690269, 0.4568825, 0.3838028, 0.1701081, 0.2478454, - 0.3553386, 0.3348420, 0.2563165, 0.0580903, 0.4647915, 0.2602280, 0.0643736, 0.7873081, - 0.4831129, 0.0540847, 0.3714156, 0.4521906, 0.0529002, 0.1118892, 0.3946897, 0.2185860, - 0.3582265, 0.0737263, 0.4671349, 0.1611302, 0.0540387, 0.2600915, 0.2043965, 0.0178831, - 0.3605796, 0.4215185, 0.3441654, 0.3192719, 0.2912215, 0.2253530, 0.4059448, 0.0770738, - 0.2236069, 0.7638237, 0.2186738, 0.1126200, 0.7814473, 0.1743012, 0.1690700, 0.2751093, - 0.4922210, 0.3379962, 0.2364128, 0.3477053, 0.7218004, 0.3724327, 0.2531753, 0.0252278, - 0.2816279, 0.1346799, 0.1643871, 0.3633022, 0.1110411, 0.2297511, 0.4249687, 0.4478221, - 0.2225533, 0.2077467, 0.4349648, 0.3779829, 0.2712877, 0.4638373, 0.4666647, 0.2835164, - 0.4333457, 0.4028734, 0.3229839, 0.3908435, 0.3720633, 0.3528297, 0.4553215, 0.1170026, - 0.4753753, 0.0282417, 0.1620676, 0.2931856, 0.3671360, 0.1547797, 0.4052183, 0.4222012, - 0.4085002, 0.3198876, 0.3393941, 0.4418667, 0.3724327, 0.0297363, 0.4194855, 0.1562718, - 0.1693750, 0.3152241, 0.3387593, 0.2933232, 0.0599440, 0.1064471, 0.2469246, 0.0528503, - 0.0321264, 0.0181036, 0.2223779, 0.2667392, 0.4756982, 0.4148478, 0.1855530, 0.2201109, - 0.3658398, 0.4028964, 0.4194855, 0.1724464, 0.2184300, 0.4806912, 0.3213868, 0.4946703, - 0.0183148, 0.4068079, 0.3882787, 0.1461515, 0.3377662, 0.1434079, 0.1656042, 0.1153671, - 0.0297401, 0.0722899, 0.3818015, 0.0376010, 0.1297752, 0.4529251, 0.2497744, 0.4654491, - 0.4805591, 0.3020653, 0.0469109, 0.2531753, 0.4028734, 0.3104094, 0.0983794, 0.3041750, - 0.7444220, 0.0469955, 0.4269330, 0.3876660, 0.4697597, 0.3013350, 0.2885858, 0.3038480, - 0.1121367, 0.1563804, 0.4279115, 0.2184300, 0.3897764, 0.1165223, 0.1623044, 0.3694641, - 0.4647038, 0.1950430, 0.0223306, 0.4734213, 0.0642898, 0.3405251, 0.0563985, 0.2209245, - 0.3569505, 0.0994459, 0.4806912, 0.3142114, 0.1688596, 0.2013356, 0.3616973, 0.1345261, - 0.3665765, 0.1457076, 0.2400093, 0.4413908, 0.1208012, 0.4203163, 0.4474346, 0.1522877, - 0.4963855, 0.2771504, 0.3932629, 0.2256821, 0.3466487, 0.1397347, 0.4893270, 0.1162840, - 0.4933484, 0.0921099, 0.0072575, 0.0241622, 0.4273703, 0.0009060, 0.3652081, 0.3228796, - 0.0917027, 0.2805756, 0.1871530, 0.4409516, 0.0252278, 0.1562718, 0.3213868, 0.0526326, - 0.2417610, 0.1361428, 0.4773201, 0.2157922, 0.2075818, 0.1745262, 0.2272112, 0.0765674, - 0.4641679, 0.2031245, 0.0403542, 0.3814965, 0.2664382, 0.2294849, 0.3229839, 0.3104094, - 0.3142114, 0.1920804, 0.3407301, 0.3448193, 0.4478265, 0.3265684, 0.1142358, 0.4909527, - 0.4724835, 0.2998522, 0.1039219, 0.0100230, 0.3908435, 0.1693750, 0.1674092, 0.0846982, - 0.3384884, 0.1067837, 0.3844901, 0.1491689, 0.4107678, 0.5988698, 0.2176154, 0.4771985, - 0.1680801, 0.0915991, 0.0634220, 0.2393224, 0.0627621, 0.2532282, 0.3658022, 0.7202524, - 0.3948809, 0.1943161, 0.4931641, 0.0983794, 0.1688596, 0.4067034, 0.2580674, 0.4757213, - 0.3928346, 0.1995547, 0.2107771, 0.3768051, 0.3630947, 0.4647529, 0.3081270, 0.3077455, - 0.0522639, 0.1747926, 0.2013356, 0.3932629, 0.0526326, 0.3694007, 0.0972740, 0.3075456, - 0.2167318, 0.4610244, 0.0345871, 0.3439550, 0.2221761, 0.0400448, 0.0394903, 0.4566499, - 0.0014211, 0.2774129, 0.1600931, 0.2805034, 0.3961954, 0.1461955, 0.0027219, 0.1270155, - 0.0915848, 0.0529002, 0.0703681, 0.0187762, 0.2613653, 0.1867701, 0.1502444, 0.3600508, - 0.4655130, 0.3398629, 0.4028377, 0.1709328, 0.2641133, 0.2825163, 0.1023570, 0.2470788, - 0.4304054, 0.3395792, 0.2783662, 0.3152241, 0.4067034, 0.9997413, 0.3054797, 0.4133712, - 0.0630975, 0.0166616, 0.3381947, 0.2909326, 0.2139573, 0.0475201, 0.2854958, 0.3741169, - 0.0667344, 0.0929668, 0.4101384, 0.3097841, 0.2011968, 0.2807390, 0.2856070, 0.4946703, - 0.3897764, 0.1920804, 0.0187762, 0.3054797, 0.0461345, 0.2358043, 0.4405020, 0.2239718, - 0.0232168, 0.2595815, 0.1997993, 0.3136983, 0.0550861, 0.4924752, 0.0242814, 0.2898162, - 0.0273423, 0.0280012, 0.3387593, 0.4133712, 0.1691249, 0.4277944, 0.3262424, 0.2545409, - 0.3445000, 0.4766186, 0.1527164, 0.2355419, 0.1457941, 0.1962939, 0.4212285, 0.4065750, - 0.1674092, 0.0040041, 0.3576335, 0.6885277, 0.0684911, 0.0949263, 0.3370988, 0.4251885, - 0.4918659, 0.3733355, 0.3583593, 0.2023225, 0.1580024, 0.4206699, 0.2414050, 0.0614609, - 0.4749146, 0.2816279, 0.0183148, 0.1165223, 0.3407301, 0.0630975, 0.3476292, 0.2974767, - 0.0964920, 0.2228194, 0.2653476, 0.0658719, 0.3992334, 0.4709083, 0.1198545, 0.0204758, - 0.3788675, 0.3228796, 0.3295173, 0.2413642, 0.2284694, 0.0178831, 0.4068079, 0.1623044, - 0.0846982, 0.0461345, 0.1464626, 0.1254936, 0.4546162, 0.0599609, 0.2089537, 0.0068666, - 0.0161616, 0.4871525, 0.3142720, 0.2925389, 0.2912845, 0.0667715, 0.2116934, 0.3078630, - 0.4519934, 0.3616973, 0.2256821, 0.3476292, 0.1306226, 0.2562920, 0.1834991, 0.1524191, - 0.4803574, 0.0404749, 0.3691756, 0.0898227, 0.0282007, 0.0121030, 0.4055436, 0.0670598, - 0.1615355, 0.1710113, 0.0511321, 0.1414430, 0.1864383, 0.0640926, 0.1346799, 0.3882787, - 0.3694007, 0.0812578, 0.3378220, 0.2461788, 0.3674253, 0.4063063, 0.4194439, 0.3649966, - 0.2457036, 0.0072671, 0.2178672, 0.1473574, 0.0509763, 0.0456258, 0.2158301, 0.3041750, - 0.3694641, 0.1306226, 0.0812578, 0.4179677, 0.0273935, 0.1376181, 0.1237823, 0.0175873, - 0.0231310, 0.2860273, 0.4789151, 0.4029289, 0.1320064, 0.4954931, 0.1643871, 0.7444220, - 0.2580674, 0.0972740, 0.2613653, 0.3378220, 0.0734471, 0.5716440, 0.3270837, 0.4374486, - 0.3034133, 0.6241815, 0.0091858, 0.1441479, 0.1170995, 0.2269343, 0.3605796, 0.3633022, - 0.1461515, 0.2417610, 0.4179677, 0.1296077, 0.4877253, 0.1591760, 0.4487811, 0.4059546, - 0.0100264, 0.2582222, 0.1829597, 0.0676206, 0.0276749, 0.5838791, 0.3659366, 0.4857582, - 0.0713272, 0.0275548, 0.1156571, 0.4215185, 0.3720633, 0.4647038, 0.1361428, 0.4757213, - 0.0166616, 0.2358043, 0.0040041, 0.0734471, 0.1602434, 0.0591811, 0.1030985, 0.1983638, - 0.4710790, 0.4003320, 0.1682306, 0.2496215, 0.1248124, 0.3701515, 0.1621254, 0.3443225, - 0.4871747, 0.1726720, 0.2077195, 0.0079268, 0.4962989, 0.1110411, 0.2440522, 0.4165031, - 0.0252984, 0.3045145, 0.4441046, 0.4572209, 0.2415059, 0.4238202, 0.0530627, 0.3857849, - 0.4134036, 0.3919643, 0.4948683, 0.0142855, 0.2768389, 0.1728651, 0.3466487, 0.3448193, - 0.3384884, 0.3576335, 0.1296077, 0.1268078, 0.2563025, 0.1895228, 0.3345918, 0.4166048, - 0.4054141, 0.2596988, 0.4439297, 0.4482521, 0.4021524, 0.2345200, 0.3526533, 0.0461729, - 0.0947451, 0.4132268, 0.2397596, 0.4953563, 0.1651538, 0.2868139, 0.1151714, 0.4802843, - 0.4690269, 0.1118892, 0.2297511, 0.3528297, 0.0649494, 0.1603665, 0.3632484, 0.4808010, - 0.3155171, 0.0421940, 0.3556329, 0.3017929, 0.2835062, 0.2400539, 0.2746342, 0.1047673, - 0.0757288, 0.3054538, 0.0880413, 0.0978730, 0.4568825, 0.3441654, 0.1345261, 0.3381947, - 0.2440522, 0.1453612, 0.0627209, 0.4289585, 0.3434332, 0.1462075, 0.4489491, 0.0539266, - 0.0026571, 0.3888402, 0.4719980, 0.3474138, 0.3838028, 0.2933232, 0.3665765, 0.1867701, - 0.0273935, 0.5716440, 0.1602434, 0.4165031, 0.3889723, 0.1373989, 0.0271059, 0.4913400, - 0.2161066, 0.2785034, 0.4293712, 0.0975274, 0.0616420, 0.0990155, 0.4227756, 0.3377662, - 0.0591811, 0.0649494, 0.4863133, 0.3123243, 0.3094676, 0.4548634, 0.3543404, 0.3803033, - 0.2911978, 0.5482149, 0.0186765, 0.3810731, 0.1249269, 0.4478964, 0.0941925, 0.4553215, - 0.1950430, 0.1464626, 0.2461788, 0.2376485, 0.4577443, 0.3152796, 0.4464823, 0.3162361, - 0.0355901, 0.3969478, 0.2797376, 0.1502444, 0.1376181, 0.1268078, 0.1453612, 0.8429500, - 0.2124143, 0.2319805, 0.1930780, 0.4123132, 0.2932298, 0.3213883, 0.2446150, 0.2874195, - 0.1246019, 0.2573348, 0.2502904, 0.3494168, 0.3192719, 0.1457076, 0.1397347, 0.3928346, - 0.3075456, 0.1254936, 0.2563025, 0.4863133, 0.2630258, 0.1192136, 0.1283403, 0.3361003, - 0.3254332, 0.5111299, 0.4567223, 0.3978934, 0.4631400, 0.2652366, 0.0841302, 0.2239768, - 0.1434079, 0.3600508, 0.6885277, 0.2562920, 0.1030985, 0.0627209, 0.3123243, 0.2376485, - 0.6660228, 0.2737032, 0.0725528, 0.4906516, 0.1702205, 0.0157230, 0.3577181, 0.2774455, - 0.2181222, 0.0358659, 0.0572191, 0.0743166, 0.3662207, 0.4167871, 0.0599440, 0.0469955, - 0.4773201, 0.1995547, 0.2167318, 0.4655130, 0.2909326, 0.4405020, 0.2974767, 0.0252984, - 0.6660228, 0.4688708, 0.4444213, 0.2486204, 0.1080630, 0.3200969, 0.0032627, 0.3529412, - 0.3882434, 0.3538920, 0.3427203, 0.1918956, 0.2639170, 0.2912215, 0.4249687, 0.0223306, - 0.3398629, 0.1834991, 0.4289585, 0.1192136, 0.2737032, 0.4688708, 0.1463357, 0.3640917, - 0.2703603, 0.0053361, 0.0856992, 0.3855192, 0.3848211, 0.4669757, 0.2107771, 0.4028377, - 0.4546162, 0.1895228, 0.1603665, 0.1891034, 0.1633865, 0.3932415, 0.4255019, 0.1807327, - 0.1994108, 0.1046609, 0.1318027, 0.0167729, 0.1352609, 0.1506959, 0.1067837, 0.1709328, - 0.4277944, 0.3270837, 0.1983638, 0.3345918, 0.4444213, 0.4795561, 0.3394504, 0.1148512, - 0.4211857, 0.0710704, 0.0914677, 0.0379968, 0.0437878, 0.3614717, 0.1778870, 0.1760083, - 0.4911953, 0.3167321, 0.5553801, 0.3217881, 0.3917919, 0.1488771, 0.3404586, 0.3844901, - 0.2239718, 0.0684911, 0.0599609, 0.4877253, 0.3045145, 0.4166048, 0.3094676, 0.1283403, - 0.4126990, 0.0727838, 0.3816538, 0.3677183, 0.3288944, 0.4250860, 0.3152088, 0.0475468, - 0.2720916, 0.1017065, 0.2501489, 0.2253530, 0.4478221, 0.1064471, 0.0949263, 0.3674253, - 0.4441046, 0.4054141, 0.3361003, 0.3239112, 0.1663671, 0.0782135, 0.4374697, 0.0613140, - 0.6431416, 0.1812549, 0.1701081, 0.4059448, 0.4893270, 0.2157922, 0.2139573, 0.0232168, - 0.0964920, 0.1524191, 0.4710790, 0.4609937, 0.1566380, 0.0489285, 0.2313439, 0.3747997, - 0.3018721, 0.3317510, 0.2405941, 0.4778197, 0.3747582, 0.3192275, 0.1495063, 0.1170026, - 0.2469246, 0.1656042, 0.1162840, 0.3262424, 0.2228194, 0.2089537, 0.4803574, 0.3632484, - 0.1891034, 0.3239112, 0.1381195, 0.0077237, 0.4404407, 0.4807387, 0.4036728, 0.3698108, - 0.3969467, 0.3886663, 0.4844082, 0.4753753, 0.0528503, 0.2075818, 0.0475201, 0.3434332, - 0.3889723, 0.3254332, 0.4126990, 0.4609937, 0.1381195, 0.0022522, 0.3466910, 0.3860448, - 0.1873246, 0.3266448, 0.2233849, 0.4632739, 0.4372073, 0.3133293, 0.4008097, 0.4356323, - 0.0281233, 0.4662680, 0.2595815, 0.2596988, 0.4808010, 0.1638856, 0.2168891, 0.0049234, - 0.1753686, 0.3741804, 0.4124186, 0.2024299, 0.2787146, 0.3364275, 0.0321264, 0.1997993, - 0.4374486, 0.4439297, 0.2124143, 0.2074694, 0.1906150, 0.1204390, 0.2799277, 0.3869004, - 0.2441548, 0.2863414, 0.1778966, 0.7978231, 0.5805955, 0.0851296, 0.0026993, 0.0508773, - 0.4342381, 0.3946897, 0.1153671, 0.1491689, 0.3155171, 0.4548634, 0.1633865, 0.4795561, - 0.0727838, 0.1663671, 0.1552885, 0.4808156, 0.4563937, 0.1959839, 0.0873055, 0.2884416, - 0.0097513, 0.0770738, 0.2225533, 0.4107678, 0.2653476, 0.4482521, 0.1462075, 0.3816538, - 0.0782135, 0.1552885, 0.1813836, 0.4904932, 0.4955283, 0.3356108, 0.2478454, 0.4269330, - 0.1745262, 0.3370988, 0.4572209, 0.3543404, 0.0725528, 0.0077237, 0.3415696, 0.1628898, - 0.4335400, 0.0675915, 0.1492740, 0.4655451, 0.2777625, 0.1149032, 0.2007709, 0.2400093, - 0.0658719, 0.4063063, 0.1237823, 0.2486204, 0.4374697, 0.0022522, 0.1201562, 0.3725724, - 0.4209127, 0.3532749, 0.4439365, 0.3121863, 0.0642578, 0.0742416, 0.2011374, 0.0563368, - 0.0282417, 0.0297401, 0.3876660, 0.5988698, 0.4610244, 0.2641133, 0.1591760, 0.2415059, - 0.1906150, 0.1628898, 0.3853460, 0.4039690, 0.4887115, 0.4618716, 0.0398270, 0.4915100, - 0.4278218, 0.1974726, 0.4251885, 0.3992334, 0.0068666, 0.4003320, 0.4238202, 0.0421940, - 0.3394504, 0.3677183, 0.1566380, 0.1204390}, + rows, + cols, + vals, {-0.03865971, -0.00056997}}}; const std::vector> inputsd_LM = { @@ -785,328 +771,9 @@ const std::vector> inputsd_LM = { 1e-15, raft::sparse::solver::LANCZOS_WHICH::LM, 42, - {0, 29, 51, 74, 103, 120, 142, 161, 181, 199, 217, 235, 254, 271, 295, - 314, 338, 364, 388, 405, 417, 437, 458, 478, 501, 511, 522, 539, 554, 574, - 590, 615, 638, 651, 679, 698, 717, 725, 741, 761, 779, 799, 817, 833, 850, - 864, 879, 896, 921, 938, 961, 985, 1004, 1019, 1035, 1048, 1070, 1084, 1102, 1123, - 1138, 1165, 1182, 1203, 1215, 1232, 1253, 1272, 1289, 1310, 1327, 1344, 1358, 1386, 1406, - 1428, 1450, 1470, 1485, 1503, 1516, 1529, 1553, 1571, 1596, 1614, 1629, 1647, 1676, 1695, - 1709, 1732, 1750, 1765, 1782, 1803, 1818, 1832, 1846, 1866, 1884}, - {0, 3, 5, 8, 14, 23, 29, 31, 33, 34, 35, 36, 39, 47, 49, 50, 51, 61, 62, 63, 75, 76, 80, 85, - 88, 91, 92, 94, 96, 1, 3, 6, 7, 8, 15, 19, 31, 35, 44, 48, 60, 65, 69, 72, 73, 76, 78, 80, - 85, 90, 97, 17, 26, 28, 41, 42, 43, 45, 48, 51, 52, 57, 58, 59, 62, 63, 65, 67, 68, 74, 86, 90, - 91, 92, 0, 1, 3, 4, 11, 15, 16, 18, 21, 30, 33, 35, 37, 40, 46, 49, 54, 55, 57, 59, 60, 66, - 67, 72, 76, 81, 84, 87, 88, 3, 10, 16, 23, 32, 34, 37, 39, 45, 47, 50, 57, 60, 61, 72, 83, 87, - 0, 10, 18, 31, 32, 33, 43, 52, 55, 56, 58, 60, 63, 67, 68, 72, 76, 77, 82, 86, 90, 92, 1, 16, - 21, 23, 24, 29, 30, 37, 47, 52, 53, 55, 56, 68, 69, 73, 83, 87, 94, 1, 11, 13, 21, 30, 33, 35, - 42, 61, 64, 65, 75, 78, 79, 81, 82, 89, 94, 95, 99, 0, 1, 12, 14, 16, 29, 49, 50, 56, 59, 64, - 66, 68, 72, 77, 87, 93, 98, 15, 26, 32, 33, 52, 53, 56, 58, 60, 64, 65, 70, 71, 81, 87, 93, 97, - 99, 4, 5, 21, 23, 26, 29, 34, 42, 56, 59, 64, 68, 71, 78, 83, 84, 87, 90, 3, 7, 11, 12, 21, - 23, 45, 47, 49, 55, 56, 75, 78, 79, 80, 83, 88, 90, 94, 8, 11, 15, 17, 24, 33, 34, 39, 41, 47, - 48, 53, 54, 61, 86, 93, 94, 7, 14, 15, 17, 22, 29, 30, 39, 41, 43, 45, 46, 47, 48, 55, 60, 62, - 72, 73, 77, 83, 84, 93, 98, 0, 8, 13, 18, 26, 33, 44, 45, 53, 54, 58, 72, 74, 75, 82, 87, 92, - 94, 98, 1, 3, 9, 12, 13, 16, 22, 26, 30, 58, 62, 68, 69, 73, 74, 75, 78, 80, 91, 93, 95, 96, - 97, 99, 3, 4, 6, 8, 15, 17, 18, 23, 25, 31, 42, 45, 47, 50, 55, 58, 60, 62, 65, 70, 72, 75, - 83, 84, 91, 92, 2, 12, 13, 16, 24, 26, 30, 31, 32, 33, 38, 42, 58, 60, 65, 68, 70, 74, 75, 85, - 92, 93, 94, 95, 3, 5, 14, 16, 20, 28, 33, 35, 51, 57, 62, 64, 69, 76, 85, 86, 91, 1, 30, 35, - 41, 48, 49, 50, 63, 65, 81, 88, 99, 18, 20, 24, 25, 26, 28, 29, 45, 61, 67, 72, 74, 75, 76, 80, - 85, 87, 94, 98, 99, 3, 6, 7, 10, 11, 24, 39, 43, 45, 47, 49, 52, 54, 55, 60, 65, 66, 68, 78, - 84, 89, 13, 15, 25, 29, 31, 32, 33, 36, 39, 41, 48, 49, 51, 52, 54, 58, 60, 75, 86, 87, 0, 4, - 6, 10, 11, 16, 25, 28, 30, 31, 37, 40, 41, 44, 51, 53, 58, 60, 66, 73, 80, 91, 92, 6, 12, 17, - 20, 21, 58, 73, 84, 92, 98, 16, 20, 22, 23, 34, 45, 46, 66, 78, 86, 92, 2, 9, 10, 14, 15, 17, - 20, 27, 29, 35, 50, 58, 64, 68, 73, 78, 88, 26, 29, 37, 48, 50, 53, 55, 56, 60, 67, 69, 71, 77, - 81, 88, 2, 18, 20, 23, 51, 55, 59, 63, 64, 67, 68, 72, 76, 77, 78, 83, 84, 87, 94, 98, 0, 6, - 8, 10, 13, 20, 22, 26, 27, 35, 49, 63, 73, 75, 86, 87, 3, 6, 7, 13, 15, 17, 19, 23, 31, 32, - 33, 39, 41, 45, 46, 47, 48, 61, 66, 68, 70, 79, 90, 95, 99, 0, 1, 5, 16, 17, 22, 23, 30, 32, - 45, 46, 47, 51, 53, 54, 60, 62, 66, 72, 79, 87, 94, 97, 4, 5, 9, 17, 22, 30, 31, 38, 51, 57, - 70, 79, 85, 0, 3, 5, 7, 9, 12, 14, 17, 18, 22, 30, 34, 37, 50, 55, 58, 60, 73, 79, 83, 87, - 89, 92, 93, 96, 97, 98, 99, 0, 4, 10, 12, 25, 33, 34, 38, 47, 52, 64, 65, 66, 68, 73, 81, 82, - 88, 91, 0, 1, 3, 7, 18, 19, 26, 29, 41, 50, 56, 57, 70, 72, 75, 82, 93, 95, 97, 0, 22, 46, - 62, 74, 76, 83, 86, 3, 4, 6, 23, 27, 33, 38, 39, 43, 55, 67, 71, 81, 85, 87, 90, 17, 32, 34, - 37, 40, 42, 43, 44, 46, 57, 59, 69, 72, 74, 79, 81, 87, 90, 92, 98, 0, 4, 12, 13, 21, 22, 30, - 37, 41, 60, 69, 73, 75, 82, 84, 90, 92, 99, 3, 23, 38, 41, 45, 46, 49, 54, 58, 59, 63, 67, 69, - 71, 76, 80, 81, 84, 93, 98, 2, 12, 13, 19, 22, 23, 30, 35, 39, 40, 51, 57, 70, 78, 83, 85, 90, - 94, 2, 7, 10, 16, 17, 38, 44, 47, 49, 64, 69, 76, 77, 79, 81, 83, 2, 5, 13, 21, 37, 38, 62, - 67, 68, 81, 82, 86, 87, 95, 96, 97, 98, 1, 14, 23, 38, 42, 51, 55, 71, 74, 75, 76, 77, 89, 96, - 2, 4, 11, 13, 14, 16, 20, 21, 25, 30, 31, 40, 60, 75, 94, 3, 13, 25, 30, 31, 36, 38, 40, 66, - 71, 72, 76, 81, 84, 88, 89, 95, 0, 4, 6, 11, 12, 13, 16, 21, 30, 31, 34, 42, 47, 49, 51, 55, - 65, 68, 70, 71, 73, 75, 84, 88, 95, 1, 2, 12, 13, 19, 22, 27, 30, 51, 56, 57, 72, 75, 79, 90, - 91, 98, 0, 3, 8, 11, 19, 21, 22, 29, 40, 42, 47, 49, 50, 55, 57, 61, 63, 77, 83, 88, 90, 91, - 93, 0, 4, 8, 16, 19, 26, 27, 33, 35, 49, 50, 52, 53, 55, 62, 65, 66, 68, 71, 78, 82, 90, 94, - 98, 0, 2, 18, 22, 23, 28, 31, 32, 41, 44, 47, 48, 56, 58, 69, 70, 83, 96, 98, 2, 5, 6, 9, - 21, 22, 34, 50, 62, 65, 66, 69, 72, 79, 84, 6, 9, 12, 14, 23, 27, 31, 50, 56, 58, 59, 67, 76, - 77, 81, 97, 3, 12, 14, 21, 22, 31, 40, 59, 67, 74, 81, 89, 90, 3, 5, 6, 11, 13, 16, 21, 27, - 28, 33, 37, 44, 47, 49, 50, 59, 71, 72, 83, 89, 91, 96, 5, 6, 8, 9, 10, 11, 27, 35, 48, 51, - 53, 62, 65, 74, 2, 3, 4, 18, 32, 35, 38, 41, 48, 49, 64, 66, 74, 86, 87, 94, 95, 98, 2, 5, - 9, 14, 15, 16, 17, 22, 23, 24, 26, 33, 40, 51, 53, 61, 70, 72, 81, 83, 85, 2, 3, 8, 10, 28, - 38, 40, 53, 54, 55, 68, 70, 81, 83, 98, 1, 3, 4, 5, 9, 13, 16, 17, 21, 22, 23, 27, 31, 33, - 39, 45, 60, 62, 70, 77, 80, 82, 83, 84, 85, 86, 98, 0, 4, 7, 12, 20, 30, 49, 58, 61, 62, 63, - 65, 72, 76, 83, 89, 91, 0, 2, 13, 15, 16, 18, 31, 36, 43, 50, 52, 56, 60, 61, 66, 72, 83, 87, - 89, 92, 93, 0, 2, 5, 19, 28, 29, 40, 49, 61, 63, 86, 90, 7, 8, 9, 10, 18, 26, 28, 34, 42, - 57, 72, 74, 82, 87, 88, 96, 99, 1, 2, 7, 9, 16, 17, 19, 21, 34, 47, 50, 52, 56, 61, 67, 83, - 89, 90, 95, 97, 99, 3, 8, 21, 23, 25, 30, 31, 34, 46, 50, 52, 57, 62, 79, 81, 85, 87, 90, 99, - 2, 3, 5, 20, 27, 28, 37, 40, 43, 53, 54, 65, 69, 82, 84, 89, 90, 2, 5, 6, 8, 10, 15, 17, - 21, 26, 28, 30, 34, 43, 47, 50, 59, 69, 70, 79, 88, 97, 1, 6, 15, 18, 27, 38, 39, 40, 42, 51, - 52, 67, 68, 71, 77, 80, 97, 9, 16, 17, 30, 32, 35, 41, 47, 51, 58, 59, 60, 68, 72, 77, 86, 93, - 9, 10, 27, 37, 40, 44, 46, 47, 50, 55, 69, 74, 87, 98, 1, 3, 4, 5, 8, 13, 14, 16, 20, 28, - 31, 35, 38, 46, 48, 52, 55, 58, 61, 62, 64, 70, 77, 78, 82, 86, 89, 99, 1, 6, 13, 15, 23, 24, - 26, 29, 33, 34, 39, 47, 76, 77, 83, 87, 88, 96, 98, 99, 2, 14, 15, 17, 20, 36, 38, 44, 54, 56, - 57, 64, 71, 80, 81, 85, 86, 87, 88, 92, 93, 95, 0, 7, 11, 14, 15, 16, 17, 20, 22, 29, 35, 39, - 44, 45, 47, 48, 78, 85, 90, 92, 94, 99, 0, 1, 3, 5, 18, 20, 28, 36, 40, 42, 44, 46, 53, 61, - 73, 80, 82, 84, 91, 95, 5, 8, 13, 27, 28, 42, 44, 49, 53, 60, 69, 70, 72, 73, 91, 1, 7, 10, - 11, 15, 21, 25, 26, 28, 41, 50, 72, 75, 81, 82, 87, 94, 96, 7, 11, 30, 31, 32, 33, 38, 42, 48, - 52, 66, 68, 82, 0, 1, 11, 15, 20, 23, 40, 60, 69, 74, 76, 80, 93, 3, 7, 9, 19, 27, 34, 37, - 38, 40, 42, 43, 46, 53, 54, 58, 59, 66, 74, 78, 81, 84, 87, 88, 91, 5, 7, 14, 34, 35, 39, 43, - 50, 60, 64, 67, 72, 76, 78, 79, 83, 84, 96, 4, 6, 10, 11, 13, 16, 28, 33, 36, 41, 42, 49, 51, - 55, 58, 59, 60, 61, 62, 65, 73, 82, 84, 86, 97, 3, 10, 13, 16, 21, 24, 28, 39, 40, 46, 47, 52, - 60, 67, 76, 81, 82, 83, 0, 1, 17, 18, 20, 32, 37, 41, 58, 60, 66, 74, 75, 90, 94, 2, 5, 12, - 18, 22, 25, 29, 36, 43, 57, 60, 63, 70, 72, 74, 83, 94, 99, 3, 4, 6, 8, 9, 10, 14, 20, 22, - 28, 29, 31, 33, 37, 38, 43, 57, 62, 64, 66, 71, 73, 74, 78, 81, 91, 94, 95, 99, 0, 3, 11, 19, - 26, 27, 34, 46, 47, 49, 64, 68, 73, 74, 81, 90, 94, 95, 97, 7, 21, 33, 44, 46, 54, 55, 61, 62, - 65, 67, 72, 91, 99, 1, 2, 5, 10, 11, 30, 37, 38, 39, 41, 48, 49, 50, 54, 63, 65, 66, 67, 75, - 85, 88, 91, 96, 0, 2, 15, 16, 18, 23, 34, 48, 49, 55, 61, 76, 77, 81, 87, 89, 90, 97, 0, 2, - 5, 14, 16, 17, 23, 24, 25, 33, 38, 39, 62, 74, 75, 8, 9, 12, 13, 15, 17, 33, 35, 40, 49, 62, - 70, 74, 80, 93, 98, 99, 0, 6, 7, 11, 12, 14, 17, 20, 28, 31, 41, 45, 50, 57, 75, 78, 85, 86, - 87, 88, 95, 7, 15, 17, 30, 35, 43, 46, 47, 57, 65, 74, 76, 87, 88, 94, 0, 15, 33, 43, 44, 51, - 55, 64, 73, 78, 82, 90, 96, 98, 1, 9, 15, 31, 33, 35, 43, 53, 65, 68, 69, 83, 88, 91, 8, 13, - 14, 20, 24, 28, 33, 38, 40, 43, 48, 50, 51, 57, 59, 60, 71, 73, 93, 96, 7, 9, 15, 19, 20, 30, - 33, 39, 64, 65, 66, 72, 73, 75, 86, 87, 89, 93}, - {0.8385492, 0.0887047, 0.4178915, 0.4859754, 0.4469863, 0.2195207, 0.3129920, 0.1031984, - 0.2898832, 0.3742032, 0.0522814, 0.3923617, 0.4283062, 0.2236069, 0.1620676, 0.0181036, - 0.0722899, 0.2825163, 0.2854958, 0.3136983, 0.4021524, 0.3556329, 0.4577443, 0.1463357, - 0.3288944, 0.4404407, 0.3466910, 0.2799277, 0.1813836, 0.4619252, 0.1622771, 0.2565850, - 0.3349850, 0.4806673, 0.2912005, 0.2509201, 0.6396587, 0.5977305, 0.1196116, 0.2077467, - 0.0345871, 0.4918659, 0.4194439, 0.4487811, 0.1682306, 0.3017929, 0.1373989, 0.3152796, - 0.3640917, 0.0489285, 0.4335400, 0.0987368, 0.1548646, 0.2137529, 0.0130792, 0.0752723, - 0.1238085, 0.3553386, 0.4349648, 0.3818015, 0.4697597, 0.4478265, 0.2176154, 0.3768051, - 0.3741169, 0.0550861, 0.3733355, 0.0161616, 0.0404749, 0.0530627, 0.3932415, 0.2313439, - 0.4807387, 0.3860448, 0.0887047, 0.1622771, 0.2646495, 0.4319774, 0.0975544, 0.3953015, - 0.4127654, 0.3950751, 0.0630765, 0.3240158, 0.3895027, 0.0263783, 0.3096741, 0.0810854, - 0.2185860, 0.2931856, 0.4413908, 0.4933484, 0.3265684, 0.3630947, 0.3439550, 0.4709083, - 0.4871525, 0.4059546, 0.2835062, 0.2319805, 0.1080630, 0.1148512, 0.4250860, 0.4319774, - 0.3417962, 0.1542346, 0.1705101, 0.3939655, 0.2228894, 0.2561502, 0.1612249, 0.3348420, - 0.7638237, 0.2223779, 0.1142358, 0.2221761, 0.1023570, 0.0100264, 0.4906516, 0.4211857, - 0.4178915, 0.2112697, 0.0841055, 0.3054300, 0.4681202, 0.3307955, 0.2055745, 0.3013350, - 0.0921099, 0.2272112, 0.4771985, 0.0400448, 0.4924752, 0.3142720, 0.3691756, 0.2582222, - 0.2400539, 0.4489491, 0.5111299, 0.4255019, 0.3747997, 0.1873246, 0.2565850, 0.1914687, - 0.3671139, 0.1276162, 0.3537677, 0.4076773, 0.1181683, 0.7192769, 0.2186738, 0.2885858, - 0.4734213, 0.0072575, 0.0765674, 0.0898227, 0.3649966, 0.2496215, 0.1702205, 0.0710704, - 0.3869004, 0.3349850, 0.1886938, 0.3514959, 0.4643647, 0.4223959, 0.3594954, 0.2522124, - 0.4105392, 0.2470788, 0.2545409, 0.3583593, 0.2345200, 0.0271059, 0.3803033, 0.1930780, - 0.4567223, 0.0613140, 0.2441548, 0.4808156, 0.3853460, 0.4859754, 0.4806673, 0.2801995, - 0.3858915, 0.0090301, 0.4087827, 0.3671360, 0.2667392, 0.4641679, 0.4647529, 0.3445000, - 0.1198545, 0.0282007, 0.1829597, 0.0539266, 0.0914677, 0.1638856, 0.1201562, 0.4388565, - 0.2036911, 0.2046127, 0.4811504, 0.3038480, 0.0642898, 0.2031245, 0.1680801, 0.0394903, - 0.4766186, 0.2023225, 0.0175873, 0.3034133, 0.4123132, 0.0379968, 0.2168891, 0.0675915, - 0.4039690, 0.3417962, 0.2112697, 0.2400451, 0.4558193, 0.1334496, 0.0195393, 0.3627390, - 0.4262152, 0.0403542, 0.3081270, 0.1527164, 0.0121030, 0.6241815, 0.4913400, 0.0157230, - 0.3200969, 0.0437878, 0.3018721, 0.0975544, 0.1886938, 0.8753713, 0.0700827, 0.2364397, - 0.4924574, 0.2563165, 0.1126200, 0.1547797, 0.0241622, 0.3814965, 0.3526533, 0.2161066, - 0.2911978, 0.4464823, 0.3577181, 0.3152088, 0.3317510, 0.2863414, 0.2801995, 0.0700827, - 0.3417172, 0.2610632, 0.4037673, 0.1736438, 0.0880198, 0.4559108, 0.1121846, 0.7814473, - 0.3779829, 0.3405251, 0.1208012, 0.4304054, 0.1807327, 0.0049234, 0.1778966, 0.3514959, - 0.2046946, 0.2997384, 0.2013881, 0.0548181, 0.3352703, 0.2054045, 0.3389475, 0.1449403, - 0.3906285, 0.0580903, 0.3582265, 0.1743012, 0.2712877, 0.4273703, 0.4566499, 0.0667344, - 0.0676206, 0.1248124, 0.0026571, 0.2774455, 0.0032627, 0.1753686, 0.3725724, 0.4469863, - 0.3858915, 0.2046946, 0.3794979, 0.4016317, 0.3370037, 0.0815573, 0.4647915, 0.0563985, - 0.4203163, 0.0915991, 0.0276749, 0.3857849, 0.0461729, 0.3978934, 0.3614717, 0.3266448, - 0.7978231, 0.4209127, 0.2912005, 0.3953015, 0.4388565, 0.3417172, 0.2997384, 0.4108247, - 0.2899171, 0.1479114, 0.4418810, 0.0634220, 0.0929668, 0.4055436, 0.2457036, 0.3701515, - 0.4134036, 0.0947451, 0.2785034, 0.3162361, 0.4036728, 0.3741804, 0.4563937, 0.4904932, - 0.1492740, 0.4887115, 0.4127654, 0.1542346, 0.1914687, 0.0090301, 0.4108247, 0.3533593, - 0.4300368, 0.3572507, 0.1412494, 0.4373029, 0.3273854, 0.2602280, 0.1690700, 0.4756982, - 0.0009060, 0.2393224, 0.0014211, 0.4101384, 0.1580024, 0.0231310, 0.5838791, 0.4132268, - 0.2181222, 0.3529412, 0.3698108, 0.2233849, 0.0987368, 0.2610632, 0.2013881, 0.3533593, - 0.2908257, 0.3609885, 0.2026076, 0.2999429, 0.2079948, 0.2704931, 0.2946429, 0.3154255, - 0.0627621, 0.2774129, 0.4206699, 0.0670598, 0.2860273, 0.3919643, 0.2397596, 0.2703603, - 0.4632739, 0.4124186, 0.5805955, 0.1959839, 0.3950751, 0.0841055, 0.3794979, 0.4300368, - 0.4032480, 0.2078872, 0.0094638, 0.2755707, 0.0376010, 0.4909527, 0.3097841, 0.2355419, - 0.0072671, 0.2746342, 0.0053361, 0.1994108, 0.3969467, 0.2509201, 0.3298818, 0.3886021, - 0.0245763, 0.4638373, 0.4052183, 0.4148478, 0.0242814, 0.2414050, 0.2932298, 0.0475468, - 0.4618716, 0.4032480, 0.8676416, 0.4028524, 0.3012557, 0.1360013, 0.1863026, 0.1490197, - 0.0643736, 0.3395792, 0.2925389, 0.3659366, 0.4948683, 0.4953563, 0.1047673, 0.0355901, - 0.0856992, 0.1778870, 0.0851296, 0.3532749, 0.0398270, 0.0630765, 0.3671139, 0.4643647, - 0.2400451, 0.2364397, 0.4431843, 0.1266264, 0.4763364, 0.7873081, 0.2751093, 0.4222012, - 0.1121367, 0.4474346, 0.3652081, 0.1600931, 0.0614609, 0.0204758, 0.1615355, 0.4293712, - 0.3882434, 0.6431416, 0.0548181, 0.2899171, 0.3634890, 0.4412351, 0.1490288, 0.0447601, - 0.4229826, 0.3807294, 0.0672451, 0.2775799, 0.4666647, 0.4085002, 0.1297752, 0.1563804, - 0.1522877, 0.2532282, 0.2805034, 0.1651538, 0.1046609, 0.1760083, 0.2195207, 0.1705101, - 0.1276162, 0.4558193, 0.4924574, 0.3572507, 0.3401189, 0.0565680, 0.4332137, 0.2150277, - 0.4809324, 0.2783410, 0.1570549, 0.4891155, 0.4529251, 0.2209245, 0.3658022, 0.3961954, - 0.3788675, 0.1621254, 0.3969478, 0.3886663, 0.4372073, 0.3537677, 0.4037673, 0.2908257, - 0.4028524, 0.4431843, 0.7202524, 0.3443225, 0.3538920, 0.3133293, 0.4439365, 0.1412494, - 0.3012557, 0.3634890, 0.3401189, 0.1250412, 0.4831129, 0.0737263, 0.3228796, 0.0975274, - 0.1318027, 0.4008097, 0.1548646, 0.2036911, 0.1334496, 0.4016317, 0.1479114, 0.3609885, - 0.1360013, 0.1494316, 0.4203018, 0.2847606, 0.1855530, 0.3948809, 0.1457941, 0.1710113, - 0.4871747, 0.0616420, 0.2720916, 0.1494316, 0.3342525, 0.4981484, 0.2835164, 0.2201109, - 0.3569505, 0.3228796, 0.2664382, 0.1461955, 0.2912845, 0.2178672, 0.0091858, 0.3888402, - 0.3213883, 0.1017065, 0.2137529, 0.2078872, 0.1863026, 0.0565680, 0.2497744, 0.0917027, - 0.3077455, 0.2898162, 0.1962939, 0.0667715, 0.0511321, 0.4857582, 0.0757288, 0.4719980, - 0.0990155, 0.0358659, 0.3427203, 0.4911953, 0.0026993, 0.3121863, 0.3129920, 0.4076773, - 0.4087827, 0.0195393, 0.3352703, 0.1490197, 0.4412351, 0.4203018, 0.3342525, 0.4991112, - 0.3198876, 0.0273423, 0.1726720, 0.2868139, 0.0167729, 0.3167321, 0.3240158, 0.1181683, - 0.4223959, 0.2054045, 0.4418810, 0.2026076, 0.3298818, 0.4332137, 0.4679078, 0.2938424, - 0.2349892, 0.3265936, 0.4161196, 0.0540847, 0.4671349, 0.4922210, 0.4333457, 0.2783662, - 0.3295173, 0.1414430, 0.4789151, 0.5482149, 0.2405941, 0.0873055, 0.4915100, 0.1031984, - 0.6396587, 0.3054300, 0.4373029, 0.2999429, 0.1490288, 0.2150277, 0.4679078, 0.4463057, - 0.3714156, 0.1611302, 0.3379962, 0.4654491, 0.0994459, 0.4963855, 0.0027219, 0.2011968, - 0.2413642, 0.0713272, 0.0186765, 0.5553801, 0.0508773, 0.4655451, 0.3939655, 0.4681202, - 0.2046127, 0.2079948, 0.0447601, 0.2938424, 0.4463057, 0.4189366, 0.4805591, 0.4724835, - 0.4029289, 0.3810731, 0.3855192, 0.2898832, 0.3895027, 0.3307955, 0.3594954, 0.4811504, - 0.1736438, 0.3370037, 0.2704931, 0.0094638, 0.4229826, 0.2349892, 0.1488369, 0.3299349, - 0.3658398, 0.2805756, 0.1943161, 0.1270155, 0.2077195, 0.1249269, 0.0572191, 0.3217881, - 0.1812549, 0.4356323, 0.2024299, 0.4955283, 0.2777625, 0.0642578, 0.4278218, 0.3742032, - 0.2228894, 0.3627390, 0.0880198, 0.1250412, 0.1488369, 0.6981739, 0.2518100, 0.2364128, - 0.4279115, 0.4212285, 0.4749146, 0.2284694, 0.1864383, 0.0079268, 0.2446150, 0.4631400, - 0.2501489, 0.4844082, 0.0522814, 0.5977305, 0.0263783, 0.2522124, 0.2755707, 0.3886021, - 0.2847606, 0.4991112, 0.0239194, 0.4028964, 0.2294849, 0.2998522, 0.1320064, 0.0275548, - 0.1151714, 0.2652366, 0.2787146, 0.2884416, 0.1149032, 0.3923617, 0.3807294, 0.0540387, - 0.2807390, 0.0142855, 0.3054538, 0.0743166, 0.1352609, 0.3096741, 0.2561502, 0.7192769, - 0.4809324, 0.4981484, 0.3299349, 0.2030550, 0.2820974, 0.3606436, 0.1871530, 0.2116934, - 0.1441479, 0.2874195, 0.3848211, 0.3917919, 0.4778197, 0.2946429, 0.4189366, 0.2518100, - 0.2030550, 0.4912895, 0.1356941, 0.2409017, 0.4399648, 0.2600915, 0.1039219, 0.0522639, - 0.1473574, 0.1156571, 0.2768389, 0.4478964, 0.1246019, 0.1488771, 0.3747582, 0.0281233, - 0.0742416, 0.4283062, 0.1612249, 0.4559108, 0.3389475, 0.1266264, 0.0672451, 0.3265936, - 0.2820974, 0.3309392, 0.0915848, 0.0509763, 0.4962989, 0.4802843, 0.0841302, 0.1918956, - 0.3192275, 0.4662680, 0.1974726, 0.0810854, 0.2783410, 0.4912895, 0.3111583, 0.4521906, - 0.2043965, 0.3393941, 0.2771504, 0.4931641, 0.1747926, 0.0280012, 0.3078630, 0.0456258, - 0.1170995, 0.0880413, 0.2797376, 0.2573348, 0.2639170, 0.3364275, 0.2011374, 0.0130792, - 0.1121846, 0.1449403, 0.0245763, 0.2775799, 0.1570549, 0.4161196, 0.0239194, 0.3309392, - 0.3111583, 0.3020653, 0.0100230, 0.4954931, 0.4227756, 0.3662207, 0.4669757, 0.1495063, - 0.4342381, 0.0752723, 0.4105392, 0.4262152, 0.3273854, 0.3154255, 0.1356941, 0.1063635, - 0.3477053, 0.4418667, 0.4065750, 0.2158301, 0.0978730, 0.3474138, 0.0941925, 0.2502904, - 0.4167871, 0.1238085, 0.2055745, 0.3906285, 0.4763364, 0.3606436, 0.2409017, 0.2856070, - 0.4519934, 0.0640926, 0.3494168, 0.2239768, 0.1506959, 0.3404586, 0.0097513, 0.3356108, - 0.2007709, 0.0563368, 0.1196116, 0.0815573, 0.4891155, 0.4399648, 0.1063635, 0.0469109, - 0.4409516, 0.2269343, 0.1728651, 0.4690269, 0.4568825, 0.3838028, 0.1701081, 0.2478454, - 0.3553386, 0.3348420, 0.2563165, 0.0580903, 0.4647915, 0.2602280, 0.0643736, 0.7873081, - 0.4831129, 0.0540847, 0.3714156, 0.4521906, 0.0529002, 0.1118892, 0.3946897, 0.2185860, - 0.3582265, 0.0737263, 0.4671349, 0.1611302, 0.0540387, 0.2600915, 0.2043965, 0.0178831, - 0.3605796, 0.4215185, 0.3441654, 0.3192719, 0.2912215, 0.2253530, 0.4059448, 0.0770738, - 0.2236069, 0.7638237, 0.2186738, 0.1126200, 0.7814473, 0.1743012, 0.1690700, 0.2751093, - 0.4922210, 0.3379962, 0.2364128, 0.3477053, 0.7218004, 0.3724327, 0.2531753, 0.0252278, - 0.2816279, 0.1346799, 0.1643871, 0.3633022, 0.1110411, 0.2297511, 0.4249687, 0.4478221, - 0.2225533, 0.2077467, 0.4349648, 0.3779829, 0.2712877, 0.4638373, 0.4666647, 0.2835164, - 0.4333457, 0.4028734, 0.3229839, 0.3908435, 0.3720633, 0.3528297, 0.4553215, 0.1170026, - 0.4753753, 0.0282417, 0.1620676, 0.2931856, 0.3671360, 0.1547797, 0.4052183, 0.4222012, - 0.4085002, 0.3198876, 0.3393941, 0.4418667, 0.3724327, 0.0297363, 0.4194855, 0.1562718, - 0.1693750, 0.3152241, 0.3387593, 0.2933232, 0.0599440, 0.1064471, 0.2469246, 0.0528503, - 0.0321264, 0.0181036, 0.2223779, 0.2667392, 0.4756982, 0.4148478, 0.1855530, 0.2201109, - 0.3658398, 0.4028964, 0.4194855, 0.1724464, 0.2184300, 0.4806912, 0.3213868, 0.4946703, - 0.0183148, 0.4068079, 0.3882787, 0.1461515, 0.3377662, 0.1434079, 0.1656042, 0.1153671, - 0.0297401, 0.0722899, 0.3818015, 0.0376010, 0.1297752, 0.4529251, 0.2497744, 0.4654491, - 0.4805591, 0.3020653, 0.0469109, 0.2531753, 0.4028734, 0.3104094, 0.0983794, 0.3041750, - 0.7444220, 0.0469955, 0.4269330, 0.3876660, 0.4697597, 0.3013350, 0.2885858, 0.3038480, - 0.1121367, 0.1563804, 0.4279115, 0.2184300, 0.3897764, 0.1165223, 0.1623044, 0.3694641, - 0.4647038, 0.1950430, 0.0223306, 0.4734213, 0.0642898, 0.3405251, 0.0563985, 0.2209245, - 0.3569505, 0.0994459, 0.4806912, 0.3142114, 0.1688596, 0.2013356, 0.3616973, 0.1345261, - 0.3665765, 0.1457076, 0.2400093, 0.4413908, 0.1208012, 0.4203163, 0.4474346, 0.1522877, - 0.4963855, 0.2771504, 0.3932629, 0.2256821, 0.3466487, 0.1397347, 0.4893270, 0.1162840, - 0.4933484, 0.0921099, 0.0072575, 0.0241622, 0.4273703, 0.0009060, 0.3652081, 0.3228796, - 0.0917027, 0.2805756, 0.1871530, 0.4409516, 0.0252278, 0.1562718, 0.3213868, 0.0526326, - 0.2417610, 0.1361428, 0.4773201, 0.2157922, 0.2075818, 0.1745262, 0.2272112, 0.0765674, - 0.4641679, 0.2031245, 0.0403542, 0.3814965, 0.2664382, 0.2294849, 0.3229839, 0.3104094, - 0.3142114, 0.1920804, 0.3407301, 0.3448193, 0.4478265, 0.3265684, 0.1142358, 0.4909527, - 0.4724835, 0.2998522, 0.1039219, 0.0100230, 0.3908435, 0.1693750, 0.1674092, 0.0846982, - 0.3384884, 0.1067837, 0.3844901, 0.1491689, 0.4107678, 0.5988698, 0.2176154, 0.4771985, - 0.1680801, 0.0915991, 0.0634220, 0.2393224, 0.0627621, 0.2532282, 0.3658022, 0.7202524, - 0.3948809, 0.1943161, 0.4931641, 0.0983794, 0.1688596, 0.4067034, 0.2580674, 0.4757213, - 0.3928346, 0.1995547, 0.2107771, 0.3768051, 0.3630947, 0.4647529, 0.3081270, 0.3077455, - 0.0522639, 0.1747926, 0.2013356, 0.3932629, 0.0526326, 0.3694007, 0.0972740, 0.3075456, - 0.2167318, 0.4610244, 0.0345871, 0.3439550, 0.2221761, 0.0400448, 0.0394903, 0.4566499, - 0.0014211, 0.2774129, 0.1600931, 0.2805034, 0.3961954, 0.1461955, 0.0027219, 0.1270155, - 0.0915848, 0.0529002, 0.0703681, 0.0187762, 0.2613653, 0.1867701, 0.1502444, 0.3600508, - 0.4655130, 0.3398629, 0.4028377, 0.1709328, 0.2641133, 0.2825163, 0.1023570, 0.2470788, - 0.4304054, 0.3395792, 0.2783662, 0.3152241, 0.4067034, 0.9997413, 0.3054797, 0.4133712, - 0.0630975, 0.0166616, 0.3381947, 0.2909326, 0.2139573, 0.0475201, 0.2854958, 0.3741169, - 0.0667344, 0.0929668, 0.4101384, 0.3097841, 0.2011968, 0.2807390, 0.2856070, 0.4946703, - 0.3897764, 0.1920804, 0.0187762, 0.3054797, 0.0461345, 0.2358043, 0.4405020, 0.2239718, - 0.0232168, 0.2595815, 0.1997993, 0.3136983, 0.0550861, 0.4924752, 0.0242814, 0.2898162, - 0.0273423, 0.0280012, 0.3387593, 0.4133712, 0.1691249, 0.4277944, 0.3262424, 0.2545409, - 0.3445000, 0.4766186, 0.1527164, 0.2355419, 0.1457941, 0.1962939, 0.4212285, 0.4065750, - 0.1674092, 0.0040041, 0.3576335, 0.6885277, 0.0684911, 0.0949263, 0.3370988, 0.4251885, - 0.4918659, 0.3733355, 0.3583593, 0.2023225, 0.1580024, 0.4206699, 0.2414050, 0.0614609, - 0.4749146, 0.2816279, 0.0183148, 0.1165223, 0.3407301, 0.0630975, 0.3476292, 0.2974767, - 0.0964920, 0.2228194, 0.2653476, 0.0658719, 0.3992334, 0.4709083, 0.1198545, 0.0204758, - 0.3788675, 0.3228796, 0.3295173, 0.2413642, 0.2284694, 0.0178831, 0.4068079, 0.1623044, - 0.0846982, 0.0461345, 0.1464626, 0.1254936, 0.4546162, 0.0599609, 0.2089537, 0.0068666, - 0.0161616, 0.4871525, 0.3142720, 0.2925389, 0.2912845, 0.0667715, 0.2116934, 0.3078630, - 0.4519934, 0.3616973, 0.2256821, 0.3476292, 0.1306226, 0.2562920, 0.1834991, 0.1524191, - 0.4803574, 0.0404749, 0.3691756, 0.0898227, 0.0282007, 0.0121030, 0.4055436, 0.0670598, - 0.1615355, 0.1710113, 0.0511321, 0.1414430, 0.1864383, 0.0640926, 0.1346799, 0.3882787, - 0.3694007, 0.0812578, 0.3378220, 0.2461788, 0.3674253, 0.4063063, 0.4194439, 0.3649966, - 0.2457036, 0.0072671, 0.2178672, 0.1473574, 0.0509763, 0.0456258, 0.2158301, 0.3041750, - 0.3694641, 0.1306226, 0.0812578, 0.4179677, 0.0273935, 0.1376181, 0.1237823, 0.0175873, - 0.0231310, 0.2860273, 0.4789151, 0.4029289, 0.1320064, 0.4954931, 0.1643871, 0.7444220, - 0.2580674, 0.0972740, 0.2613653, 0.3378220, 0.0734471, 0.5716440, 0.3270837, 0.4374486, - 0.3034133, 0.6241815, 0.0091858, 0.1441479, 0.1170995, 0.2269343, 0.3605796, 0.3633022, - 0.1461515, 0.2417610, 0.4179677, 0.1296077, 0.4877253, 0.1591760, 0.4487811, 0.4059546, - 0.0100264, 0.2582222, 0.1829597, 0.0676206, 0.0276749, 0.5838791, 0.3659366, 0.4857582, - 0.0713272, 0.0275548, 0.1156571, 0.4215185, 0.3720633, 0.4647038, 0.1361428, 0.4757213, - 0.0166616, 0.2358043, 0.0040041, 0.0734471, 0.1602434, 0.0591811, 0.1030985, 0.1983638, - 0.4710790, 0.4003320, 0.1682306, 0.2496215, 0.1248124, 0.3701515, 0.1621254, 0.3443225, - 0.4871747, 0.1726720, 0.2077195, 0.0079268, 0.4962989, 0.1110411, 0.2440522, 0.4165031, - 0.0252984, 0.3045145, 0.4441046, 0.4572209, 0.2415059, 0.4238202, 0.0530627, 0.3857849, - 0.4134036, 0.3919643, 0.4948683, 0.0142855, 0.2768389, 0.1728651, 0.3466487, 0.3448193, - 0.3384884, 0.3576335, 0.1296077, 0.1268078, 0.2563025, 0.1895228, 0.3345918, 0.4166048, - 0.4054141, 0.2596988, 0.4439297, 0.4482521, 0.4021524, 0.2345200, 0.3526533, 0.0461729, - 0.0947451, 0.4132268, 0.2397596, 0.4953563, 0.1651538, 0.2868139, 0.1151714, 0.4802843, - 0.4690269, 0.1118892, 0.2297511, 0.3528297, 0.0649494, 0.1603665, 0.3632484, 0.4808010, - 0.3155171, 0.0421940, 0.3556329, 0.3017929, 0.2835062, 0.2400539, 0.2746342, 0.1047673, - 0.0757288, 0.3054538, 0.0880413, 0.0978730, 0.4568825, 0.3441654, 0.1345261, 0.3381947, - 0.2440522, 0.1453612, 0.0627209, 0.4289585, 0.3434332, 0.1462075, 0.4489491, 0.0539266, - 0.0026571, 0.3888402, 0.4719980, 0.3474138, 0.3838028, 0.2933232, 0.3665765, 0.1867701, - 0.0273935, 0.5716440, 0.1602434, 0.4165031, 0.3889723, 0.1373989, 0.0271059, 0.4913400, - 0.2161066, 0.2785034, 0.4293712, 0.0975274, 0.0616420, 0.0990155, 0.4227756, 0.3377662, - 0.0591811, 0.0649494, 0.4863133, 0.3123243, 0.3094676, 0.4548634, 0.3543404, 0.3803033, - 0.2911978, 0.5482149, 0.0186765, 0.3810731, 0.1249269, 0.4478964, 0.0941925, 0.4553215, - 0.1950430, 0.1464626, 0.2461788, 0.2376485, 0.4577443, 0.3152796, 0.4464823, 0.3162361, - 0.0355901, 0.3969478, 0.2797376, 0.1502444, 0.1376181, 0.1268078, 0.1453612, 0.8429500, - 0.2124143, 0.2319805, 0.1930780, 0.4123132, 0.2932298, 0.3213883, 0.2446150, 0.2874195, - 0.1246019, 0.2573348, 0.2502904, 0.3494168, 0.3192719, 0.1457076, 0.1397347, 0.3928346, - 0.3075456, 0.1254936, 0.2563025, 0.4863133, 0.2630258, 0.1192136, 0.1283403, 0.3361003, - 0.3254332, 0.5111299, 0.4567223, 0.3978934, 0.4631400, 0.2652366, 0.0841302, 0.2239768, - 0.1434079, 0.3600508, 0.6885277, 0.2562920, 0.1030985, 0.0627209, 0.3123243, 0.2376485, - 0.6660228, 0.2737032, 0.0725528, 0.4906516, 0.1702205, 0.0157230, 0.3577181, 0.2774455, - 0.2181222, 0.0358659, 0.0572191, 0.0743166, 0.3662207, 0.4167871, 0.0599440, 0.0469955, - 0.4773201, 0.1995547, 0.2167318, 0.4655130, 0.2909326, 0.4405020, 0.2974767, 0.0252984, - 0.6660228, 0.4688708, 0.4444213, 0.2486204, 0.1080630, 0.3200969, 0.0032627, 0.3529412, - 0.3882434, 0.3538920, 0.3427203, 0.1918956, 0.2639170, 0.2912215, 0.4249687, 0.0223306, - 0.3398629, 0.1834991, 0.4289585, 0.1192136, 0.2737032, 0.4688708, 0.1463357, 0.3640917, - 0.2703603, 0.0053361, 0.0856992, 0.3855192, 0.3848211, 0.4669757, 0.2107771, 0.4028377, - 0.4546162, 0.1895228, 0.1603665, 0.1891034, 0.1633865, 0.3932415, 0.4255019, 0.1807327, - 0.1994108, 0.1046609, 0.1318027, 0.0167729, 0.1352609, 0.1506959, 0.1067837, 0.1709328, - 0.4277944, 0.3270837, 0.1983638, 0.3345918, 0.4444213, 0.4795561, 0.3394504, 0.1148512, - 0.4211857, 0.0710704, 0.0914677, 0.0379968, 0.0437878, 0.3614717, 0.1778870, 0.1760083, - 0.4911953, 0.3167321, 0.5553801, 0.3217881, 0.3917919, 0.1488771, 0.3404586, 0.3844901, - 0.2239718, 0.0684911, 0.0599609, 0.4877253, 0.3045145, 0.4166048, 0.3094676, 0.1283403, - 0.4126990, 0.0727838, 0.3816538, 0.3677183, 0.3288944, 0.4250860, 0.3152088, 0.0475468, - 0.2720916, 0.1017065, 0.2501489, 0.2253530, 0.4478221, 0.1064471, 0.0949263, 0.3674253, - 0.4441046, 0.4054141, 0.3361003, 0.3239112, 0.1663671, 0.0782135, 0.4374697, 0.0613140, - 0.6431416, 0.1812549, 0.1701081, 0.4059448, 0.4893270, 0.2157922, 0.2139573, 0.0232168, - 0.0964920, 0.1524191, 0.4710790, 0.4609937, 0.1566380, 0.0489285, 0.2313439, 0.3747997, - 0.3018721, 0.3317510, 0.2405941, 0.4778197, 0.3747582, 0.3192275, 0.1495063, 0.1170026, - 0.2469246, 0.1656042, 0.1162840, 0.3262424, 0.2228194, 0.2089537, 0.4803574, 0.3632484, - 0.1891034, 0.3239112, 0.1381195, 0.0077237, 0.4404407, 0.4807387, 0.4036728, 0.3698108, - 0.3969467, 0.3886663, 0.4844082, 0.4753753, 0.0528503, 0.2075818, 0.0475201, 0.3434332, - 0.3889723, 0.3254332, 0.4126990, 0.4609937, 0.1381195, 0.0022522, 0.3466910, 0.3860448, - 0.1873246, 0.3266448, 0.2233849, 0.4632739, 0.4372073, 0.3133293, 0.4008097, 0.4356323, - 0.0281233, 0.4662680, 0.2595815, 0.2596988, 0.4808010, 0.1638856, 0.2168891, 0.0049234, - 0.1753686, 0.3741804, 0.4124186, 0.2024299, 0.2787146, 0.3364275, 0.0321264, 0.1997993, - 0.4374486, 0.4439297, 0.2124143, 0.2074694, 0.1906150, 0.1204390, 0.2799277, 0.3869004, - 0.2441548, 0.2863414, 0.1778966, 0.7978231, 0.5805955, 0.0851296, 0.0026993, 0.0508773, - 0.4342381, 0.3946897, 0.1153671, 0.1491689, 0.3155171, 0.4548634, 0.1633865, 0.4795561, - 0.0727838, 0.1663671, 0.1552885, 0.4808156, 0.4563937, 0.1959839, 0.0873055, 0.2884416, - 0.0097513, 0.0770738, 0.2225533, 0.4107678, 0.2653476, 0.4482521, 0.1462075, 0.3816538, - 0.0782135, 0.1552885, 0.1813836, 0.4904932, 0.4955283, 0.3356108, 0.2478454, 0.4269330, - 0.1745262, 0.3370988, 0.4572209, 0.3543404, 0.0725528, 0.0077237, 0.3415696, 0.1628898, - 0.4335400, 0.0675915, 0.1492740, 0.4655451, 0.2777625, 0.1149032, 0.2007709, 0.2400093, - 0.0658719, 0.4063063, 0.1237823, 0.2486204, 0.4374697, 0.0022522, 0.1201562, 0.3725724, - 0.4209127, 0.3532749, 0.4439365, 0.3121863, 0.0642578, 0.0742416, 0.2011374, 0.0563368, - 0.0282417, 0.0297401, 0.3876660, 0.5988698, 0.4610244, 0.2641133, 0.1591760, 0.2415059, - 0.1906150, 0.1628898, 0.3853460, 0.4039690, 0.4887115, 0.4618716, 0.0398270, 0.4915100, - 0.4278218, 0.1974726, 0.4251885, 0.3992334, 0.0068666, 0.4003320, 0.4238202, 0.0421940, - 0.3394504, 0.3677183, 0.1566380, 0.1204390}, + rows, + cols, + vals, {-2.48497686, 5.47778263}}}; const std::vector> inputsd_LA = { @@ -1118,328 +785,9 @@ const std::vector> inputsd_LA = { 1e-15, raft::sparse::solver::LANCZOS_WHICH::LA, 42, - {0, 29, 51, 74, 103, 120, 142, 161, 181, 199, 217, 235, 254, 271, 295, - 314, 338, 364, 388, 405, 417, 437, 458, 478, 501, 511, 522, 539, 554, 574, - 590, 615, 638, 651, 679, 698, 717, 725, 741, 761, 779, 799, 817, 833, 850, - 864, 879, 896, 921, 938, 961, 985, 1004, 1019, 1035, 1048, 1070, 1084, 1102, 1123, - 1138, 1165, 1182, 1203, 1215, 1232, 1253, 1272, 1289, 1310, 1327, 1344, 1358, 1386, 1406, - 1428, 1450, 1470, 1485, 1503, 1516, 1529, 1553, 1571, 1596, 1614, 1629, 1647, 1676, 1695, - 1709, 1732, 1750, 1765, 1782, 1803, 1818, 1832, 1846, 1866, 1884}, - {0, 3, 5, 8, 14, 23, 29, 31, 33, 34, 35, 36, 39, 47, 49, 50, 51, 61, 62, 63, 75, 76, 80, 85, - 88, 91, 92, 94, 96, 1, 3, 6, 7, 8, 15, 19, 31, 35, 44, 48, 60, 65, 69, 72, 73, 76, 78, 80, - 85, 90, 97, 17, 26, 28, 41, 42, 43, 45, 48, 51, 52, 57, 58, 59, 62, 63, 65, 67, 68, 74, 86, 90, - 91, 92, 0, 1, 3, 4, 11, 15, 16, 18, 21, 30, 33, 35, 37, 40, 46, 49, 54, 55, 57, 59, 60, 66, - 67, 72, 76, 81, 84, 87, 88, 3, 10, 16, 23, 32, 34, 37, 39, 45, 47, 50, 57, 60, 61, 72, 83, 87, - 0, 10, 18, 31, 32, 33, 43, 52, 55, 56, 58, 60, 63, 67, 68, 72, 76, 77, 82, 86, 90, 92, 1, 16, - 21, 23, 24, 29, 30, 37, 47, 52, 53, 55, 56, 68, 69, 73, 83, 87, 94, 1, 11, 13, 21, 30, 33, 35, - 42, 61, 64, 65, 75, 78, 79, 81, 82, 89, 94, 95, 99, 0, 1, 12, 14, 16, 29, 49, 50, 56, 59, 64, - 66, 68, 72, 77, 87, 93, 98, 15, 26, 32, 33, 52, 53, 56, 58, 60, 64, 65, 70, 71, 81, 87, 93, 97, - 99, 4, 5, 21, 23, 26, 29, 34, 42, 56, 59, 64, 68, 71, 78, 83, 84, 87, 90, 3, 7, 11, 12, 21, - 23, 45, 47, 49, 55, 56, 75, 78, 79, 80, 83, 88, 90, 94, 8, 11, 15, 17, 24, 33, 34, 39, 41, 47, - 48, 53, 54, 61, 86, 93, 94, 7, 14, 15, 17, 22, 29, 30, 39, 41, 43, 45, 46, 47, 48, 55, 60, 62, - 72, 73, 77, 83, 84, 93, 98, 0, 8, 13, 18, 26, 33, 44, 45, 53, 54, 58, 72, 74, 75, 82, 87, 92, - 94, 98, 1, 3, 9, 12, 13, 16, 22, 26, 30, 58, 62, 68, 69, 73, 74, 75, 78, 80, 91, 93, 95, 96, - 97, 99, 3, 4, 6, 8, 15, 17, 18, 23, 25, 31, 42, 45, 47, 50, 55, 58, 60, 62, 65, 70, 72, 75, - 83, 84, 91, 92, 2, 12, 13, 16, 24, 26, 30, 31, 32, 33, 38, 42, 58, 60, 65, 68, 70, 74, 75, 85, - 92, 93, 94, 95, 3, 5, 14, 16, 20, 28, 33, 35, 51, 57, 62, 64, 69, 76, 85, 86, 91, 1, 30, 35, - 41, 48, 49, 50, 63, 65, 81, 88, 99, 18, 20, 24, 25, 26, 28, 29, 45, 61, 67, 72, 74, 75, 76, 80, - 85, 87, 94, 98, 99, 3, 6, 7, 10, 11, 24, 39, 43, 45, 47, 49, 52, 54, 55, 60, 65, 66, 68, 78, - 84, 89, 13, 15, 25, 29, 31, 32, 33, 36, 39, 41, 48, 49, 51, 52, 54, 58, 60, 75, 86, 87, 0, 4, - 6, 10, 11, 16, 25, 28, 30, 31, 37, 40, 41, 44, 51, 53, 58, 60, 66, 73, 80, 91, 92, 6, 12, 17, - 20, 21, 58, 73, 84, 92, 98, 16, 20, 22, 23, 34, 45, 46, 66, 78, 86, 92, 2, 9, 10, 14, 15, 17, - 20, 27, 29, 35, 50, 58, 64, 68, 73, 78, 88, 26, 29, 37, 48, 50, 53, 55, 56, 60, 67, 69, 71, 77, - 81, 88, 2, 18, 20, 23, 51, 55, 59, 63, 64, 67, 68, 72, 76, 77, 78, 83, 84, 87, 94, 98, 0, 6, - 8, 10, 13, 20, 22, 26, 27, 35, 49, 63, 73, 75, 86, 87, 3, 6, 7, 13, 15, 17, 19, 23, 31, 32, - 33, 39, 41, 45, 46, 47, 48, 61, 66, 68, 70, 79, 90, 95, 99, 0, 1, 5, 16, 17, 22, 23, 30, 32, - 45, 46, 47, 51, 53, 54, 60, 62, 66, 72, 79, 87, 94, 97, 4, 5, 9, 17, 22, 30, 31, 38, 51, 57, - 70, 79, 85, 0, 3, 5, 7, 9, 12, 14, 17, 18, 22, 30, 34, 37, 50, 55, 58, 60, 73, 79, 83, 87, - 89, 92, 93, 96, 97, 98, 99, 0, 4, 10, 12, 25, 33, 34, 38, 47, 52, 64, 65, 66, 68, 73, 81, 82, - 88, 91, 0, 1, 3, 7, 18, 19, 26, 29, 41, 50, 56, 57, 70, 72, 75, 82, 93, 95, 97, 0, 22, 46, - 62, 74, 76, 83, 86, 3, 4, 6, 23, 27, 33, 38, 39, 43, 55, 67, 71, 81, 85, 87, 90, 17, 32, 34, - 37, 40, 42, 43, 44, 46, 57, 59, 69, 72, 74, 79, 81, 87, 90, 92, 98, 0, 4, 12, 13, 21, 22, 30, - 37, 41, 60, 69, 73, 75, 82, 84, 90, 92, 99, 3, 23, 38, 41, 45, 46, 49, 54, 58, 59, 63, 67, 69, - 71, 76, 80, 81, 84, 93, 98, 2, 12, 13, 19, 22, 23, 30, 35, 39, 40, 51, 57, 70, 78, 83, 85, 90, - 94, 2, 7, 10, 16, 17, 38, 44, 47, 49, 64, 69, 76, 77, 79, 81, 83, 2, 5, 13, 21, 37, 38, 62, - 67, 68, 81, 82, 86, 87, 95, 96, 97, 98, 1, 14, 23, 38, 42, 51, 55, 71, 74, 75, 76, 77, 89, 96, - 2, 4, 11, 13, 14, 16, 20, 21, 25, 30, 31, 40, 60, 75, 94, 3, 13, 25, 30, 31, 36, 38, 40, 66, - 71, 72, 76, 81, 84, 88, 89, 95, 0, 4, 6, 11, 12, 13, 16, 21, 30, 31, 34, 42, 47, 49, 51, 55, - 65, 68, 70, 71, 73, 75, 84, 88, 95, 1, 2, 12, 13, 19, 22, 27, 30, 51, 56, 57, 72, 75, 79, 90, - 91, 98, 0, 3, 8, 11, 19, 21, 22, 29, 40, 42, 47, 49, 50, 55, 57, 61, 63, 77, 83, 88, 90, 91, - 93, 0, 4, 8, 16, 19, 26, 27, 33, 35, 49, 50, 52, 53, 55, 62, 65, 66, 68, 71, 78, 82, 90, 94, - 98, 0, 2, 18, 22, 23, 28, 31, 32, 41, 44, 47, 48, 56, 58, 69, 70, 83, 96, 98, 2, 5, 6, 9, - 21, 22, 34, 50, 62, 65, 66, 69, 72, 79, 84, 6, 9, 12, 14, 23, 27, 31, 50, 56, 58, 59, 67, 76, - 77, 81, 97, 3, 12, 14, 21, 22, 31, 40, 59, 67, 74, 81, 89, 90, 3, 5, 6, 11, 13, 16, 21, 27, - 28, 33, 37, 44, 47, 49, 50, 59, 71, 72, 83, 89, 91, 96, 5, 6, 8, 9, 10, 11, 27, 35, 48, 51, - 53, 62, 65, 74, 2, 3, 4, 18, 32, 35, 38, 41, 48, 49, 64, 66, 74, 86, 87, 94, 95, 98, 2, 5, - 9, 14, 15, 16, 17, 22, 23, 24, 26, 33, 40, 51, 53, 61, 70, 72, 81, 83, 85, 2, 3, 8, 10, 28, - 38, 40, 53, 54, 55, 68, 70, 81, 83, 98, 1, 3, 4, 5, 9, 13, 16, 17, 21, 22, 23, 27, 31, 33, - 39, 45, 60, 62, 70, 77, 80, 82, 83, 84, 85, 86, 98, 0, 4, 7, 12, 20, 30, 49, 58, 61, 62, 63, - 65, 72, 76, 83, 89, 91, 0, 2, 13, 15, 16, 18, 31, 36, 43, 50, 52, 56, 60, 61, 66, 72, 83, 87, - 89, 92, 93, 0, 2, 5, 19, 28, 29, 40, 49, 61, 63, 86, 90, 7, 8, 9, 10, 18, 26, 28, 34, 42, - 57, 72, 74, 82, 87, 88, 96, 99, 1, 2, 7, 9, 16, 17, 19, 21, 34, 47, 50, 52, 56, 61, 67, 83, - 89, 90, 95, 97, 99, 3, 8, 21, 23, 25, 30, 31, 34, 46, 50, 52, 57, 62, 79, 81, 85, 87, 90, 99, - 2, 3, 5, 20, 27, 28, 37, 40, 43, 53, 54, 65, 69, 82, 84, 89, 90, 2, 5, 6, 8, 10, 15, 17, - 21, 26, 28, 30, 34, 43, 47, 50, 59, 69, 70, 79, 88, 97, 1, 6, 15, 18, 27, 38, 39, 40, 42, 51, - 52, 67, 68, 71, 77, 80, 97, 9, 16, 17, 30, 32, 35, 41, 47, 51, 58, 59, 60, 68, 72, 77, 86, 93, - 9, 10, 27, 37, 40, 44, 46, 47, 50, 55, 69, 74, 87, 98, 1, 3, 4, 5, 8, 13, 14, 16, 20, 28, - 31, 35, 38, 46, 48, 52, 55, 58, 61, 62, 64, 70, 77, 78, 82, 86, 89, 99, 1, 6, 13, 15, 23, 24, - 26, 29, 33, 34, 39, 47, 76, 77, 83, 87, 88, 96, 98, 99, 2, 14, 15, 17, 20, 36, 38, 44, 54, 56, - 57, 64, 71, 80, 81, 85, 86, 87, 88, 92, 93, 95, 0, 7, 11, 14, 15, 16, 17, 20, 22, 29, 35, 39, - 44, 45, 47, 48, 78, 85, 90, 92, 94, 99, 0, 1, 3, 5, 18, 20, 28, 36, 40, 42, 44, 46, 53, 61, - 73, 80, 82, 84, 91, 95, 5, 8, 13, 27, 28, 42, 44, 49, 53, 60, 69, 70, 72, 73, 91, 1, 7, 10, - 11, 15, 21, 25, 26, 28, 41, 50, 72, 75, 81, 82, 87, 94, 96, 7, 11, 30, 31, 32, 33, 38, 42, 48, - 52, 66, 68, 82, 0, 1, 11, 15, 20, 23, 40, 60, 69, 74, 76, 80, 93, 3, 7, 9, 19, 27, 34, 37, - 38, 40, 42, 43, 46, 53, 54, 58, 59, 66, 74, 78, 81, 84, 87, 88, 91, 5, 7, 14, 34, 35, 39, 43, - 50, 60, 64, 67, 72, 76, 78, 79, 83, 84, 96, 4, 6, 10, 11, 13, 16, 28, 33, 36, 41, 42, 49, 51, - 55, 58, 59, 60, 61, 62, 65, 73, 82, 84, 86, 97, 3, 10, 13, 16, 21, 24, 28, 39, 40, 46, 47, 52, - 60, 67, 76, 81, 82, 83, 0, 1, 17, 18, 20, 32, 37, 41, 58, 60, 66, 74, 75, 90, 94, 2, 5, 12, - 18, 22, 25, 29, 36, 43, 57, 60, 63, 70, 72, 74, 83, 94, 99, 3, 4, 6, 8, 9, 10, 14, 20, 22, - 28, 29, 31, 33, 37, 38, 43, 57, 62, 64, 66, 71, 73, 74, 78, 81, 91, 94, 95, 99, 0, 3, 11, 19, - 26, 27, 34, 46, 47, 49, 64, 68, 73, 74, 81, 90, 94, 95, 97, 7, 21, 33, 44, 46, 54, 55, 61, 62, - 65, 67, 72, 91, 99, 1, 2, 5, 10, 11, 30, 37, 38, 39, 41, 48, 49, 50, 54, 63, 65, 66, 67, 75, - 85, 88, 91, 96, 0, 2, 15, 16, 18, 23, 34, 48, 49, 55, 61, 76, 77, 81, 87, 89, 90, 97, 0, 2, - 5, 14, 16, 17, 23, 24, 25, 33, 38, 39, 62, 74, 75, 8, 9, 12, 13, 15, 17, 33, 35, 40, 49, 62, - 70, 74, 80, 93, 98, 99, 0, 6, 7, 11, 12, 14, 17, 20, 28, 31, 41, 45, 50, 57, 75, 78, 85, 86, - 87, 88, 95, 7, 15, 17, 30, 35, 43, 46, 47, 57, 65, 74, 76, 87, 88, 94, 0, 15, 33, 43, 44, 51, - 55, 64, 73, 78, 82, 90, 96, 98, 1, 9, 15, 31, 33, 35, 43, 53, 65, 68, 69, 83, 88, 91, 8, 13, - 14, 20, 24, 28, 33, 38, 40, 43, 48, 50, 51, 57, 59, 60, 71, 73, 93, 96, 7, 9, 15, 19, 20, 30, - 33, 39, 64, 65, 66, 72, 73, 75, 86, 87, 89, 93}, - {0.8385492, 0.0887047, 0.4178915, 0.4859754, 0.4469863, 0.2195207, 0.3129920, 0.1031984, - 0.2898832, 0.3742032, 0.0522814, 0.3923617, 0.4283062, 0.2236069, 0.1620676, 0.0181036, - 0.0722899, 0.2825163, 0.2854958, 0.3136983, 0.4021524, 0.3556329, 0.4577443, 0.1463357, - 0.3288944, 0.4404407, 0.3466910, 0.2799277, 0.1813836, 0.4619252, 0.1622771, 0.2565850, - 0.3349850, 0.4806673, 0.2912005, 0.2509201, 0.6396587, 0.5977305, 0.1196116, 0.2077467, - 0.0345871, 0.4918659, 0.4194439, 0.4487811, 0.1682306, 0.3017929, 0.1373989, 0.3152796, - 0.3640917, 0.0489285, 0.4335400, 0.0987368, 0.1548646, 0.2137529, 0.0130792, 0.0752723, - 0.1238085, 0.3553386, 0.4349648, 0.3818015, 0.4697597, 0.4478265, 0.2176154, 0.3768051, - 0.3741169, 0.0550861, 0.3733355, 0.0161616, 0.0404749, 0.0530627, 0.3932415, 0.2313439, - 0.4807387, 0.3860448, 0.0887047, 0.1622771, 0.2646495, 0.4319774, 0.0975544, 0.3953015, - 0.4127654, 0.3950751, 0.0630765, 0.3240158, 0.3895027, 0.0263783, 0.3096741, 0.0810854, - 0.2185860, 0.2931856, 0.4413908, 0.4933484, 0.3265684, 0.3630947, 0.3439550, 0.4709083, - 0.4871525, 0.4059546, 0.2835062, 0.2319805, 0.1080630, 0.1148512, 0.4250860, 0.4319774, - 0.3417962, 0.1542346, 0.1705101, 0.3939655, 0.2228894, 0.2561502, 0.1612249, 0.3348420, - 0.7638237, 0.2223779, 0.1142358, 0.2221761, 0.1023570, 0.0100264, 0.4906516, 0.4211857, - 0.4178915, 0.2112697, 0.0841055, 0.3054300, 0.4681202, 0.3307955, 0.2055745, 0.3013350, - 0.0921099, 0.2272112, 0.4771985, 0.0400448, 0.4924752, 0.3142720, 0.3691756, 0.2582222, - 0.2400539, 0.4489491, 0.5111299, 0.4255019, 0.3747997, 0.1873246, 0.2565850, 0.1914687, - 0.3671139, 0.1276162, 0.3537677, 0.4076773, 0.1181683, 0.7192769, 0.2186738, 0.2885858, - 0.4734213, 0.0072575, 0.0765674, 0.0898227, 0.3649966, 0.2496215, 0.1702205, 0.0710704, - 0.3869004, 0.3349850, 0.1886938, 0.3514959, 0.4643647, 0.4223959, 0.3594954, 0.2522124, - 0.4105392, 0.2470788, 0.2545409, 0.3583593, 0.2345200, 0.0271059, 0.3803033, 0.1930780, - 0.4567223, 0.0613140, 0.2441548, 0.4808156, 0.3853460, 0.4859754, 0.4806673, 0.2801995, - 0.3858915, 0.0090301, 0.4087827, 0.3671360, 0.2667392, 0.4641679, 0.4647529, 0.3445000, - 0.1198545, 0.0282007, 0.1829597, 0.0539266, 0.0914677, 0.1638856, 0.1201562, 0.4388565, - 0.2036911, 0.2046127, 0.4811504, 0.3038480, 0.0642898, 0.2031245, 0.1680801, 0.0394903, - 0.4766186, 0.2023225, 0.0175873, 0.3034133, 0.4123132, 0.0379968, 0.2168891, 0.0675915, - 0.4039690, 0.3417962, 0.2112697, 0.2400451, 0.4558193, 0.1334496, 0.0195393, 0.3627390, - 0.4262152, 0.0403542, 0.3081270, 0.1527164, 0.0121030, 0.6241815, 0.4913400, 0.0157230, - 0.3200969, 0.0437878, 0.3018721, 0.0975544, 0.1886938, 0.8753713, 0.0700827, 0.2364397, - 0.4924574, 0.2563165, 0.1126200, 0.1547797, 0.0241622, 0.3814965, 0.3526533, 0.2161066, - 0.2911978, 0.4464823, 0.3577181, 0.3152088, 0.3317510, 0.2863414, 0.2801995, 0.0700827, - 0.3417172, 0.2610632, 0.4037673, 0.1736438, 0.0880198, 0.4559108, 0.1121846, 0.7814473, - 0.3779829, 0.3405251, 0.1208012, 0.4304054, 0.1807327, 0.0049234, 0.1778966, 0.3514959, - 0.2046946, 0.2997384, 0.2013881, 0.0548181, 0.3352703, 0.2054045, 0.3389475, 0.1449403, - 0.3906285, 0.0580903, 0.3582265, 0.1743012, 0.2712877, 0.4273703, 0.4566499, 0.0667344, - 0.0676206, 0.1248124, 0.0026571, 0.2774455, 0.0032627, 0.1753686, 0.3725724, 0.4469863, - 0.3858915, 0.2046946, 0.3794979, 0.4016317, 0.3370037, 0.0815573, 0.4647915, 0.0563985, - 0.4203163, 0.0915991, 0.0276749, 0.3857849, 0.0461729, 0.3978934, 0.3614717, 0.3266448, - 0.7978231, 0.4209127, 0.2912005, 0.3953015, 0.4388565, 0.3417172, 0.2997384, 0.4108247, - 0.2899171, 0.1479114, 0.4418810, 0.0634220, 0.0929668, 0.4055436, 0.2457036, 0.3701515, - 0.4134036, 0.0947451, 0.2785034, 0.3162361, 0.4036728, 0.3741804, 0.4563937, 0.4904932, - 0.1492740, 0.4887115, 0.4127654, 0.1542346, 0.1914687, 0.0090301, 0.4108247, 0.3533593, - 0.4300368, 0.3572507, 0.1412494, 0.4373029, 0.3273854, 0.2602280, 0.1690700, 0.4756982, - 0.0009060, 0.2393224, 0.0014211, 0.4101384, 0.1580024, 0.0231310, 0.5838791, 0.4132268, - 0.2181222, 0.3529412, 0.3698108, 0.2233849, 0.0987368, 0.2610632, 0.2013881, 0.3533593, - 0.2908257, 0.3609885, 0.2026076, 0.2999429, 0.2079948, 0.2704931, 0.2946429, 0.3154255, - 0.0627621, 0.2774129, 0.4206699, 0.0670598, 0.2860273, 0.3919643, 0.2397596, 0.2703603, - 0.4632739, 0.4124186, 0.5805955, 0.1959839, 0.3950751, 0.0841055, 0.3794979, 0.4300368, - 0.4032480, 0.2078872, 0.0094638, 0.2755707, 0.0376010, 0.4909527, 0.3097841, 0.2355419, - 0.0072671, 0.2746342, 0.0053361, 0.1994108, 0.3969467, 0.2509201, 0.3298818, 0.3886021, - 0.0245763, 0.4638373, 0.4052183, 0.4148478, 0.0242814, 0.2414050, 0.2932298, 0.0475468, - 0.4618716, 0.4032480, 0.8676416, 0.4028524, 0.3012557, 0.1360013, 0.1863026, 0.1490197, - 0.0643736, 0.3395792, 0.2925389, 0.3659366, 0.4948683, 0.4953563, 0.1047673, 0.0355901, - 0.0856992, 0.1778870, 0.0851296, 0.3532749, 0.0398270, 0.0630765, 0.3671139, 0.4643647, - 0.2400451, 0.2364397, 0.4431843, 0.1266264, 0.4763364, 0.7873081, 0.2751093, 0.4222012, - 0.1121367, 0.4474346, 0.3652081, 0.1600931, 0.0614609, 0.0204758, 0.1615355, 0.4293712, - 0.3882434, 0.6431416, 0.0548181, 0.2899171, 0.3634890, 0.4412351, 0.1490288, 0.0447601, - 0.4229826, 0.3807294, 0.0672451, 0.2775799, 0.4666647, 0.4085002, 0.1297752, 0.1563804, - 0.1522877, 0.2532282, 0.2805034, 0.1651538, 0.1046609, 0.1760083, 0.2195207, 0.1705101, - 0.1276162, 0.4558193, 0.4924574, 0.3572507, 0.3401189, 0.0565680, 0.4332137, 0.2150277, - 0.4809324, 0.2783410, 0.1570549, 0.4891155, 0.4529251, 0.2209245, 0.3658022, 0.3961954, - 0.3788675, 0.1621254, 0.3969478, 0.3886663, 0.4372073, 0.3537677, 0.4037673, 0.2908257, - 0.4028524, 0.4431843, 0.7202524, 0.3443225, 0.3538920, 0.3133293, 0.4439365, 0.1412494, - 0.3012557, 0.3634890, 0.3401189, 0.1250412, 0.4831129, 0.0737263, 0.3228796, 0.0975274, - 0.1318027, 0.4008097, 0.1548646, 0.2036911, 0.1334496, 0.4016317, 0.1479114, 0.3609885, - 0.1360013, 0.1494316, 0.4203018, 0.2847606, 0.1855530, 0.3948809, 0.1457941, 0.1710113, - 0.4871747, 0.0616420, 0.2720916, 0.1494316, 0.3342525, 0.4981484, 0.2835164, 0.2201109, - 0.3569505, 0.3228796, 0.2664382, 0.1461955, 0.2912845, 0.2178672, 0.0091858, 0.3888402, - 0.3213883, 0.1017065, 0.2137529, 0.2078872, 0.1863026, 0.0565680, 0.2497744, 0.0917027, - 0.3077455, 0.2898162, 0.1962939, 0.0667715, 0.0511321, 0.4857582, 0.0757288, 0.4719980, - 0.0990155, 0.0358659, 0.3427203, 0.4911953, 0.0026993, 0.3121863, 0.3129920, 0.4076773, - 0.4087827, 0.0195393, 0.3352703, 0.1490197, 0.4412351, 0.4203018, 0.3342525, 0.4991112, - 0.3198876, 0.0273423, 0.1726720, 0.2868139, 0.0167729, 0.3167321, 0.3240158, 0.1181683, - 0.4223959, 0.2054045, 0.4418810, 0.2026076, 0.3298818, 0.4332137, 0.4679078, 0.2938424, - 0.2349892, 0.3265936, 0.4161196, 0.0540847, 0.4671349, 0.4922210, 0.4333457, 0.2783662, - 0.3295173, 0.1414430, 0.4789151, 0.5482149, 0.2405941, 0.0873055, 0.4915100, 0.1031984, - 0.6396587, 0.3054300, 0.4373029, 0.2999429, 0.1490288, 0.2150277, 0.4679078, 0.4463057, - 0.3714156, 0.1611302, 0.3379962, 0.4654491, 0.0994459, 0.4963855, 0.0027219, 0.2011968, - 0.2413642, 0.0713272, 0.0186765, 0.5553801, 0.0508773, 0.4655451, 0.3939655, 0.4681202, - 0.2046127, 0.2079948, 0.0447601, 0.2938424, 0.4463057, 0.4189366, 0.4805591, 0.4724835, - 0.4029289, 0.3810731, 0.3855192, 0.2898832, 0.3895027, 0.3307955, 0.3594954, 0.4811504, - 0.1736438, 0.3370037, 0.2704931, 0.0094638, 0.4229826, 0.2349892, 0.1488369, 0.3299349, - 0.3658398, 0.2805756, 0.1943161, 0.1270155, 0.2077195, 0.1249269, 0.0572191, 0.3217881, - 0.1812549, 0.4356323, 0.2024299, 0.4955283, 0.2777625, 0.0642578, 0.4278218, 0.3742032, - 0.2228894, 0.3627390, 0.0880198, 0.1250412, 0.1488369, 0.6981739, 0.2518100, 0.2364128, - 0.4279115, 0.4212285, 0.4749146, 0.2284694, 0.1864383, 0.0079268, 0.2446150, 0.4631400, - 0.2501489, 0.4844082, 0.0522814, 0.5977305, 0.0263783, 0.2522124, 0.2755707, 0.3886021, - 0.2847606, 0.4991112, 0.0239194, 0.4028964, 0.2294849, 0.2998522, 0.1320064, 0.0275548, - 0.1151714, 0.2652366, 0.2787146, 0.2884416, 0.1149032, 0.3923617, 0.3807294, 0.0540387, - 0.2807390, 0.0142855, 0.3054538, 0.0743166, 0.1352609, 0.3096741, 0.2561502, 0.7192769, - 0.4809324, 0.4981484, 0.3299349, 0.2030550, 0.2820974, 0.3606436, 0.1871530, 0.2116934, - 0.1441479, 0.2874195, 0.3848211, 0.3917919, 0.4778197, 0.2946429, 0.4189366, 0.2518100, - 0.2030550, 0.4912895, 0.1356941, 0.2409017, 0.4399648, 0.2600915, 0.1039219, 0.0522639, - 0.1473574, 0.1156571, 0.2768389, 0.4478964, 0.1246019, 0.1488771, 0.3747582, 0.0281233, - 0.0742416, 0.4283062, 0.1612249, 0.4559108, 0.3389475, 0.1266264, 0.0672451, 0.3265936, - 0.2820974, 0.3309392, 0.0915848, 0.0509763, 0.4962989, 0.4802843, 0.0841302, 0.1918956, - 0.3192275, 0.4662680, 0.1974726, 0.0810854, 0.2783410, 0.4912895, 0.3111583, 0.4521906, - 0.2043965, 0.3393941, 0.2771504, 0.4931641, 0.1747926, 0.0280012, 0.3078630, 0.0456258, - 0.1170995, 0.0880413, 0.2797376, 0.2573348, 0.2639170, 0.3364275, 0.2011374, 0.0130792, - 0.1121846, 0.1449403, 0.0245763, 0.2775799, 0.1570549, 0.4161196, 0.0239194, 0.3309392, - 0.3111583, 0.3020653, 0.0100230, 0.4954931, 0.4227756, 0.3662207, 0.4669757, 0.1495063, - 0.4342381, 0.0752723, 0.4105392, 0.4262152, 0.3273854, 0.3154255, 0.1356941, 0.1063635, - 0.3477053, 0.4418667, 0.4065750, 0.2158301, 0.0978730, 0.3474138, 0.0941925, 0.2502904, - 0.4167871, 0.1238085, 0.2055745, 0.3906285, 0.4763364, 0.3606436, 0.2409017, 0.2856070, - 0.4519934, 0.0640926, 0.3494168, 0.2239768, 0.1506959, 0.3404586, 0.0097513, 0.3356108, - 0.2007709, 0.0563368, 0.1196116, 0.0815573, 0.4891155, 0.4399648, 0.1063635, 0.0469109, - 0.4409516, 0.2269343, 0.1728651, 0.4690269, 0.4568825, 0.3838028, 0.1701081, 0.2478454, - 0.3553386, 0.3348420, 0.2563165, 0.0580903, 0.4647915, 0.2602280, 0.0643736, 0.7873081, - 0.4831129, 0.0540847, 0.3714156, 0.4521906, 0.0529002, 0.1118892, 0.3946897, 0.2185860, - 0.3582265, 0.0737263, 0.4671349, 0.1611302, 0.0540387, 0.2600915, 0.2043965, 0.0178831, - 0.3605796, 0.4215185, 0.3441654, 0.3192719, 0.2912215, 0.2253530, 0.4059448, 0.0770738, - 0.2236069, 0.7638237, 0.2186738, 0.1126200, 0.7814473, 0.1743012, 0.1690700, 0.2751093, - 0.4922210, 0.3379962, 0.2364128, 0.3477053, 0.7218004, 0.3724327, 0.2531753, 0.0252278, - 0.2816279, 0.1346799, 0.1643871, 0.3633022, 0.1110411, 0.2297511, 0.4249687, 0.4478221, - 0.2225533, 0.2077467, 0.4349648, 0.3779829, 0.2712877, 0.4638373, 0.4666647, 0.2835164, - 0.4333457, 0.4028734, 0.3229839, 0.3908435, 0.3720633, 0.3528297, 0.4553215, 0.1170026, - 0.4753753, 0.0282417, 0.1620676, 0.2931856, 0.3671360, 0.1547797, 0.4052183, 0.4222012, - 0.4085002, 0.3198876, 0.3393941, 0.4418667, 0.3724327, 0.0297363, 0.4194855, 0.1562718, - 0.1693750, 0.3152241, 0.3387593, 0.2933232, 0.0599440, 0.1064471, 0.2469246, 0.0528503, - 0.0321264, 0.0181036, 0.2223779, 0.2667392, 0.4756982, 0.4148478, 0.1855530, 0.2201109, - 0.3658398, 0.4028964, 0.4194855, 0.1724464, 0.2184300, 0.4806912, 0.3213868, 0.4946703, - 0.0183148, 0.4068079, 0.3882787, 0.1461515, 0.3377662, 0.1434079, 0.1656042, 0.1153671, - 0.0297401, 0.0722899, 0.3818015, 0.0376010, 0.1297752, 0.4529251, 0.2497744, 0.4654491, - 0.4805591, 0.3020653, 0.0469109, 0.2531753, 0.4028734, 0.3104094, 0.0983794, 0.3041750, - 0.7444220, 0.0469955, 0.4269330, 0.3876660, 0.4697597, 0.3013350, 0.2885858, 0.3038480, - 0.1121367, 0.1563804, 0.4279115, 0.2184300, 0.3897764, 0.1165223, 0.1623044, 0.3694641, - 0.4647038, 0.1950430, 0.0223306, 0.4734213, 0.0642898, 0.3405251, 0.0563985, 0.2209245, - 0.3569505, 0.0994459, 0.4806912, 0.3142114, 0.1688596, 0.2013356, 0.3616973, 0.1345261, - 0.3665765, 0.1457076, 0.2400093, 0.4413908, 0.1208012, 0.4203163, 0.4474346, 0.1522877, - 0.4963855, 0.2771504, 0.3932629, 0.2256821, 0.3466487, 0.1397347, 0.4893270, 0.1162840, - 0.4933484, 0.0921099, 0.0072575, 0.0241622, 0.4273703, 0.0009060, 0.3652081, 0.3228796, - 0.0917027, 0.2805756, 0.1871530, 0.4409516, 0.0252278, 0.1562718, 0.3213868, 0.0526326, - 0.2417610, 0.1361428, 0.4773201, 0.2157922, 0.2075818, 0.1745262, 0.2272112, 0.0765674, - 0.4641679, 0.2031245, 0.0403542, 0.3814965, 0.2664382, 0.2294849, 0.3229839, 0.3104094, - 0.3142114, 0.1920804, 0.3407301, 0.3448193, 0.4478265, 0.3265684, 0.1142358, 0.4909527, - 0.4724835, 0.2998522, 0.1039219, 0.0100230, 0.3908435, 0.1693750, 0.1674092, 0.0846982, - 0.3384884, 0.1067837, 0.3844901, 0.1491689, 0.4107678, 0.5988698, 0.2176154, 0.4771985, - 0.1680801, 0.0915991, 0.0634220, 0.2393224, 0.0627621, 0.2532282, 0.3658022, 0.7202524, - 0.3948809, 0.1943161, 0.4931641, 0.0983794, 0.1688596, 0.4067034, 0.2580674, 0.4757213, - 0.3928346, 0.1995547, 0.2107771, 0.3768051, 0.3630947, 0.4647529, 0.3081270, 0.3077455, - 0.0522639, 0.1747926, 0.2013356, 0.3932629, 0.0526326, 0.3694007, 0.0972740, 0.3075456, - 0.2167318, 0.4610244, 0.0345871, 0.3439550, 0.2221761, 0.0400448, 0.0394903, 0.4566499, - 0.0014211, 0.2774129, 0.1600931, 0.2805034, 0.3961954, 0.1461955, 0.0027219, 0.1270155, - 0.0915848, 0.0529002, 0.0703681, 0.0187762, 0.2613653, 0.1867701, 0.1502444, 0.3600508, - 0.4655130, 0.3398629, 0.4028377, 0.1709328, 0.2641133, 0.2825163, 0.1023570, 0.2470788, - 0.4304054, 0.3395792, 0.2783662, 0.3152241, 0.4067034, 0.9997413, 0.3054797, 0.4133712, - 0.0630975, 0.0166616, 0.3381947, 0.2909326, 0.2139573, 0.0475201, 0.2854958, 0.3741169, - 0.0667344, 0.0929668, 0.4101384, 0.3097841, 0.2011968, 0.2807390, 0.2856070, 0.4946703, - 0.3897764, 0.1920804, 0.0187762, 0.3054797, 0.0461345, 0.2358043, 0.4405020, 0.2239718, - 0.0232168, 0.2595815, 0.1997993, 0.3136983, 0.0550861, 0.4924752, 0.0242814, 0.2898162, - 0.0273423, 0.0280012, 0.3387593, 0.4133712, 0.1691249, 0.4277944, 0.3262424, 0.2545409, - 0.3445000, 0.4766186, 0.1527164, 0.2355419, 0.1457941, 0.1962939, 0.4212285, 0.4065750, - 0.1674092, 0.0040041, 0.3576335, 0.6885277, 0.0684911, 0.0949263, 0.3370988, 0.4251885, - 0.4918659, 0.3733355, 0.3583593, 0.2023225, 0.1580024, 0.4206699, 0.2414050, 0.0614609, - 0.4749146, 0.2816279, 0.0183148, 0.1165223, 0.3407301, 0.0630975, 0.3476292, 0.2974767, - 0.0964920, 0.2228194, 0.2653476, 0.0658719, 0.3992334, 0.4709083, 0.1198545, 0.0204758, - 0.3788675, 0.3228796, 0.3295173, 0.2413642, 0.2284694, 0.0178831, 0.4068079, 0.1623044, - 0.0846982, 0.0461345, 0.1464626, 0.1254936, 0.4546162, 0.0599609, 0.2089537, 0.0068666, - 0.0161616, 0.4871525, 0.3142720, 0.2925389, 0.2912845, 0.0667715, 0.2116934, 0.3078630, - 0.4519934, 0.3616973, 0.2256821, 0.3476292, 0.1306226, 0.2562920, 0.1834991, 0.1524191, - 0.4803574, 0.0404749, 0.3691756, 0.0898227, 0.0282007, 0.0121030, 0.4055436, 0.0670598, - 0.1615355, 0.1710113, 0.0511321, 0.1414430, 0.1864383, 0.0640926, 0.1346799, 0.3882787, - 0.3694007, 0.0812578, 0.3378220, 0.2461788, 0.3674253, 0.4063063, 0.4194439, 0.3649966, - 0.2457036, 0.0072671, 0.2178672, 0.1473574, 0.0509763, 0.0456258, 0.2158301, 0.3041750, - 0.3694641, 0.1306226, 0.0812578, 0.4179677, 0.0273935, 0.1376181, 0.1237823, 0.0175873, - 0.0231310, 0.2860273, 0.4789151, 0.4029289, 0.1320064, 0.4954931, 0.1643871, 0.7444220, - 0.2580674, 0.0972740, 0.2613653, 0.3378220, 0.0734471, 0.5716440, 0.3270837, 0.4374486, - 0.3034133, 0.6241815, 0.0091858, 0.1441479, 0.1170995, 0.2269343, 0.3605796, 0.3633022, - 0.1461515, 0.2417610, 0.4179677, 0.1296077, 0.4877253, 0.1591760, 0.4487811, 0.4059546, - 0.0100264, 0.2582222, 0.1829597, 0.0676206, 0.0276749, 0.5838791, 0.3659366, 0.4857582, - 0.0713272, 0.0275548, 0.1156571, 0.4215185, 0.3720633, 0.4647038, 0.1361428, 0.4757213, - 0.0166616, 0.2358043, 0.0040041, 0.0734471, 0.1602434, 0.0591811, 0.1030985, 0.1983638, - 0.4710790, 0.4003320, 0.1682306, 0.2496215, 0.1248124, 0.3701515, 0.1621254, 0.3443225, - 0.4871747, 0.1726720, 0.2077195, 0.0079268, 0.4962989, 0.1110411, 0.2440522, 0.4165031, - 0.0252984, 0.3045145, 0.4441046, 0.4572209, 0.2415059, 0.4238202, 0.0530627, 0.3857849, - 0.4134036, 0.3919643, 0.4948683, 0.0142855, 0.2768389, 0.1728651, 0.3466487, 0.3448193, - 0.3384884, 0.3576335, 0.1296077, 0.1268078, 0.2563025, 0.1895228, 0.3345918, 0.4166048, - 0.4054141, 0.2596988, 0.4439297, 0.4482521, 0.4021524, 0.2345200, 0.3526533, 0.0461729, - 0.0947451, 0.4132268, 0.2397596, 0.4953563, 0.1651538, 0.2868139, 0.1151714, 0.4802843, - 0.4690269, 0.1118892, 0.2297511, 0.3528297, 0.0649494, 0.1603665, 0.3632484, 0.4808010, - 0.3155171, 0.0421940, 0.3556329, 0.3017929, 0.2835062, 0.2400539, 0.2746342, 0.1047673, - 0.0757288, 0.3054538, 0.0880413, 0.0978730, 0.4568825, 0.3441654, 0.1345261, 0.3381947, - 0.2440522, 0.1453612, 0.0627209, 0.4289585, 0.3434332, 0.1462075, 0.4489491, 0.0539266, - 0.0026571, 0.3888402, 0.4719980, 0.3474138, 0.3838028, 0.2933232, 0.3665765, 0.1867701, - 0.0273935, 0.5716440, 0.1602434, 0.4165031, 0.3889723, 0.1373989, 0.0271059, 0.4913400, - 0.2161066, 0.2785034, 0.4293712, 0.0975274, 0.0616420, 0.0990155, 0.4227756, 0.3377662, - 0.0591811, 0.0649494, 0.4863133, 0.3123243, 0.3094676, 0.4548634, 0.3543404, 0.3803033, - 0.2911978, 0.5482149, 0.0186765, 0.3810731, 0.1249269, 0.4478964, 0.0941925, 0.4553215, - 0.1950430, 0.1464626, 0.2461788, 0.2376485, 0.4577443, 0.3152796, 0.4464823, 0.3162361, - 0.0355901, 0.3969478, 0.2797376, 0.1502444, 0.1376181, 0.1268078, 0.1453612, 0.8429500, - 0.2124143, 0.2319805, 0.1930780, 0.4123132, 0.2932298, 0.3213883, 0.2446150, 0.2874195, - 0.1246019, 0.2573348, 0.2502904, 0.3494168, 0.3192719, 0.1457076, 0.1397347, 0.3928346, - 0.3075456, 0.1254936, 0.2563025, 0.4863133, 0.2630258, 0.1192136, 0.1283403, 0.3361003, - 0.3254332, 0.5111299, 0.4567223, 0.3978934, 0.4631400, 0.2652366, 0.0841302, 0.2239768, - 0.1434079, 0.3600508, 0.6885277, 0.2562920, 0.1030985, 0.0627209, 0.3123243, 0.2376485, - 0.6660228, 0.2737032, 0.0725528, 0.4906516, 0.1702205, 0.0157230, 0.3577181, 0.2774455, - 0.2181222, 0.0358659, 0.0572191, 0.0743166, 0.3662207, 0.4167871, 0.0599440, 0.0469955, - 0.4773201, 0.1995547, 0.2167318, 0.4655130, 0.2909326, 0.4405020, 0.2974767, 0.0252984, - 0.6660228, 0.4688708, 0.4444213, 0.2486204, 0.1080630, 0.3200969, 0.0032627, 0.3529412, - 0.3882434, 0.3538920, 0.3427203, 0.1918956, 0.2639170, 0.2912215, 0.4249687, 0.0223306, - 0.3398629, 0.1834991, 0.4289585, 0.1192136, 0.2737032, 0.4688708, 0.1463357, 0.3640917, - 0.2703603, 0.0053361, 0.0856992, 0.3855192, 0.3848211, 0.4669757, 0.2107771, 0.4028377, - 0.4546162, 0.1895228, 0.1603665, 0.1891034, 0.1633865, 0.3932415, 0.4255019, 0.1807327, - 0.1994108, 0.1046609, 0.1318027, 0.0167729, 0.1352609, 0.1506959, 0.1067837, 0.1709328, - 0.4277944, 0.3270837, 0.1983638, 0.3345918, 0.4444213, 0.4795561, 0.3394504, 0.1148512, - 0.4211857, 0.0710704, 0.0914677, 0.0379968, 0.0437878, 0.3614717, 0.1778870, 0.1760083, - 0.4911953, 0.3167321, 0.5553801, 0.3217881, 0.3917919, 0.1488771, 0.3404586, 0.3844901, - 0.2239718, 0.0684911, 0.0599609, 0.4877253, 0.3045145, 0.4166048, 0.3094676, 0.1283403, - 0.4126990, 0.0727838, 0.3816538, 0.3677183, 0.3288944, 0.4250860, 0.3152088, 0.0475468, - 0.2720916, 0.1017065, 0.2501489, 0.2253530, 0.4478221, 0.1064471, 0.0949263, 0.3674253, - 0.4441046, 0.4054141, 0.3361003, 0.3239112, 0.1663671, 0.0782135, 0.4374697, 0.0613140, - 0.6431416, 0.1812549, 0.1701081, 0.4059448, 0.4893270, 0.2157922, 0.2139573, 0.0232168, - 0.0964920, 0.1524191, 0.4710790, 0.4609937, 0.1566380, 0.0489285, 0.2313439, 0.3747997, - 0.3018721, 0.3317510, 0.2405941, 0.4778197, 0.3747582, 0.3192275, 0.1495063, 0.1170026, - 0.2469246, 0.1656042, 0.1162840, 0.3262424, 0.2228194, 0.2089537, 0.4803574, 0.3632484, - 0.1891034, 0.3239112, 0.1381195, 0.0077237, 0.4404407, 0.4807387, 0.4036728, 0.3698108, - 0.3969467, 0.3886663, 0.4844082, 0.4753753, 0.0528503, 0.2075818, 0.0475201, 0.3434332, - 0.3889723, 0.3254332, 0.4126990, 0.4609937, 0.1381195, 0.0022522, 0.3466910, 0.3860448, - 0.1873246, 0.3266448, 0.2233849, 0.4632739, 0.4372073, 0.3133293, 0.4008097, 0.4356323, - 0.0281233, 0.4662680, 0.2595815, 0.2596988, 0.4808010, 0.1638856, 0.2168891, 0.0049234, - 0.1753686, 0.3741804, 0.4124186, 0.2024299, 0.2787146, 0.3364275, 0.0321264, 0.1997993, - 0.4374486, 0.4439297, 0.2124143, 0.2074694, 0.1906150, 0.1204390, 0.2799277, 0.3869004, - 0.2441548, 0.2863414, 0.1778966, 0.7978231, 0.5805955, 0.0851296, 0.0026993, 0.0508773, - 0.4342381, 0.3946897, 0.1153671, 0.1491689, 0.3155171, 0.4548634, 0.1633865, 0.4795561, - 0.0727838, 0.1663671, 0.1552885, 0.4808156, 0.4563937, 0.1959839, 0.0873055, 0.2884416, - 0.0097513, 0.0770738, 0.2225533, 0.4107678, 0.2653476, 0.4482521, 0.1462075, 0.3816538, - 0.0782135, 0.1552885, 0.1813836, 0.4904932, 0.4955283, 0.3356108, 0.2478454, 0.4269330, - 0.1745262, 0.3370988, 0.4572209, 0.3543404, 0.0725528, 0.0077237, 0.3415696, 0.1628898, - 0.4335400, 0.0675915, 0.1492740, 0.4655451, 0.2777625, 0.1149032, 0.2007709, 0.2400093, - 0.0658719, 0.4063063, 0.1237823, 0.2486204, 0.4374697, 0.0022522, 0.1201562, 0.3725724, - 0.4209127, 0.3532749, 0.4439365, 0.3121863, 0.0642578, 0.0742416, 0.2011374, 0.0563368, - 0.0282417, 0.0297401, 0.3876660, 0.5988698, 0.4610244, 0.2641133, 0.1591760, 0.2415059, - 0.1906150, 0.1628898, 0.3853460, 0.4039690, 0.4887115, 0.4618716, 0.0398270, 0.4915100, - 0.4278218, 0.1974726, 0.4251885, 0.3992334, 0.0068666, 0.4003320, 0.4238202, 0.0421940, - 0.3394504, 0.3677183, 0.1566380, 0.1204390}, + rows, + cols, + vals, {2.40271478, 5.47778263}}}; const std::vector> inputsd_SA = { @@ -1451,328 +799,65 @@ const std::vector> inputsd_SA = { 1e-15, raft::sparse::solver::LANCZOS_WHICH::SA, 42, - {0, 29, 51, 74, 103, 120, 142, 161, 181, 199, 217, 235, 254, 271, 295, - 314, 338, 364, 388, 405, 417, 437, 458, 478, 501, 511, 522, 539, 554, 574, - 590, 615, 638, 651, 679, 698, 717, 725, 741, 761, 779, 799, 817, 833, 850, - 864, 879, 896, 921, 938, 961, 985, 1004, 1019, 1035, 1048, 1070, 1084, 1102, 1123, - 1138, 1165, 1182, 1203, 1215, 1232, 1253, 1272, 1289, 1310, 1327, 1344, 1358, 1386, 1406, - 1428, 1450, 1470, 1485, 1503, 1516, 1529, 1553, 1571, 1596, 1614, 1629, 1647, 1676, 1695, - 1709, 1732, 1750, 1765, 1782, 1803, 1818, 1832, 1846, 1866, 1884}, - {0, 3, 5, 8, 14, 23, 29, 31, 33, 34, 35, 36, 39, 47, 49, 50, 51, 61, 62, 63, 75, 76, 80, 85, - 88, 91, 92, 94, 96, 1, 3, 6, 7, 8, 15, 19, 31, 35, 44, 48, 60, 65, 69, 72, 73, 76, 78, 80, - 85, 90, 97, 17, 26, 28, 41, 42, 43, 45, 48, 51, 52, 57, 58, 59, 62, 63, 65, 67, 68, 74, 86, 90, - 91, 92, 0, 1, 3, 4, 11, 15, 16, 18, 21, 30, 33, 35, 37, 40, 46, 49, 54, 55, 57, 59, 60, 66, - 67, 72, 76, 81, 84, 87, 88, 3, 10, 16, 23, 32, 34, 37, 39, 45, 47, 50, 57, 60, 61, 72, 83, 87, - 0, 10, 18, 31, 32, 33, 43, 52, 55, 56, 58, 60, 63, 67, 68, 72, 76, 77, 82, 86, 90, 92, 1, 16, - 21, 23, 24, 29, 30, 37, 47, 52, 53, 55, 56, 68, 69, 73, 83, 87, 94, 1, 11, 13, 21, 30, 33, 35, - 42, 61, 64, 65, 75, 78, 79, 81, 82, 89, 94, 95, 99, 0, 1, 12, 14, 16, 29, 49, 50, 56, 59, 64, - 66, 68, 72, 77, 87, 93, 98, 15, 26, 32, 33, 52, 53, 56, 58, 60, 64, 65, 70, 71, 81, 87, 93, 97, - 99, 4, 5, 21, 23, 26, 29, 34, 42, 56, 59, 64, 68, 71, 78, 83, 84, 87, 90, 3, 7, 11, 12, 21, - 23, 45, 47, 49, 55, 56, 75, 78, 79, 80, 83, 88, 90, 94, 8, 11, 15, 17, 24, 33, 34, 39, 41, 47, - 48, 53, 54, 61, 86, 93, 94, 7, 14, 15, 17, 22, 29, 30, 39, 41, 43, 45, 46, 47, 48, 55, 60, 62, - 72, 73, 77, 83, 84, 93, 98, 0, 8, 13, 18, 26, 33, 44, 45, 53, 54, 58, 72, 74, 75, 82, 87, 92, - 94, 98, 1, 3, 9, 12, 13, 16, 22, 26, 30, 58, 62, 68, 69, 73, 74, 75, 78, 80, 91, 93, 95, 96, - 97, 99, 3, 4, 6, 8, 15, 17, 18, 23, 25, 31, 42, 45, 47, 50, 55, 58, 60, 62, 65, 70, 72, 75, - 83, 84, 91, 92, 2, 12, 13, 16, 24, 26, 30, 31, 32, 33, 38, 42, 58, 60, 65, 68, 70, 74, 75, 85, - 92, 93, 94, 95, 3, 5, 14, 16, 20, 28, 33, 35, 51, 57, 62, 64, 69, 76, 85, 86, 91, 1, 30, 35, - 41, 48, 49, 50, 63, 65, 81, 88, 99, 18, 20, 24, 25, 26, 28, 29, 45, 61, 67, 72, 74, 75, 76, 80, - 85, 87, 94, 98, 99, 3, 6, 7, 10, 11, 24, 39, 43, 45, 47, 49, 52, 54, 55, 60, 65, 66, 68, 78, - 84, 89, 13, 15, 25, 29, 31, 32, 33, 36, 39, 41, 48, 49, 51, 52, 54, 58, 60, 75, 86, 87, 0, 4, - 6, 10, 11, 16, 25, 28, 30, 31, 37, 40, 41, 44, 51, 53, 58, 60, 66, 73, 80, 91, 92, 6, 12, 17, - 20, 21, 58, 73, 84, 92, 98, 16, 20, 22, 23, 34, 45, 46, 66, 78, 86, 92, 2, 9, 10, 14, 15, 17, - 20, 27, 29, 35, 50, 58, 64, 68, 73, 78, 88, 26, 29, 37, 48, 50, 53, 55, 56, 60, 67, 69, 71, 77, - 81, 88, 2, 18, 20, 23, 51, 55, 59, 63, 64, 67, 68, 72, 76, 77, 78, 83, 84, 87, 94, 98, 0, 6, - 8, 10, 13, 20, 22, 26, 27, 35, 49, 63, 73, 75, 86, 87, 3, 6, 7, 13, 15, 17, 19, 23, 31, 32, - 33, 39, 41, 45, 46, 47, 48, 61, 66, 68, 70, 79, 90, 95, 99, 0, 1, 5, 16, 17, 22, 23, 30, 32, - 45, 46, 47, 51, 53, 54, 60, 62, 66, 72, 79, 87, 94, 97, 4, 5, 9, 17, 22, 30, 31, 38, 51, 57, - 70, 79, 85, 0, 3, 5, 7, 9, 12, 14, 17, 18, 22, 30, 34, 37, 50, 55, 58, 60, 73, 79, 83, 87, - 89, 92, 93, 96, 97, 98, 99, 0, 4, 10, 12, 25, 33, 34, 38, 47, 52, 64, 65, 66, 68, 73, 81, 82, - 88, 91, 0, 1, 3, 7, 18, 19, 26, 29, 41, 50, 56, 57, 70, 72, 75, 82, 93, 95, 97, 0, 22, 46, - 62, 74, 76, 83, 86, 3, 4, 6, 23, 27, 33, 38, 39, 43, 55, 67, 71, 81, 85, 87, 90, 17, 32, 34, - 37, 40, 42, 43, 44, 46, 57, 59, 69, 72, 74, 79, 81, 87, 90, 92, 98, 0, 4, 12, 13, 21, 22, 30, - 37, 41, 60, 69, 73, 75, 82, 84, 90, 92, 99, 3, 23, 38, 41, 45, 46, 49, 54, 58, 59, 63, 67, 69, - 71, 76, 80, 81, 84, 93, 98, 2, 12, 13, 19, 22, 23, 30, 35, 39, 40, 51, 57, 70, 78, 83, 85, 90, - 94, 2, 7, 10, 16, 17, 38, 44, 47, 49, 64, 69, 76, 77, 79, 81, 83, 2, 5, 13, 21, 37, 38, 62, - 67, 68, 81, 82, 86, 87, 95, 96, 97, 98, 1, 14, 23, 38, 42, 51, 55, 71, 74, 75, 76, 77, 89, 96, - 2, 4, 11, 13, 14, 16, 20, 21, 25, 30, 31, 40, 60, 75, 94, 3, 13, 25, 30, 31, 36, 38, 40, 66, - 71, 72, 76, 81, 84, 88, 89, 95, 0, 4, 6, 11, 12, 13, 16, 21, 30, 31, 34, 42, 47, 49, 51, 55, - 65, 68, 70, 71, 73, 75, 84, 88, 95, 1, 2, 12, 13, 19, 22, 27, 30, 51, 56, 57, 72, 75, 79, 90, - 91, 98, 0, 3, 8, 11, 19, 21, 22, 29, 40, 42, 47, 49, 50, 55, 57, 61, 63, 77, 83, 88, 90, 91, - 93, 0, 4, 8, 16, 19, 26, 27, 33, 35, 49, 50, 52, 53, 55, 62, 65, 66, 68, 71, 78, 82, 90, 94, - 98, 0, 2, 18, 22, 23, 28, 31, 32, 41, 44, 47, 48, 56, 58, 69, 70, 83, 96, 98, 2, 5, 6, 9, - 21, 22, 34, 50, 62, 65, 66, 69, 72, 79, 84, 6, 9, 12, 14, 23, 27, 31, 50, 56, 58, 59, 67, 76, - 77, 81, 97, 3, 12, 14, 21, 22, 31, 40, 59, 67, 74, 81, 89, 90, 3, 5, 6, 11, 13, 16, 21, 27, - 28, 33, 37, 44, 47, 49, 50, 59, 71, 72, 83, 89, 91, 96, 5, 6, 8, 9, 10, 11, 27, 35, 48, 51, - 53, 62, 65, 74, 2, 3, 4, 18, 32, 35, 38, 41, 48, 49, 64, 66, 74, 86, 87, 94, 95, 98, 2, 5, - 9, 14, 15, 16, 17, 22, 23, 24, 26, 33, 40, 51, 53, 61, 70, 72, 81, 83, 85, 2, 3, 8, 10, 28, - 38, 40, 53, 54, 55, 68, 70, 81, 83, 98, 1, 3, 4, 5, 9, 13, 16, 17, 21, 22, 23, 27, 31, 33, - 39, 45, 60, 62, 70, 77, 80, 82, 83, 84, 85, 86, 98, 0, 4, 7, 12, 20, 30, 49, 58, 61, 62, 63, - 65, 72, 76, 83, 89, 91, 0, 2, 13, 15, 16, 18, 31, 36, 43, 50, 52, 56, 60, 61, 66, 72, 83, 87, - 89, 92, 93, 0, 2, 5, 19, 28, 29, 40, 49, 61, 63, 86, 90, 7, 8, 9, 10, 18, 26, 28, 34, 42, - 57, 72, 74, 82, 87, 88, 96, 99, 1, 2, 7, 9, 16, 17, 19, 21, 34, 47, 50, 52, 56, 61, 67, 83, - 89, 90, 95, 97, 99, 3, 8, 21, 23, 25, 30, 31, 34, 46, 50, 52, 57, 62, 79, 81, 85, 87, 90, 99, - 2, 3, 5, 20, 27, 28, 37, 40, 43, 53, 54, 65, 69, 82, 84, 89, 90, 2, 5, 6, 8, 10, 15, 17, - 21, 26, 28, 30, 34, 43, 47, 50, 59, 69, 70, 79, 88, 97, 1, 6, 15, 18, 27, 38, 39, 40, 42, 51, - 52, 67, 68, 71, 77, 80, 97, 9, 16, 17, 30, 32, 35, 41, 47, 51, 58, 59, 60, 68, 72, 77, 86, 93, - 9, 10, 27, 37, 40, 44, 46, 47, 50, 55, 69, 74, 87, 98, 1, 3, 4, 5, 8, 13, 14, 16, 20, 28, - 31, 35, 38, 46, 48, 52, 55, 58, 61, 62, 64, 70, 77, 78, 82, 86, 89, 99, 1, 6, 13, 15, 23, 24, - 26, 29, 33, 34, 39, 47, 76, 77, 83, 87, 88, 96, 98, 99, 2, 14, 15, 17, 20, 36, 38, 44, 54, 56, - 57, 64, 71, 80, 81, 85, 86, 87, 88, 92, 93, 95, 0, 7, 11, 14, 15, 16, 17, 20, 22, 29, 35, 39, - 44, 45, 47, 48, 78, 85, 90, 92, 94, 99, 0, 1, 3, 5, 18, 20, 28, 36, 40, 42, 44, 46, 53, 61, - 73, 80, 82, 84, 91, 95, 5, 8, 13, 27, 28, 42, 44, 49, 53, 60, 69, 70, 72, 73, 91, 1, 7, 10, - 11, 15, 21, 25, 26, 28, 41, 50, 72, 75, 81, 82, 87, 94, 96, 7, 11, 30, 31, 32, 33, 38, 42, 48, - 52, 66, 68, 82, 0, 1, 11, 15, 20, 23, 40, 60, 69, 74, 76, 80, 93, 3, 7, 9, 19, 27, 34, 37, - 38, 40, 42, 43, 46, 53, 54, 58, 59, 66, 74, 78, 81, 84, 87, 88, 91, 5, 7, 14, 34, 35, 39, 43, - 50, 60, 64, 67, 72, 76, 78, 79, 83, 84, 96, 4, 6, 10, 11, 13, 16, 28, 33, 36, 41, 42, 49, 51, - 55, 58, 59, 60, 61, 62, 65, 73, 82, 84, 86, 97, 3, 10, 13, 16, 21, 24, 28, 39, 40, 46, 47, 52, - 60, 67, 76, 81, 82, 83, 0, 1, 17, 18, 20, 32, 37, 41, 58, 60, 66, 74, 75, 90, 94, 2, 5, 12, - 18, 22, 25, 29, 36, 43, 57, 60, 63, 70, 72, 74, 83, 94, 99, 3, 4, 6, 8, 9, 10, 14, 20, 22, - 28, 29, 31, 33, 37, 38, 43, 57, 62, 64, 66, 71, 73, 74, 78, 81, 91, 94, 95, 99, 0, 3, 11, 19, - 26, 27, 34, 46, 47, 49, 64, 68, 73, 74, 81, 90, 94, 95, 97, 7, 21, 33, 44, 46, 54, 55, 61, 62, - 65, 67, 72, 91, 99, 1, 2, 5, 10, 11, 30, 37, 38, 39, 41, 48, 49, 50, 54, 63, 65, 66, 67, 75, - 85, 88, 91, 96, 0, 2, 15, 16, 18, 23, 34, 48, 49, 55, 61, 76, 77, 81, 87, 89, 90, 97, 0, 2, - 5, 14, 16, 17, 23, 24, 25, 33, 38, 39, 62, 74, 75, 8, 9, 12, 13, 15, 17, 33, 35, 40, 49, 62, - 70, 74, 80, 93, 98, 99, 0, 6, 7, 11, 12, 14, 17, 20, 28, 31, 41, 45, 50, 57, 75, 78, 85, 86, - 87, 88, 95, 7, 15, 17, 30, 35, 43, 46, 47, 57, 65, 74, 76, 87, 88, 94, 0, 15, 33, 43, 44, 51, - 55, 64, 73, 78, 82, 90, 96, 98, 1, 9, 15, 31, 33, 35, 43, 53, 65, 68, 69, 83, 88, 91, 8, 13, - 14, 20, 24, 28, 33, 38, 40, 43, 48, 50, 51, 57, 59, 60, 71, 73, 93, 96, 7, 9, 15, 19, 20, 30, - 33, 39, 64, 65, 66, 72, 73, 75, 86, 87, 89, 93}, - {0.8385492, 0.0887047, 0.4178915, 0.4859754, 0.4469863, 0.2195207, 0.3129920, 0.1031984, - 0.2898832, 0.3742032, 0.0522814, 0.3923617, 0.4283062, 0.2236069, 0.1620676, 0.0181036, - 0.0722899, 0.2825163, 0.2854958, 0.3136983, 0.4021524, 0.3556329, 0.4577443, 0.1463357, - 0.3288944, 0.4404407, 0.3466910, 0.2799277, 0.1813836, 0.4619252, 0.1622771, 0.2565850, - 0.3349850, 0.4806673, 0.2912005, 0.2509201, 0.6396587, 0.5977305, 0.1196116, 0.2077467, - 0.0345871, 0.4918659, 0.4194439, 0.4487811, 0.1682306, 0.3017929, 0.1373989, 0.3152796, - 0.3640917, 0.0489285, 0.4335400, 0.0987368, 0.1548646, 0.2137529, 0.0130792, 0.0752723, - 0.1238085, 0.3553386, 0.4349648, 0.3818015, 0.4697597, 0.4478265, 0.2176154, 0.3768051, - 0.3741169, 0.0550861, 0.3733355, 0.0161616, 0.0404749, 0.0530627, 0.3932415, 0.2313439, - 0.4807387, 0.3860448, 0.0887047, 0.1622771, 0.2646495, 0.4319774, 0.0975544, 0.3953015, - 0.4127654, 0.3950751, 0.0630765, 0.3240158, 0.3895027, 0.0263783, 0.3096741, 0.0810854, - 0.2185860, 0.2931856, 0.4413908, 0.4933484, 0.3265684, 0.3630947, 0.3439550, 0.4709083, - 0.4871525, 0.4059546, 0.2835062, 0.2319805, 0.1080630, 0.1148512, 0.4250860, 0.4319774, - 0.3417962, 0.1542346, 0.1705101, 0.3939655, 0.2228894, 0.2561502, 0.1612249, 0.3348420, - 0.7638237, 0.2223779, 0.1142358, 0.2221761, 0.1023570, 0.0100264, 0.4906516, 0.4211857, - 0.4178915, 0.2112697, 0.0841055, 0.3054300, 0.4681202, 0.3307955, 0.2055745, 0.3013350, - 0.0921099, 0.2272112, 0.4771985, 0.0400448, 0.4924752, 0.3142720, 0.3691756, 0.2582222, - 0.2400539, 0.4489491, 0.5111299, 0.4255019, 0.3747997, 0.1873246, 0.2565850, 0.1914687, - 0.3671139, 0.1276162, 0.3537677, 0.4076773, 0.1181683, 0.7192769, 0.2186738, 0.2885858, - 0.4734213, 0.0072575, 0.0765674, 0.0898227, 0.3649966, 0.2496215, 0.1702205, 0.0710704, - 0.3869004, 0.3349850, 0.1886938, 0.3514959, 0.4643647, 0.4223959, 0.3594954, 0.2522124, - 0.4105392, 0.2470788, 0.2545409, 0.3583593, 0.2345200, 0.0271059, 0.3803033, 0.1930780, - 0.4567223, 0.0613140, 0.2441548, 0.4808156, 0.3853460, 0.4859754, 0.4806673, 0.2801995, - 0.3858915, 0.0090301, 0.4087827, 0.3671360, 0.2667392, 0.4641679, 0.4647529, 0.3445000, - 0.1198545, 0.0282007, 0.1829597, 0.0539266, 0.0914677, 0.1638856, 0.1201562, 0.4388565, - 0.2036911, 0.2046127, 0.4811504, 0.3038480, 0.0642898, 0.2031245, 0.1680801, 0.0394903, - 0.4766186, 0.2023225, 0.0175873, 0.3034133, 0.4123132, 0.0379968, 0.2168891, 0.0675915, - 0.4039690, 0.3417962, 0.2112697, 0.2400451, 0.4558193, 0.1334496, 0.0195393, 0.3627390, - 0.4262152, 0.0403542, 0.3081270, 0.1527164, 0.0121030, 0.6241815, 0.4913400, 0.0157230, - 0.3200969, 0.0437878, 0.3018721, 0.0975544, 0.1886938, 0.8753713, 0.0700827, 0.2364397, - 0.4924574, 0.2563165, 0.1126200, 0.1547797, 0.0241622, 0.3814965, 0.3526533, 0.2161066, - 0.2911978, 0.4464823, 0.3577181, 0.3152088, 0.3317510, 0.2863414, 0.2801995, 0.0700827, - 0.3417172, 0.2610632, 0.4037673, 0.1736438, 0.0880198, 0.4559108, 0.1121846, 0.7814473, - 0.3779829, 0.3405251, 0.1208012, 0.4304054, 0.1807327, 0.0049234, 0.1778966, 0.3514959, - 0.2046946, 0.2997384, 0.2013881, 0.0548181, 0.3352703, 0.2054045, 0.3389475, 0.1449403, - 0.3906285, 0.0580903, 0.3582265, 0.1743012, 0.2712877, 0.4273703, 0.4566499, 0.0667344, - 0.0676206, 0.1248124, 0.0026571, 0.2774455, 0.0032627, 0.1753686, 0.3725724, 0.4469863, - 0.3858915, 0.2046946, 0.3794979, 0.4016317, 0.3370037, 0.0815573, 0.4647915, 0.0563985, - 0.4203163, 0.0915991, 0.0276749, 0.3857849, 0.0461729, 0.3978934, 0.3614717, 0.3266448, - 0.7978231, 0.4209127, 0.2912005, 0.3953015, 0.4388565, 0.3417172, 0.2997384, 0.4108247, - 0.2899171, 0.1479114, 0.4418810, 0.0634220, 0.0929668, 0.4055436, 0.2457036, 0.3701515, - 0.4134036, 0.0947451, 0.2785034, 0.3162361, 0.4036728, 0.3741804, 0.4563937, 0.4904932, - 0.1492740, 0.4887115, 0.4127654, 0.1542346, 0.1914687, 0.0090301, 0.4108247, 0.3533593, - 0.4300368, 0.3572507, 0.1412494, 0.4373029, 0.3273854, 0.2602280, 0.1690700, 0.4756982, - 0.0009060, 0.2393224, 0.0014211, 0.4101384, 0.1580024, 0.0231310, 0.5838791, 0.4132268, - 0.2181222, 0.3529412, 0.3698108, 0.2233849, 0.0987368, 0.2610632, 0.2013881, 0.3533593, - 0.2908257, 0.3609885, 0.2026076, 0.2999429, 0.2079948, 0.2704931, 0.2946429, 0.3154255, - 0.0627621, 0.2774129, 0.4206699, 0.0670598, 0.2860273, 0.3919643, 0.2397596, 0.2703603, - 0.4632739, 0.4124186, 0.5805955, 0.1959839, 0.3950751, 0.0841055, 0.3794979, 0.4300368, - 0.4032480, 0.2078872, 0.0094638, 0.2755707, 0.0376010, 0.4909527, 0.3097841, 0.2355419, - 0.0072671, 0.2746342, 0.0053361, 0.1994108, 0.3969467, 0.2509201, 0.3298818, 0.3886021, - 0.0245763, 0.4638373, 0.4052183, 0.4148478, 0.0242814, 0.2414050, 0.2932298, 0.0475468, - 0.4618716, 0.4032480, 0.8676416, 0.4028524, 0.3012557, 0.1360013, 0.1863026, 0.1490197, - 0.0643736, 0.3395792, 0.2925389, 0.3659366, 0.4948683, 0.4953563, 0.1047673, 0.0355901, - 0.0856992, 0.1778870, 0.0851296, 0.3532749, 0.0398270, 0.0630765, 0.3671139, 0.4643647, - 0.2400451, 0.2364397, 0.4431843, 0.1266264, 0.4763364, 0.7873081, 0.2751093, 0.4222012, - 0.1121367, 0.4474346, 0.3652081, 0.1600931, 0.0614609, 0.0204758, 0.1615355, 0.4293712, - 0.3882434, 0.6431416, 0.0548181, 0.2899171, 0.3634890, 0.4412351, 0.1490288, 0.0447601, - 0.4229826, 0.3807294, 0.0672451, 0.2775799, 0.4666647, 0.4085002, 0.1297752, 0.1563804, - 0.1522877, 0.2532282, 0.2805034, 0.1651538, 0.1046609, 0.1760083, 0.2195207, 0.1705101, - 0.1276162, 0.4558193, 0.4924574, 0.3572507, 0.3401189, 0.0565680, 0.4332137, 0.2150277, - 0.4809324, 0.2783410, 0.1570549, 0.4891155, 0.4529251, 0.2209245, 0.3658022, 0.3961954, - 0.3788675, 0.1621254, 0.3969478, 0.3886663, 0.4372073, 0.3537677, 0.4037673, 0.2908257, - 0.4028524, 0.4431843, 0.7202524, 0.3443225, 0.3538920, 0.3133293, 0.4439365, 0.1412494, - 0.3012557, 0.3634890, 0.3401189, 0.1250412, 0.4831129, 0.0737263, 0.3228796, 0.0975274, - 0.1318027, 0.4008097, 0.1548646, 0.2036911, 0.1334496, 0.4016317, 0.1479114, 0.3609885, - 0.1360013, 0.1494316, 0.4203018, 0.2847606, 0.1855530, 0.3948809, 0.1457941, 0.1710113, - 0.4871747, 0.0616420, 0.2720916, 0.1494316, 0.3342525, 0.4981484, 0.2835164, 0.2201109, - 0.3569505, 0.3228796, 0.2664382, 0.1461955, 0.2912845, 0.2178672, 0.0091858, 0.3888402, - 0.3213883, 0.1017065, 0.2137529, 0.2078872, 0.1863026, 0.0565680, 0.2497744, 0.0917027, - 0.3077455, 0.2898162, 0.1962939, 0.0667715, 0.0511321, 0.4857582, 0.0757288, 0.4719980, - 0.0990155, 0.0358659, 0.3427203, 0.4911953, 0.0026993, 0.3121863, 0.3129920, 0.4076773, - 0.4087827, 0.0195393, 0.3352703, 0.1490197, 0.4412351, 0.4203018, 0.3342525, 0.4991112, - 0.3198876, 0.0273423, 0.1726720, 0.2868139, 0.0167729, 0.3167321, 0.3240158, 0.1181683, - 0.4223959, 0.2054045, 0.4418810, 0.2026076, 0.3298818, 0.4332137, 0.4679078, 0.2938424, - 0.2349892, 0.3265936, 0.4161196, 0.0540847, 0.4671349, 0.4922210, 0.4333457, 0.2783662, - 0.3295173, 0.1414430, 0.4789151, 0.5482149, 0.2405941, 0.0873055, 0.4915100, 0.1031984, - 0.6396587, 0.3054300, 0.4373029, 0.2999429, 0.1490288, 0.2150277, 0.4679078, 0.4463057, - 0.3714156, 0.1611302, 0.3379962, 0.4654491, 0.0994459, 0.4963855, 0.0027219, 0.2011968, - 0.2413642, 0.0713272, 0.0186765, 0.5553801, 0.0508773, 0.4655451, 0.3939655, 0.4681202, - 0.2046127, 0.2079948, 0.0447601, 0.2938424, 0.4463057, 0.4189366, 0.4805591, 0.4724835, - 0.4029289, 0.3810731, 0.3855192, 0.2898832, 0.3895027, 0.3307955, 0.3594954, 0.4811504, - 0.1736438, 0.3370037, 0.2704931, 0.0094638, 0.4229826, 0.2349892, 0.1488369, 0.3299349, - 0.3658398, 0.2805756, 0.1943161, 0.1270155, 0.2077195, 0.1249269, 0.0572191, 0.3217881, - 0.1812549, 0.4356323, 0.2024299, 0.4955283, 0.2777625, 0.0642578, 0.4278218, 0.3742032, - 0.2228894, 0.3627390, 0.0880198, 0.1250412, 0.1488369, 0.6981739, 0.2518100, 0.2364128, - 0.4279115, 0.4212285, 0.4749146, 0.2284694, 0.1864383, 0.0079268, 0.2446150, 0.4631400, - 0.2501489, 0.4844082, 0.0522814, 0.5977305, 0.0263783, 0.2522124, 0.2755707, 0.3886021, - 0.2847606, 0.4991112, 0.0239194, 0.4028964, 0.2294849, 0.2998522, 0.1320064, 0.0275548, - 0.1151714, 0.2652366, 0.2787146, 0.2884416, 0.1149032, 0.3923617, 0.3807294, 0.0540387, - 0.2807390, 0.0142855, 0.3054538, 0.0743166, 0.1352609, 0.3096741, 0.2561502, 0.7192769, - 0.4809324, 0.4981484, 0.3299349, 0.2030550, 0.2820974, 0.3606436, 0.1871530, 0.2116934, - 0.1441479, 0.2874195, 0.3848211, 0.3917919, 0.4778197, 0.2946429, 0.4189366, 0.2518100, - 0.2030550, 0.4912895, 0.1356941, 0.2409017, 0.4399648, 0.2600915, 0.1039219, 0.0522639, - 0.1473574, 0.1156571, 0.2768389, 0.4478964, 0.1246019, 0.1488771, 0.3747582, 0.0281233, - 0.0742416, 0.4283062, 0.1612249, 0.4559108, 0.3389475, 0.1266264, 0.0672451, 0.3265936, - 0.2820974, 0.3309392, 0.0915848, 0.0509763, 0.4962989, 0.4802843, 0.0841302, 0.1918956, - 0.3192275, 0.4662680, 0.1974726, 0.0810854, 0.2783410, 0.4912895, 0.3111583, 0.4521906, - 0.2043965, 0.3393941, 0.2771504, 0.4931641, 0.1747926, 0.0280012, 0.3078630, 0.0456258, - 0.1170995, 0.0880413, 0.2797376, 0.2573348, 0.2639170, 0.3364275, 0.2011374, 0.0130792, - 0.1121846, 0.1449403, 0.0245763, 0.2775799, 0.1570549, 0.4161196, 0.0239194, 0.3309392, - 0.3111583, 0.3020653, 0.0100230, 0.4954931, 0.4227756, 0.3662207, 0.4669757, 0.1495063, - 0.4342381, 0.0752723, 0.4105392, 0.4262152, 0.3273854, 0.3154255, 0.1356941, 0.1063635, - 0.3477053, 0.4418667, 0.4065750, 0.2158301, 0.0978730, 0.3474138, 0.0941925, 0.2502904, - 0.4167871, 0.1238085, 0.2055745, 0.3906285, 0.4763364, 0.3606436, 0.2409017, 0.2856070, - 0.4519934, 0.0640926, 0.3494168, 0.2239768, 0.1506959, 0.3404586, 0.0097513, 0.3356108, - 0.2007709, 0.0563368, 0.1196116, 0.0815573, 0.4891155, 0.4399648, 0.1063635, 0.0469109, - 0.4409516, 0.2269343, 0.1728651, 0.4690269, 0.4568825, 0.3838028, 0.1701081, 0.2478454, - 0.3553386, 0.3348420, 0.2563165, 0.0580903, 0.4647915, 0.2602280, 0.0643736, 0.7873081, - 0.4831129, 0.0540847, 0.3714156, 0.4521906, 0.0529002, 0.1118892, 0.3946897, 0.2185860, - 0.3582265, 0.0737263, 0.4671349, 0.1611302, 0.0540387, 0.2600915, 0.2043965, 0.0178831, - 0.3605796, 0.4215185, 0.3441654, 0.3192719, 0.2912215, 0.2253530, 0.4059448, 0.0770738, - 0.2236069, 0.7638237, 0.2186738, 0.1126200, 0.7814473, 0.1743012, 0.1690700, 0.2751093, - 0.4922210, 0.3379962, 0.2364128, 0.3477053, 0.7218004, 0.3724327, 0.2531753, 0.0252278, - 0.2816279, 0.1346799, 0.1643871, 0.3633022, 0.1110411, 0.2297511, 0.4249687, 0.4478221, - 0.2225533, 0.2077467, 0.4349648, 0.3779829, 0.2712877, 0.4638373, 0.4666647, 0.2835164, - 0.4333457, 0.4028734, 0.3229839, 0.3908435, 0.3720633, 0.3528297, 0.4553215, 0.1170026, - 0.4753753, 0.0282417, 0.1620676, 0.2931856, 0.3671360, 0.1547797, 0.4052183, 0.4222012, - 0.4085002, 0.3198876, 0.3393941, 0.4418667, 0.3724327, 0.0297363, 0.4194855, 0.1562718, - 0.1693750, 0.3152241, 0.3387593, 0.2933232, 0.0599440, 0.1064471, 0.2469246, 0.0528503, - 0.0321264, 0.0181036, 0.2223779, 0.2667392, 0.4756982, 0.4148478, 0.1855530, 0.2201109, - 0.3658398, 0.4028964, 0.4194855, 0.1724464, 0.2184300, 0.4806912, 0.3213868, 0.4946703, - 0.0183148, 0.4068079, 0.3882787, 0.1461515, 0.3377662, 0.1434079, 0.1656042, 0.1153671, - 0.0297401, 0.0722899, 0.3818015, 0.0376010, 0.1297752, 0.4529251, 0.2497744, 0.4654491, - 0.4805591, 0.3020653, 0.0469109, 0.2531753, 0.4028734, 0.3104094, 0.0983794, 0.3041750, - 0.7444220, 0.0469955, 0.4269330, 0.3876660, 0.4697597, 0.3013350, 0.2885858, 0.3038480, - 0.1121367, 0.1563804, 0.4279115, 0.2184300, 0.3897764, 0.1165223, 0.1623044, 0.3694641, - 0.4647038, 0.1950430, 0.0223306, 0.4734213, 0.0642898, 0.3405251, 0.0563985, 0.2209245, - 0.3569505, 0.0994459, 0.4806912, 0.3142114, 0.1688596, 0.2013356, 0.3616973, 0.1345261, - 0.3665765, 0.1457076, 0.2400093, 0.4413908, 0.1208012, 0.4203163, 0.4474346, 0.1522877, - 0.4963855, 0.2771504, 0.3932629, 0.2256821, 0.3466487, 0.1397347, 0.4893270, 0.1162840, - 0.4933484, 0.0921099, 0.0072575, 0.0241622, 0.4273703, 0.0009060, 0.3652081, 0.3228796, - 0.0917027, 0.2805756, 0.1871530, 0.4409516, 0.0252278, 0.1562718, 0.3213868, 0.0526326, - 0.2417610, 0.1361428, 0.4773201, 0.2157922, 0.2075818, 0.1745262, 0.2272112, 0.0765674, - 0.4641679, 0.2031245, 0.0403542, 0.3814965, 0.2664382, 0.2294849, 0.3229839, 0.3104094, - 0.3142114, 0.1920804, 0.3407301, 0.3448193, 0.4478265, 0.3265684, 0.1142358, 0.4909527, - 0.4724835, 0.2998522, 0.1039219, 0.0100230, 0.3908435, 0.1693750, 0.1674092, 0.0846982, - 0.3384884, 0.1067837, 0.3844901, 0.1491689, 0.4107678, 0.5988698, 0.2176154, 0.4771985, - 0.1680801, 0.0915991, 0.0634220, 0.2393224, 0.0627621, 0.2532282, 0.3658022, 0.7202524, - 0.3948809, 0.1943161, 0.4931641, 0.0983794, 0.1688596, 0.4067034, 0.2580674, 0.4757213, - 0.3928346, 0.1995547, 0.2107771, 0.3768051, 0.3630947, 0.4647529, 0.3081270, 0.3077455, - 0.0522639, 0.1747926, 0.2013356, 0.3932629, 0.0526326, 0.3694007, 0.0972740, 0.3075456, - 0.2167318, 0.4610244, 0.0345871, 0.3439550, 0.2221761, 0.0400448, 0.0394903, 0.4566499, - 0.0014211, 0.2774129, 0.1600931, 0.2805034, 0.3961954, 0.1461955, 0.0027219, 0.1270155, - 0.0915848, 0.0529002, 0.0703681, 0.0187762, 0.2613653, 0.1867701, 0.1502444, 0.3600508, - 0.4655130, 0.3398629, 0.4028377, 0.1709328, 0.2641133, 0.2825163, 0.1023570, 0.2470788, - 0.4304054, 0.3395792, 0.2783662, 0.3152241, 0.4067034, 0.9997413, 0.3054797, 0.4133712, - 0.0630975, 0.0166616, 0.3381947, 0.2909326, 0.2139573, 0.0475201, 0.2854958, 0.3741169, - 0.0667344, 0.0929668, 0.4101384, 0.3097841, 0.2011968, 0.2807390, 0.2856070, 0.4946703, - 0.3897764, 0.1920804, 0.0187762, 0.3054797, 0.0461345, 0.2358043, 0.4405020, 0.2239718, - 0.0232168, 0.2595815, 0.1997993, 0.3136983, 0.0550861, 0.4924752, 0.0242814, 0.2898162, - 0.0273423, 0.0280012, 0.3387593, 0.4133712, 0.1691249, 0.4277944, 0.3262424, 0.2545409, - 0.3445000, 0.4766186, 0.1527164, 0.2355419, 0.1457941, 0.1962939, 0.4212285, 0.4065750, - 0.1674092, 0.0040041, 0.3576335, 0.6885277, 0.0684911, 0.0949263, 0.3370988, 0.4251885, - 0.4918659, 0.3733355, 0.3583593, 0.2023225, 0.1580024, 0.4206699, 0.2414050, 0.0614609, - 0.4749146, 0.2816279, 0.0183148, 0.1165223, 0.3407301, 0.0630975, 0.3476292, 0.2974767, - 0.0964920, 0.2228194, 0.2653476, 0.0658719, 0.3992334, 0.4709083, 0.1198545, 0.0204758, - 0.3788675, 0.3228796, 0.3295173, 0.2413642, 0.2284694, 0.0178831, 0.4068079, 0.1623044, - 0.0846982, 0.0461345, 0.1464626, 0.1254936, 0.4546162, 0.0599609, 0.2089537, 0.0068666, - 0.0161616, 0.4871525, 0.3142720, 0.2925389, 0.2912845, 0.0667715, 0.2116934, 0.3078630, - 0.4519934, 0.3616973, 0.2256821, 0.3476292, 0.1306226, 0.2562920, 0.1834991, 0.1524191, - 0.4803574, 0.0404749, 0.3691756, 0.0898227, 0.0282007, 0.0121030, 0.4055436, 0.0670598, - 0.1615355, 0.1710113, 0.0511321, 0.1414430, 0.1864383, 0.0640926, 0.1346799, 0.3882787, - 0.3694007, 0.0812578, 0.3378220, 0.2461788, 0.3674253, 0.4063063, 0.4194439, 0.3649966, - 0.2457036, 0.0072671, 0.2178672, 0.1473574, 0.0509763, 0.0456258, 0.2158301, 0.3041750, - 0.3694641, 0.1306226, 0.0812578, 0.4179677, 0.0273935, 0.1376181, 0.1237823, 0.0175873, - 0.0231310, 0.2860273, 0.4789151, 0.4029289, 0.1320064, 0.4954931, 0.1643871, 0.7444220, - 0.2580674, 0.0972740, 0.2613653, 0.3378220, 0.0734471, 0.5716440, 0.3270837, 0.4374486, - 0.3034133, 0.6241815, 0.0091858, 0.1441479, 0.1170995, 0.2269343, 0.3605796, 0.3633022, - 0.1461515, 0.2417610, 0.4179677, 0.1296077, 0.4877253, 0.1591760, 0.4487811, 0.4059546, - 0.0100264, 0.2582222, 0.1829597, 0.0676206, 0.0276749, 0.5838791, 0.3659366, 0.4857582, - 0.0713272, 0.0275548, 0.1156571, 0.4215185, 0.3720633, 0.4647038, 0.1361428, 0.4757213, - 0.0166616, 0.2358043, 0.0040041, 0.0734471, 0.1602434, 0.0591811, 0.1030985, 0.1983638, - 0.4710790, 0.4003320, 0.1682306, 0.2496215, 0.1248124, 0.3701515, 0.1621254, 0.3443225, - 0.4871747, 0.1726720, 0.2077195, 0.0079268, 0.4962989, 0.1110411, 0.2440522, 0.4165031, - 0.0252984, 0.3045145, 0.4441046, 0.4572209, 0.2415059, 0.4238202, 0.0530627, 0.3857849, - 0.4134036, 0.3919643, 0.4948683, 0.0142855, 0.2768389, 0.1728651, 0.3466487, 0.3448193, - 0.3384884, 0.3576335, 0.1296077, 0.1268078, 0.2563025, 0.1895228, 0.3345918, 0.4166048, - 0.4054141, 0.2596988, 0.4439297, 0.4482521, 0.4021524, 0.2345200, 0.3526533, 0.0461729, - 0.0947451, 0.4132268, 0.2397596, 0.4953563, 0.1651538, 0.2868139, 0.1151714, 0.4802843, - 0.4690269, 0.1118892, 0.2297511, 0.3528297, 0.0649494, 0.1603665, 0.3632484, 0.4808010, - 0.3155171, 0.0421940, 0.3556329, 0.3017929, 0.2835062, 0.2400539, 0.2746342, 0.1047673, - 0.0757288, 0.3054538, 0.0880413, 0.0978730, 0.4568825, 0.3441654, 0.1345261, 0.3381947, - 0.2440522, 0.1453612, 0.0627209, 0.4289585, 0.3434332, 0.1462075, 0.4489491, 0.0539266, - 0.0026571, 0.3888402, 0.4719980, 0.3474138, 0.3838028, 0.2933232, 0.3665765, 0.1867701, - 0.0273935, 0.5716440, 0.1602434, 0.4165031, 0.3889723, 0.1373989, 0.0271059, 0.4913400, - 0.2161066, 0.2785034, 0.4293712, 0.0975274, 0.0616420, 0.0990155, 0.4227756, 0.3377662, - 0.0591811, 0.0649494, 0.4863133, 0.3123243, 0.3094676, 0.4548634, 0.3543404, 0.3803033, - 0.2911978, 0.5482149, 0.0186765, 0.3810731, 0.1249269, 0.4478964, 0.0941925, 0.4553215, - 0.1950430, 0.1464626, 0.2461788, 0.2376485, 0.4577443, 0.3152796, 0.4464823, 0.3162361, - 0.0355901, 0.3969478, 0.2797376, 0.1502444, 0.1376181, 0.1268078, 0.1453612, 0.8429500, - 0.2124143, 0.2319805, 0.1930780, 0.4123132, 0.2932298, 0.3213883, 0.2446150, 0.2874195, - 0.1246019, 0.2573348, 0.2502904, 0.3494168, 0.3192719, 0.1457076, 0.1397347, 0.3928346, - 0.3075456, 0.1254936, 0.2563025, 0.4863133, 0.2630258, 0.1192136, 0.1283403, 0.3361003, - 0.3254332, 0.5111299, 0.4567223, 0.3978934, 0.4631400, 0.2652366, 0.0841302, 0.2239768, - 0.1434079, 0.3600508, 0.6885277, 0.2562920, 0.1030985, 0.0627209, 0.3123243, 0.2376485, - 0.6660228, 0.2737032, 0.0725528, 0.4906516, 0.1702205, 0.0157230, 0.3577181, 0.2774455, - 0.2181222, 0.0358659, 0.0572191, 0.0743166, 0.3662207, 0.4167871, 0.0599440, 0.0469955, - 0.4773201, 0.1995547, 0.2167318, 0.4655130, 0.2909326, 0.4405020, 0.2974767, 0.0252984, - 0.6660228, 0.4688708, 0.4444213, 0.2486204, 0.1080630, 0.3200969, 0.0032627, 0.3529412, - 0.3882434, 0.3538920, 0.3427203, 0.1918956, 0.2639170, 0.2912215, 0.4249687, 0.0223306, - 0.3398629, 0.1834991, 0.4289585, 0.1192136, 0.2737032, 0.4688708, 0.1463357, 0.3640917, - 0.2703603, 0.0053361, 0.0856992, 0.3855192, 0.3848211, 0.4669757, 0.2107771, 0.4028377, - 0.4546162, 0.1895228, 0.1603665, 0.1891034, 0.1633865, 0.3932415, 0.4255019, 0.1807327, - 0.1994108, 0.1046609, 0.1318027, 0.0167729, 0.1352609, 0.1506959, 0.1067837, 0.1709328, - 0.4277944, 0.3270837, 0.1983638, 0.3345918, 0.4444213, 0.4795561, 0.3394504, 0.1148512, - 0.4211857, 0.0710704, 0.0914677, 0.0379968, 0.0437878, 0.3614717, 0.1778870, 0.1760083, - 0.4911953, 0.3167321, 0.5553801, 0.3217881, 0.3917919, 0.1488771, 0.3404586, 0.3844901, - 0.2239718, 0.0684911, 0.0599609, 0.4877253, 0.3045145, 0.4166048, 0.3094676, 0.1283403, - 0.4126990, 0.0727838, 0.3816538, 0.3677183, 0.3288944, 0.4250860, 0.3152088, 0.0475468, - 0.2720916, 0.1017065, 0.2501489, 0.2253530, 0.4478221, 0.1064471, 0.0949263, 0.3674253, - 0.4441046, 0.4054141, 0.3361003, 0.3239112, 0.1663671, 0.0782135, 0.4374697, 0.0613140, - 0.6431416, 0.1812549, 0.1701081, 0.4059448, 0.4893270, 0.2157922, 0.2139573, 0.0232168, - 0.0964920, 0.1524191, 0.4710790, 0.4609937, 0.1566380, 0.0489285, 0.2313439, 0.3747997, - 0.3018721, 0.3317510, 0.2405941, 0.4778197, 0.3747582, 0.3192275, 0.1495063, 0.1170026, - 0.2469246, 0.1656042, 0.1162840, 0.3262424, 0.2228194, 0.2089537, 0.4803574, 0.3632484, - 0.1891034, 0.3239112, 0.1381195, 0.0077237, 0.4404407, 0.4807387, 0.4036728, 0.3698108, - 0.3969467, 0.3886663, 0.4844082, 0.4753753, 0.0528503, 0.2075818, 0.0475201, 0.3434332, - 0.3889723, 0.3254332, 0.4126990, 0.4609937, 0.1381195, 0.0022522, 0.3466910, 0.3860448, - 0.1873246, 0.3266448, 0.2233849, 0.4632739, 0.4372073, 0.3133293, 0.4008097, 0.4356323, - 0.0281233, 0.4662680, 0.2595815, 0.2596988, 0.4808010, 0.1638856, 0.2168891, 0.0049234, - 0.1753686, 0.3741804, 0.4124186, 0.2024299, 0.2787146, 0.3364275, 0.0321264, 0.1997993, - 0.4374486, 0.4439297, 0.2124143, 0.2074694, 0.1906150, 0.1204390, 0.2799277, 0.3869004, - 0.2441548, 0.2863414, 0.1778966, 0.7978231, 0.5805955, 0.0851296, 0.0026993, 0.0508773, - 0.4342381, 0.3946897, 0.1153671, 0.1491689, 0.3155171, 0.4548634, 0.1633865, 0.4795561, - 0.0727838, 0.1663671, 0.1552885, 0.4808156, 0.4563937, 0.1959839, 0.0873055, 0.2884416, - 0.0097513, 0.0770738, 0.2225533, 0.4107678, 0.2653476, 0.4482521, 0.1462075, 0.3816538, - 0.0782135, 0.1552885, 0.1813836, 0.4904932, 0.4955283, 0.3356108, 0.2478454, 0.4269330, - 0.1745262, 0.3370988, 0.4572209, 0.3543404, 0.0725528, 0.0077237, 0.3415696, 0.1628898, - 0.4335400, 0.0675915, 0.1492740, 0.4655451, 0.2777625, 0.1149032, 0.2007709, 0.2400093, - 0.0658719, 0.4063063, 0.1237823, 0.2486204, 0.4374697, 0.0022522, 0.1201562, 0.3725724, - 0.4209127, 0.3532749, 0.4439365, 0.3121863, 0.0642578, 0.0742416, 0.2011374, 0.0563368, - 0.0282417, 0.0297401, 0.3876660, 0.5988698, 0.4610244, 0.2641133, 0.1591760, 0.2415059, - 0.1906150, 0.1628898, 0.3853460, 0.4039690, 0.4887115, 0.4618716, 0.0398270, 0.4915100, - 0.4278218, 0.1974726, 0.4251885, 0.3992334, 0.0068666, 0.4003320, 0.4238202, 0.0421940, - 0.3394504, 0.3677183, 0.1566380, 0.1204390}, + rows, + cols, + vals, + {-2.48497686, -2.31603463}}}; + +const std::vector> inputsf_SM = { + {2, + 20, + 100000, + 0, + 0, + 1e-15, + raft::sparse::solver::LANCZOS_WHICH::SM, + 42, + rows, + cols, + vals, + {-0.03865971, -0.00056997}}}; + +const std::vector> inputsf_LM = { + {2, + 20, + 100000, + 0, + 0, + 1e-15, + raft::sparse::solver::LANCZOS_WHICH::LM, + 42, + rows, + cols, + vals, + {-2.48497686, 5.47778263}}}; + +const std::vector> inputsf_LA = { + {2, + 20, + 100000, + 0, + 0, + 1e-15, + raft::sparse::solver::LANCZOS_WHICH::LA, + 42, + rows, + cols, + vals, + {2.40271478, 5.47778263}}}; + +const std::vector> inputsf_SA = { + {2, + 20, + 100000, + 0, + 0, + 1e-15, + raft::sparse::solver::LANCZOS_WHICH::SA, + 42, + rows, + cols, + vals, {-2.48497686, -2.31603463}}}; const std::vector> rmat_inputsf = { @@ -1814,6 +899,18 @@ TEST_P(LanczosTestD_LM, Result) { Run(); } using LanczosTestD_SA = lanczos_tests; TEST_P(LanczosTestD_SA, Result) { Run(); } +using LanczosTestF_SM = lanczos_tests; +TEST_P(LanczosTestF_SM, Result) { Run(); } + +using LanczosTestF_LA = lanczos_tests; +TEST_P(LanczosTestF_LA, Result) { Run(); } + +using LanczosTestF_LM = lanczos_tests; +TEST_P(LanczosTestF_LM, Result) { Run(); } + +using LanczosTestF_SA = lanczos_tests; +TEST_P(LanczosTestF_SA, Result) { Run(); } + using RmatLanczosTestF = rmat_lanczos_tests; TEST_P(RmatLanczosTestF, Result) { Run(); } @@ -1826,4 +923,9 @@ INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestD_LA, ::testing::ValuesIn(input INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestD_LM, ::testing::ValuesIn(inputsd_LM)); INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestD_SA, ::testing::ValuesIn(inputsd_SA)); +INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestF_SM, ::testing::ValuesIn(inputsf_SM)); +INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestF_LA, ::testing::ValuesIn(inputsf_LA)); +INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestF_LM, ::testing::ValuesIn(inputsf_LM)); +INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestF_SA, ::testing::ValuesIn(inputsf_SA)); + } // namespace raft::sparse From 2df2819bdde3da9ed124ee9fd9200745382702c0 Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 14 May 2025 07:04:53 +0000 Subject: [PATCH 20/35] rename namespace --- cpp/tests/sparse/solver/lanczos.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/tests/sparse/solver/lanczos.cu b/cpp/tests/sparse/solver/lanczos.cu index d53ce5b347..ea8b05b00a 100644 --- a/cpp/tests/sparse/solver/lanczos.cu +++ b/cpp/tests/sparse/solver/lanczos.cu @@ -48,7 +48,7 @@ #include #include -namespace raft::sparse { +namespace raft::sparse::solver { template struct lanczos_inputs { @@ -928,4 +928,4 @@ INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestF_LA, ::testing::ValuesIn(input INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestF_LM, ::testing::ValuesIn(inputsf_LM)); INSTANTIATE_TEST_CASE_P(LanczosTests, LanczosTestF_SA, ::testing::ValuesIn(inputsf_SA)); -} // namespace raft::sparse +} // namespace raft::sparse::solver From 6c5d370089077dfe429cc7a9ef477bc9d9da6749 Mon Sep 17 00:00:00 2001 From: aamijar Date: Thu, 15 May 2025 08:42:57 +0000 Subject: [PATCH 21/35] test ci --- cpp/tests/sparse/solver/lanczos.cu | 227 +++++++++++++++++++++++++++-- 1 file changed, 217 insertions(+), 10 deletions(-) diff --git a/cpp/tests/sparse/solver/lanczos.cu b/cpp/tests/sparse/solver/lanczos.cu index ea8b05b00a..ac0b0eac8e 100644 --- a/cpp/tests/sparse/solver/lanczos.cu +++ b/cpp/tests/sparse/solver/lanczos.cu @@ -645,6 +645,213 @@ std::vector vals = { 0.4278218, 0.1974726, 0.4251885, 0.3992334, 0.0068666, 0.4003320, 0.4238202, 0.0421940, 0.3394504, 0.3677183, 0.1566380, 0.1204390}; +template +std::vector rows1 = { + 0, 19, 33, 44, 63, 75, 89, 101, 115, 122, 134, 146, 156, 169, 182, 192, 205, + 216, 231, 237, 244, 256, 269, 280, 291, 296, 303, 315, 325, 336, 349, 368, 382, 390, + 405, 418, 429, 432, 442, 455, 466, 481, 491, 505, 517, 523, 534, 546, 562, 570, 590, + 603, 614, 626, 638, 648, 662, 670, 678, 689, 701, 714, 723, 736, 745, 756, 769, 782, + 791, 805, 812, 826, 835, 851, 863, 876, 889, 901, 911, 922, 931, 940, 957, 967, 981, + 991, 999, 1006, 1019, 1034, 1042, 1058, 1068, 1077, 1088, 1103, 1112, 1121, 1129, 1140, 1152}; + +template +std::vector cols1 = { + {0, 3, 5, 14, 29, 31, 33, 34, 35, 39, 51, 61, 76, 80, 85, 88, 91, 92, 96, 1, 6, 7, 8, 19, + 35, 44, 65, 72, 76, 78, 80, 90, 97, 28, 42, 43, 51, 52, 59, 63, 68, 90, 91, 92, 0, 3, 4, 11, + 21, 30, 33, 40, 46, 49, 54, 57, 59, 60, 66, 67, 72, 84, 88, 3, 16, 23, 32, 34, 39, 45, 50, 60, + 72, 83, 87, 0, 10, 18, 32, 33, 43, 52, 55, 60, 68, 72, 76, 82, 90, 1, 16, 21, 23, 24, 29, 30, + 47, 52, 68, 73, 87, 1, 11, 13, 30, 33, 35, 64, 65, 75, 78, 79, 94, 95, 99, 1, 12, 14, 29, 49, + 56, 59, 15, 26, 52, 53, 58, 64, 70, 71, 81, 87, 93, 99, 5, 26, 29, 34, 42, 56, 59, 68, 71, 83, + 84, 90, 3, 7, 12, 21, 23, 45, 47, 79, 88, 94, 8, 11, 15, 24, 33, 34, 39, 41, 47, 48, 53, 61, + 94, 7, 15, 22, 29, 45, 46, 47, 48, 55, 62, 73, 83, 84, 0, 8, 45, 54, 72, 74, 82, 92, 94, 98, + 9, 12, 13, 22, 26, 30, 58, 62, 75, 78, 80, 93, 97, 4, 6, 17, 23, 31, 42, 45, 50, 70, 72, 91, + 16, 30, 31, 33, 38, 42, 58, 60, 65, 74, 75, 85, 93, 94, 95, 5, 20, 62, 64, 69, 76, 1, 48, 49, + 50, 63, 88, 99, 18, 20, 25, 29, 45, 67, 74, 75, 80, 87, 94, 99, 3, 6, 11, 24, 43, 45, 47, 49, + 54, 65, 66, 78, 89, 13, 15, 25, 29, 31, 32, 33, 48, 49, 54, 58, 4, 6, 11, 16, 37, 40, 44, 51, + 53, 60, 91, 6, 12, 21, 58, 98, 20, 22, 45, 46, 78, 86, 92, 9, 10, 15, 27, 29, 35, 50, 64, 68, + 73, 78, 88, 26, 29, 37, 48, 50, 53, 55, 67, 81, 88, 2, 55, 63, 64, 72, 76, 77, 83, 84, 94, 98, + 0, 6, 8, 10, 13, 20, 22, 26, 27, 49, 63, 75, 86, 3, 6, 7, 15, 17, 32, 33, 39, 41, 46, 48, + 61, 66, 68, 70, 79, 90, 95, 99, 0, 16, 17, 22, 32, 45, 46, 47, 54, 60, 62, 72, 87, 97, 4, 5, + 22, 30, 31, 38, 70, 79, 0, 3, 5, 7, 12, 17, 22, 30, 37, 50, 60, 89, 93, 97, 99, 0, 4, 10, + 12, 34, 38, 52, 65, 68, 73, 81, 82, 88, 0, 1, 7, 26, 41, 56, 70, 72, 93, 95, 97, 62, 74, 83, + 23, 27, 33, 38, 43, 55, 71, 85, 87, 90, 17, 32, 34, 37, 40, 57, 59, 72, 74, 79, 90, 92, 98, 0, + 4, 12, 30, 41, 60, 73, 75, 90, 92, 99, 3, 23, 38, 41, 46, 49, 54, 58, 59, 63, 71, 76, 80, 81, + 84, 12, 30, 35, 39, 40, 57, 78, 85, 90, 94, 2, 10, 16, 17, 44, 47, 49, 64, 69, 76, 77, 79, 81, + 83, 2, 5, 21, 37, 67, 68, 81, 82, 86, 87, 96, 98, 1, 23, 42, 71, 89, 96, 4, 11, 13, 14, 16, + 20, 21, 25, 31, 75, 94, 3, 13, 25, 30, 31, 40, 66, 71, 81, 84, 88, 95, 6, 11, 12, 13, 21, 31, + 42, 47, 49, 51, 55, 68, 73, 75, 84, 88, 12, 13, 19, 22, 27, 30, 51, 75, 3, 8, 19, 21, 22, 29, + 40, 42, 47, 49, 55, 57, 61, 63, 77, 83, 88, 90, 91, 93, 4, 16, 19, 26, 27, 33, 50, 52, 53, 65, + 66, 78, 82, 0, 2, 23, 47, 48, 56, 69, 70, 83, 96, 98, 2, 5, 6, 9, 34, 50, 62, 65, 66, 69, + 72, 79, 9, 12, 23, 27, 50, 56, 58, 59, 67, 77, 81, 97, 3, 14, 21, 22, 31, 40, 59, 67, 81, 90, + 5, 13, 27, 28, 37, 47, 49, 59, 71, 72, 83, 89, 91, 96, 8, 10, 35, 51, 53, 62, 65, 74, 3, 38, + 41, 49, 66, 74, 94, 95, 9, 15, 17, 22, 24, 40, 53, 61, 70, 81, 85, 2, 3, 8, 10, 38, 40, 53, + 54, 55, 70, 81, 98, 3, 4, 5, 17, 23, 31, 33, 39, 60, 70, 77, 82, 98, 0, 12, 30, 49, 58, 62, + 63, 76, 83, 13, 15, 18, 31, 36, 52, 56, 61, 66, 83, 89, 92, 93, 2, 19, 28, 29, 40, 49, 61, 63, + 86, 7, 9, 18, 26, 28, 42, 72, 74, 82, 88, 96, 1, 7, 17, 21, 34, 50, 52, 56, 67, 89, 90, 95, + 99, 3, 21, 30, 46, 50, 52, 57, 62, 79, 81, 87, 90, 99, 3, 20, 27, 43, 53, 54, 65, 89, 90, 2, + 5, 6, 10, 26, 30, 34, 43, 47, 69, 70, 79, 88, 97, 18, 42, 51, 52, 68, 71, 77, 9, 16, 30, 32, + 35, 51, 58, 59, 60, 68, 72, 77, 86, 93, 9, 10, 37, 40, 44, 46, 55, 69, 98, 1, 3, 4, 5, 14, + 16, 28, 31, 35, 38, 52, 55, 64, 70, 77, 99, 6, 13, 26, 34, 39, 47, 76, 77, 83, 88, 96, 99, 14, + 17, 20, 36, 38, 56, 57, 64, 80, 81, 85, 87, 92, 7, 15, 17, 20, 29, 39, 45, 47, 48, 85, 90, 92, + 94, 0, 1, 5, 18, 28, 40, 42, 61, 73, 80, 84, 95, 28, 42, 49, 53, 60, 69, 70, 72, 73, 91, 1, + 7, 15, 21, 25, 26, 41, 50, 81, 82, 87, 7, 11, 30, 32, 38, 42, 52, 66, 68, 0, 1, 15, 20, 40, + 74, 76, 80, 93, 9, 27, 34, 40, 42, 43, 46, 53, 54, 58, 59, 66, 74, 78, 81, 84, 87, 5, 14, 34, + 43, 50, 60, 64, 78, 83, 84, 4, 10, 13, 28, 36, 42, 49, 51, 55, 61, 62, 73, 82, 97, 3, 10, 13, + 28, 40, 46, 47, 76, 81, 82, 0, 17, 37, 41, 58, 74, 75, 94, 25, 29, 43, 63, 70, 94, 99, 4, 6, + 9, 20, 31, 37, 43, 66, 74, 78, 81, 91, 94, 0, 3, 11, 19, 26, 27, 34, 46, 47, 49, 64, 68, 73, + 94, 95, 21, 33, 44, 55, 62, 65, 67, 91, 1, 2, 5, 10, 30, 37, 38, 39, 41, 49, 54, 65, 66, 67, + 75, 91, 0, 2, 16, 23, 49, 55, 77, 87, 89, 90, 0, 2, 14, 25, 38, 39, 62, 74, 75, 9, 15, 17, + 33, 35, 49, 62, 70, 80, 93, 98, 7, 11, 12, 14, 17, 20, 28, 41, 45, 57, 75, 85, 86, 87, 88, 7, + 17, 30, 35, 46, 57, 65, 76, 88, 0, 43, 44, 51, 55, 64, 73, 96, 98, 1, 15, 31, 33, 35, 53, 68, + 83, 14, 24, 28, 38, 43, 51, 59, 60, 71, 93, 96, 7, 9, 19, 20, 30, 33, 39, 65, 66, 72, 73, 86}}; + +template +std::vector vals1 = { + 0.8385492, 0.0887047, 0.4178915, 0.4469863, 0.3129920, 0.1031984, 0.2898832, 0.3742032, + 0.0522814, 0.4283062, 0.0722899, 0.2825163, 0.3556329, 0.4577443, 0.1463357, 0.3288944, + 0.4404407, 0.3466910, 0.1813836, 0.4619252, 0.2565850, 0.3349850, 0.4806673, 0.2509201, + 0.5977305, 0.1196116, 0.4918659, 0.4487811, 0.3017929, 0.1373989, 0.3152796, 0.0489285, + 0.4335400, 0.2137529, 0.0752723, 0.1238085, 0.3818015, 0.2676854, 0.3768051, 0.0550861, + 0.0404749, 0.2313439, 0.4663205, 0.3860448, 0.0887047, 0.2646495, 0.4319774, 0.0975544, + 0.0630765, 0.3240158, 0.3895027, 0.0810854, 0.2185860, 0.1749017, 0.4413908, 0.3265684, + 0.3630947, 0.3439550, 0.4709083, 0.4871525, 0.4059546, 0.1080630, 0.4250860, 0.4319774, + 0.1542346, 0.1705101, 0.3939655, 0.2228894, 0.1612249, 0.3348420, 0.2223779, 0.2221761, + 0.0100264, 0.4906516, 0.4211857, 0.4178915, 0.2112697, 0.0841055, 0.4681202, 0.3307955, + 0.2055745, 0.3013350, 0.0921099, 0.0400448, 0.3691756, 0.2582222, 0.2400539, 0.5111299, + 0.3747997, 0.2565850, 0.1914687, 0.3671139, 0.1276162, 0.3537677, 0.4076773, 0.1181683, + 0.2186738, 0.2885858, 0.0898227, 0.2496215, 0.0710704, 0.3349850, 0.1886938, 0.3514959, + 0.4223959, 0.3594954, 0.2522124, 0.2545409, 0.3583593, 0.2345200, 0.0271059, 0.3803033, + 0.2441548, 0.4808156, 0.3853460, 0.4806673, 0.2801995, 0.3858915, 0.4087827, 0.3671360, + 0.4641679, 0.4647529, 0.4388565, 0.2036911, 0.3038480, 0.0642898, 0.1680801, 0.4766186, + 0.0175873, 0.3034133, 0.4123132, 0.0379968, 0.2168891, 0.4039690, 0.2112697, 0.1334496, + 0.0195393, 0.3627390, 0.4262152, 0.0403542, 0.3081270, 0.0121030, 0.4202002, 0.0157230, + 0.3200969, 0.3018721, 0.0975544, 0.1886938, 0.0700827, 0.2364397, 0.4924574, 0.1961911, + 0.1126200, 0.2911978, 0.3152088, 0.2863414, 0.2801995, 0.0700827, 0.3417172, 0.3470362, + 0.1736438, 0.0880198, 0.4559108, 0.1121846, 0.4507234, 0.3779829, 0.3405251, 0.4304054, + 0.1778966, 0.3514959, 0.2997384, 0.0548181, 0.3352703, 0.0580903, 0.3582265, 0.1743012, + 0.2712877, 0.4273703, 0.0667344, 0.1248124, 0.2219280, 0.0032627, 0.4469863, 0.3858915, + 0.4647915, 0.4203163, 0.0276749, 0.3857849, 0.3978934, 0.3266448, 0.7978231, 0.4209127, + 0.4388565, 0.3417172, 0.2997384, 0.2899171, 0.1479114, 0.4418810, 0.0634220, 0.0929668, + 0.0947451, 0.2785034, 0.3162361, 0.3741804, 0.1492740, 0.1542346, 0.1914687, 0.3533593, + 0.3017906, 0.4373029, 0.3273854, 0.2602280, 0.4756982, 0.0231310, 0.1348172, 0.3698108, + 0.3533593, 0.2026076, 0.2999429, 0.2704931, 0.2946429, 0.3154255, 0.0627621, 0.2774129, + 0.4206699, 0.3919643, 0.2397596, 0.2703603, 0.4124186, 0.5805955, 0.1959839, 0.0841055, + 0.4032480, 0.3097841, 0.2355419, 0.0072671, 0.2746342, 0.2509201, 0.4638373, 0.4052183, + 0.4148478, 0.0242814, 0.0475468, 0.4618716, 0.4032480, 0.8676416, 0.3012557, 0.1490197, + 0.0643736, 0.2925389, 0.4948683, 0.4953563, 0.0355901, 0.1778870, 0.0851296, 0.0398270, + 0.0630765, 0.3671139, 0.2364397, 0.4431843, 0.4763364, 0.4127292, 0.2751093, 0.4222012, + 0.4474346, 0.0614609, 0.0204758, 0.4293712, 0.6431416, 0.0548181, 0.2899171, 0.3634890, + 0.4412351, 0.1490288, 0.0447601, 0.4229826, 0.4666647, 0.4085002, 0.1522877, 0.2532282, + 0.1705101, 0.1276162, 0.4924574, 0.3017906, 0.4809324, 0.2783410, 0.4891155, 0.4529251, + 0.2209245, 0.3961954, 0.3886663, 0.3537677, 0.3470362, 0.4431843, 0.3647585, 0.4439365, + 0.3012557, 0.3634890, 0.4831129, 0.0737263, 0.0975274, 0.1318027, 0.4008097, 0.2036911, + 0.1334496, 0.1479114, 0.1494316, 0.4203018, 0.2847606, 0.1855530, 0.1457941, 0.1710113, + 0.4871747, 0.0616420, 0.2720916, 0.1494316, 0.3342525, 0.4981484, 0.2835164, 0.2201109, + 0.3569505, 0.3228796, 0.2912845, 0.3213883, 0.1017065, 0.2137529, 0.0917027, 0.2898162, + 0.1962939, 0.4857582, 0.0757288, 0.4719980, 0.0358659, 0.3427203, 0.0026993, 0.3121863, + 0.3129920, 0.4076773, 0.4087827, 0.0195393, 0.3352703, 0.1490197, 0.4412351, 0.4203018, + 0.3342525, 0.3198876, 0.0273423, 0.2868139, 0.0167729, 0.3240158, 0.1181683, 0.4223959, + 0.4418810, 0.2026076, 0.2938424, 0.2349892, 0.3265936, 0.4161196, 0.4671349, 0.4333457, + 0.2783662, 0.3295173, 0.1414430, 0.4789151, 0.5482149, 0.2405941, 0.0873055, 0.4915100, + 0.1031984, 0.4373029, 0.2999429, 0.1490288, 0.4463057, 0.3714156, 0.1611302, 0.3379962, + 0.4963855, 0.0027219, 0.2011968, 0.0713272, 0.4434711, 0.4655451, 0.3939655, 0.4681202, + 0.0447601, 0.2938424, 0.4463057, 0.4189366, 0.4029289, 0.2293249, 0.2898832, 0.3895027, + 0.3307955, 0.3594954, 0.1736438, 0.2704931, 0.4229826, 0.2349892, 0.3299349, 0.3658398, + 0.1270155, 0.1812549, 0.2024299, 0.2777625, 0.4278218, 0.3742032, 0.2228894, 0.3627390, + 0.0880198, 0.6981739, 0.2518100, 0.4279115, 0.4749146, 0.1864383, 0.0079268, 0.2446150, + 0.4631400, 0.2501489, 0.0522814, 0.5977305, 0.2522124, 0.2847606, 0.0239194, 0.2294849, + 0.1320064, 0.0275548, 0.2787146, 0.2884416, 0.1149032, 0.2807390, 0.0142855, 0.0743166, + 0.4809324, 0.4981484, 0.3299349, 0.2030550, 0.3606436, 0.1871530, 0.1441479, 0.3848211, + 0.3917919, 0.4778197, 0.2946429, 0.4189366, 0.2518100, 0.2030550, 0.4912895, 0.1039219, + 0.0522639, 0.1156571, 0.2768389, 0.4478964, 0.3747582, 0.0281233, 0.0742416, 0.4283062, + 0.1612249, 0.4559108, 0.3265936, 0.3309392, 0.0915848, 0.4962989, 0.4802843, 0.3192275, + 0.4662680, 0.1974726, 0.0810854, 0.2783410, 0.4912895, 0.3111583, 0.2043965, 0.3393941, + 0.2771504, 0.4931641, 0.1747926, 0.0280012, 0.1170995, 0.0880413, 0.2797376, 0.2573348, + 0.2639170, 0.1121846, 0.4161196, 0.0239194, 0.3309392, 0.3111583, 0.0100230, 0.4227756, + 0.4669757, 0.1495063, 0.4342381, 0.0752723, 0.4262152, 0.3273854, 0.3154255, 0.1063635, + 0.3477053, 0.4418667, 0.4065750, 0.2158301, 0.0978730, 0.3474138, 0.0941925, 0.2502904, + 0.4167871, 0.1238085, 0.2055745, 0.4763364, 0.3606436, 0.4519934, 0.0640926, 0.3494168, + 0.2239768, 0.1506959, 0.3404586, 0.3356108, 0.0563368, 0.1196116, 0.4891155, 0.1063635, + 0.2269343, 0.1701081, 0.2478454, 0.3348420, 0.1961911, 0.0580903, 0.4647915, 0.2602280, + 0.0643736, 0.4127292, 0.4831129, 0.3714156, 0.1118892, 0.3946897, 0.2185860, 0.3582265, + 0.0737263, 0.4671349, 0.1611302, 0.2043965, 0.0178831, 0.3605796, 0.3192719, 0.2912215, + 0.2253530, 0.0770738, 0.2186738, 0.1126200, 0.4507234, 0.1743012, 0.2751093, 0.3379962, + 0.3477053, 0.7218004, 0.3724327, 0.2531753, 0.0252278, 0.1346799, 0.1110411, 0.2297511, + 0.4249687, 0.4478221, 0.3779829, 0.2712877, 0.4638373, 0.4666647, 0.2835164, 0.4333457, + 0.4028734, 0.3528297, 0.1749017, 0.3671360, 0.4052183, 0.4222012, 0.4085002, 0.3198876, + 0.3393941, 0.4418667, 0.3724327, 0.0297363, 0.1562718, 0.1693750, 0.3152241, 0.2076069, + 0.2933232, 0.0599440, 0.1064471, 0.2469246, 0.0528503, 0.0321264, 0.2223779, 0.4756982, + 0.4148478, 0.1855530, 0.2201109, 0.3658398, 0.1724464, 0.2184300, 0.4806912, 0.0183148, + 0.4068079, 0.3377662, 0.1434079, 0.0722899, 0.3818015, 0.4529251, 0.2531753, 0.4028734, + 0.3104094, 0.3041750, 0.7444220, 0.0469955, 0.4269330, 0.3876660, 0.2676854, 0.3013350, + 0.2885858, 0.3038480, 0.4279115, 0.2184300, 0.3897764, 0.1165223, 0.1623044, 0.3694641, + 0.4647038, 0.1950430, 0.0642898, 0.3405251, 0.2209245, 0.3569505, 0.4806912, 0.3142114, + 0.1688596, 0.2013356, 0.3616973, 0.3665765, 0.1457076, 0.2400093, 0.4413908, 0.4203163, + 0.4474346, 0.1522877, 0.4963855, 0.2771504, 0.3932629, 0.0499926, 0.1397347, 0.1162840, + 0.0921099, 0.4273703, 0.3228796, 0.0917027, 0.1871530, 0.0252278, 0.1562718, 0.0526326, + 0.2417610, 0.1361428, 0.4773201, 0.2157922, 0.2075818, 0.1745262, 0.4641679, 0.0403542, + 0.2294849, 0.3104094, 0.3142114, 0.1920804, 0.3407301, 0.3448193, 0.3265684, 0.1039219, + 0.0100230, 0.1693750, 0.0846982, 0.3384884, 0.1491689, 0.4107678, 0.1680801, 0.0634220, + 0.0627621, 0.2532282, 0.3647585, 0.4931641, 0.1688596, 0.4067034, 0.2580674, 0.3928346, + 0.2107771, 0.3768051, 0.3630947, 0.4647529, 0.3081270, 0.0522639, 0.1747926, 0.2013356, + 0.3932629, 0.0526326, 0.0972740, 0.3075456, 0.4610244, 0.3439550, 0.2221761, 0.0400448, + 0.2774129, 0.3961954, 0.0027219, 0.1270155, 0.0915848, 0.0703681, 0.2613653, 0.1867701, + 0.3600508, 0.2641133, 0.2825163, 0.4304054, 0.2783662, 0.3152241, 0.4067034, 0.3054797, + 0.4133712, 0.3381947, 0.2909326, 0.0667344, 0.0929668, 0.3097841, 0.2011968, 0.2807390, + 0.3897764, 0.1920804, 0.3054797, 0.0461345, 0.4405020, 0.0232168, 0.2595815, 0.1997993, + 0.0550861, 0.0242814, 0.2898162, 0.0273423, 0.0280012, 0.2076069, 0.4133712, 0.1691249, + 0.4277944, 0.2545409, 0.4766186, 0.2355419, 0.1457941, 0.1962939, 0.4065750, 0.0040041, + 0.3576335, 0.1925813, 0.0949263, 0.3370988, 0.4918659, 0.3583593, 0.4206699, 0.0614609, + 0.4749146, 0.0183148, 0.1165223, 0.3407301, 0.3476292, 0.0964920, 0.2228194, 0.2653476, + 0.1358538, 0.4709083, 0.0204758, 0.3295173, 0.0178831, 0.4068079, 0.1623044, 0.0846982, + 0.0461345, 0.1464626, 0.1254936, 0.0599609, 0.2089537, 0.0068666, 0.4871525, 0.2925389, + 0.2912845, 0.4519934, 0.3616973, 0.0499926, 0.3476292, 0.1524191, 0.4803574, 0.0404749, + 0.3691756, 0.0898227, 0.0121030, 0.1710113, 0.1414430, 0.1864383, 0.0640926, 0.1346799, + 0.0812578, 0.3378220, 0.2461788, 0.3674253, 0.4063063, 0.0072671, 0.2158301, 0.3041750, + 0.3694641, 0.0812578, 0.4179677, 0.0273935, 0.0175873, 0.0231310, 0.4789151, 0.4029289, + 0.1320064, 0.7444220, 0.2580674, 0.0972740, 0.2613653, 0.3378220, 0.0734471, 0.2880797, + 0.0932892, 0.4374486, 0.3034133, 0.4202002, 0.1441479, 0.1170995, 0.2269343, 0.3605796, + 0.2417610, 0.4179677, 0.1591760, 0.4487811, 0.4059546, 0.0100264, 0.2582222, 0.0276749, + 0.1348172, 0.4857582, 0.0713272, 0.0275548, 0.1156571, 0.4647038, 0.1361428, 0.0040041, + 0.0734471, 0.1602434, 0.4003320, 0.2496215, 0.1248124, 0.4871747, 0.0079268, 0.4962989, + 0.1110411, 0.2440522, 0.4165031, 0.0252984, 0.4441046, 0.4572209, 0.4238202, 0.3857849, + 0.3919643, 0.4948683, 0.0142855, 0.2768389, 0.3448193, 0.3384884, 0.3576335, 0.1268078, + 0.2563025, 0.1582990, 0.4166048, 0.2596988, 0.2345200, 0.0947451, 0.2397596, 0.4953563, + 0.2868139, 0.4802843, 0.1118892, 0.2297511, 0.3528297, 0.1603665, 0.3632484, 0.4808010, + 0.3155171, 0.3556329, 0.3017929, 0.2400539, 0.2746342, 0.0757288, 0.0880413, 0.0978730, + 0.3381947, 0.2440522, 0.1453612, 0.4289585, 0.1462075, 0.4719980, 0.3474138, 0.2933232, + 0.3665765, 0.1867701, 0.0273935, 0.2880797, 0.1602434, 0.4165031, 0.3889723, 0.1373989, + 0.0271059, 0.2785034, 0.4293712, 0.0975274, 0.0616420, 0.4227756, 0.3377662, 0.4863133, + 0.1468162, 0.3094676, 0.3803033, 0.2911978, 0.5482149, 0.2293249, 0.4478964, 0.0941925, + 0.1950430, 0.1464626, 0.2461788, 0.4577443, 0.3152796, 0.3162361, 0.0355901, 0.2797376, + 0.1268078, 0.1453612, 0.8429500, 0.2124143, 0.4123132, 0.3213883, 0.2446150, 0.2573348, + 0.2502904, 0.3494168, 0.3192719, 0.1457076, 0.1397347, 0.3928346, 0.3075456, 0.1254936, + 0.2563025, 0.4863133, 0.2630258, 0.1192136, 0.1283403, 0.5111299, 0.3978934, 0.4631400, + 0.2239768, 0.1434079, 0.3600508, 0.1925813, 0.1468162, 0.2636598, 0.2737032, 0.4906516, + 0.0157230, 0.2219280, 0.0358659, 0.0743166, 0.4167871, 0.0599440, 0.0469955, 0.4773201, + 0.2909326, 0.4405020, 0.0252984, 0.2636598, 0.2486204, 0.1080630, 0.3200969, 0.0032627, + 0.3427203, 0.2639170, 0.2912215, 0.4249687, 0.4289585, 0.1192136, 0.2737032, 0.1463357, + 0.2703603, 0.3848211, 0.4669757, 0.2107771, 0.1582990, 0.1603665, 0.1633865, 0.1318027, + 0.0167729, 0.1506959, 0.4277944, 0.0932892, 0.4795561, 0.3394504, 0.4211857, 0.0710704, + 0.0379968, 0.1778870, 0.4434711, 0.3917919, 0.3404586, 0.0599609, 0.4166048, 0.3094676, + 0.1283403, 0.4126990, 0.0727838, 0.3288944, 0.4250860, 0.3152088, 0.0475468, 0.2720916, + 0.1017065, 0.2501489, 0.2253530, 0.4478221, 0.1064471, 0.0949263, 0.3674253, 0.4441046, + 0.1663671, 0.0782135, 0.6431416, 0.1812549, 0.1701081, 0.2157922, 0.0232168, 0.0964920, + 0.1524191, 0.4609937, 0.0489285, 0.2313439, 0.3747997, 0.3018721, 0.2405941, 0.4778197, + 0.3747582, 0.3192275, 0.1495063, 0.2469246, 0.1162840, 0.2228194, 0.2089537, 0.4803574, + 0.3632484, 0.1381195, 0.4404407, 0.4663205, 0.3698108, 0.3886663, 0.0528503, 0.2075818, + 0.3889723, 0.4126990, 0.4609937, 0.1381195, 0.3466910, 0.3860448, 0.3266448, 0.4008097, + 0.0281233, 0.4662680, 0.2595815, 0.2596988, 0.4808010, 0.2168891, 0.3741804, 0.4124186, + 0.2024299, 0.2787146, 0.0321264, 0.1997993, 0.4374486, 0.2124143, 0.2074694, 0.1906150, + 0.2441548, 0.2863414, 0.1778966, 0.7978231, 0.5805955, 0.0851296, 0.0026993, 0.4342381, + 0.3946897, 0.1491689, 0.3155171, 0.1633865, 0.4795561, 0.0727838, 0.1663671, 0.4808156, + 0.1959839, 0.0873055, 0.2884416, 0.0770738, 0.4107678, 0.2653476, 0.1462075, 0.0782135, + 0.1813836, 0.3356108, 0.2478454, 0.4269330, 0.1745262, 0.3370988, 0.4572209, 0.3415696, + 0.1628898, 0.4335400, 0.1492740, 0.4655451, 0.2777625, 0.1149032, 0.2400093, 0.4063063, + 0.2486204, 0.4209127, 0.4439365, 0.3121863, 0.0742416, 0.0563368, 0.3876660, 0.4610244, + 0.2641133, 0.1591760, 0.1906150, 0.1628898, 0.3853460, 0.4039690, 0.4618716, 0.0398270, + 0.4915100, 0.4278218, 0.1974726, 0.1358538, 0.0068666, 0.4003320, 0.4238202, 0.3394504}; + // TODO: Find a way to generate and validate test data without hardcoding them (issue #2485) const std::vector> inputsf = { {2, @@ -751,16 +958,16 @@ const std::vector> inputsd = { const std::vector> inputsd_SM = { {2, 20, - 100000, + 10000, 0, 0, 1e-15, raft::sparse::solver::LANCZOS_WHICH::SM, 42, - rows, - cols, - vals, - {-0.03865971, -0.00056997}}}; + rows1, + cols1, + vals1, + {-0.03944135, 0.01367824}}}; const std::vector> inputsd_LM = { {2, @@ -807,16 +1014,16 @@ const std::vector> inputsd_SA = { const std::vector> inputsf_SM = { {2, 20, - 100000, + 10000, 0, 0, 1e-15, raft::sparse::solver::LANCZOS_WHICH::SM, 42, - rows, - cols, - vals, - {-0.03865971, -0.00056997}}}; + rows1, + cols1, + vals1, + {-0.03944135, 0.01367824}}}; const std::vector> inputsf_LM = { {2, From cb5ad1d7ea861ece21fcd8e78b6c1095b697f663 Mon Sep 17 00:00:00 2001 From: aamijar Date: Thu, 15 May 2025 10:50:44 +0000 Subject: [PATCH 22/35] test ci --- cpp/tests/sparse/solver/lanczos.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/tests/sparse/solver/lanczos.cu b/cpp/tests/sparse/solver/lanczos.cu index ac0b0eac8e..fb73973f6f 100644 --- a/cpp/tests/sparse/solver/lanczos.cu +++ b/cpp/tests/sparse/solver/lanczos.cu @@ -958,7 +958,7 @@ const std::vector> inputsd = { const std::vector> inputsd_SM = { {2, 20, - 10000, + 100000, 0, 0, 1e-15, @@ -1014,7 +1014,7 @@ const std::vector> inputsd_SA = { const std::vector> inputsf_SM = { {2, 20, - 10000, + 100000, 0, 0, 1e-15, From 2409b8ec8cede4b4bc974698cbaa07a2cc87e998 Mon Sep 17 00:00:00 2001 From: aamijar Date: Thu, 15 May 2025 22:10:30 +0000 Subject: [PATCH 23/35] remove unused --- cpp/tests/sparse/solver/lanczos.cu | 333 ++--------------------------- 1 file changed, 14 insertions(+), 319 deletions(-) diff --git a/cpp/tests/sparse/solver/lanczos.cu b/cpp/tests/sparse/solver/lanczos.cu index fb73973f6f..271aeb4aa4 100644 --- a/cpp/tests/sparse/solver/lanczos.cu +++ b/cpp/tests/sparse/solver/lanczos.cu @@ -342,311 +342,6 @@ class lanczos_tests : public ::testing::TestWithParam std::vector rows = { - 0, 29, 51, 74, 103, 120, 142, 161, 181, 199, 217, 235, 254, 271, 295, - 314, 338, 364, 388, 405, 417, 437, 458, 478, 501, 511, 522, 539, 554, 574, - 590, 615, 638, 651, 679, 698, 717, 725, 741, 761, 779, 799, 817, 833, 850, - 864, 879, 896, 921, 938, 961, 985, 1004, 1019, 1035, 1048, 1070, 1084, 1102, 1123, - 1138, 1165, 1182, 1203, 1215, 1232, 1253, 1272, 1289, 1310, 1327, 1344, 1358, 1386, 1406, - 1428, 1450, 1470, 1485, 1503, 1516, 1529, 1553, 1571, 1596, 1614, 1629, 1647, 1676, 1695, - 1709, 1732, 1750, 1765, 1782, 1803, 1818, 1832, 1846, 1866, 1884}; - -template -std::vector cols = { - 0, 3, 5, 8, 14, 23, 29, 31, 33, 34, 35, 36, 39, 47, 49, 50, 51, 61, 62, 63, 75, 76, 80, 85, - 88, 91, 92, 94, 96, 1, 3, 6, 7, 8, 15, 19, 31, 35, 44, 48, 60, 65, 69, 72, 73, 76, 78, 80, - 85, 90, 97, 17, 26, 28, 41, 42, 43, 45, 48, 51, 52, 57, 58, 59, 62, 63, 65, 67, 68, 74, 86, 90, - 91, 92, 0, 1, 3, 4, 11, 15, 16, 18, 21, 30, 33, 35, 37, 40, 46, 49, 54, 55, 57, 59, 60, 66, - 67, 72, 76, 81, 84, 87, 88, 3, 10, 16, 23, 32, 34, 37, 39, 45, 47, 50, 57, 60, 61, 72, 83, 87, - 0, 10, 18, 31, 32, 33, 43, 52, 55, 56, 58, 60, 63, 67, 68, 72, 76, 77, 82, 86, 90, 92, 1, 16, - 21, 23, 24, 29, 30, 37, 47, 52, 53, 55, 56, 68, 69, 73, 83, 87, 94, 1, 11, 13, 21, 30, 33, 35, - 42, 61, 64, 65, 75, 78, 79, 81, 82, 89, 94, 95, 99, 0, 1, 12, 14, 16, 29, 49, 50, 56, 59, 64, - 66, 68, 72, 77, 87, 93, 98, 15, 26, 32, 33, 52, 53, 56, 58, 60, 64, 65, 70, 71, 81, 87, 93, 97, - 99, 4, 5, 21, 23, 26, 29, 34, 42, 56, 59, 64, 68, 71, 78, 83, 84, 87, 90, 3, 7, 11, 12, 21, - 23, 45, 47, 49, 55, 56, 75, 78, 79, 80, 83, 88, 90, 94, 8, 11, 15, 17, 24, 33, 34, 39, 41, 47, - 48, 53, 54, 61, 86, 93, 94, 7, 14, 15, 17, 22, 29, 30, 39, 41, 43, 45, 46, 47, 48, 55, 60, 62, - 72, 73, 77, 83, 84, 93, 98, 0, 8, 13, 18, 26, 33, 44, 45, 53, 54, 58, 72, 74, 75, 82, 87, 92, - 94, 98, 1, 3, 9, 12, 13, 16, 22, 26, 30, 58, 62, 68, 69, 73, 74, 75, 78, 80, 91, 93, 95, 96, - 97, 99, 3, 4, 6, 8, 15, 17, 18, 23, 25, 31, 42, 45, 47, 50, 55, 58, 60, 62, 65, 70, 72, 75, - 83, 84, 91, 92, 2, 12, 13, 16, 24, 26, 30, 31, 32, 33, 38, 42, 58, 60, 65, 68, 70, 74, 75, 85, - 92, 93, 94, 95, 3, 5, 14, 16, 20, 28, 33, 35, 51, 57, 62, 64, 69, 76, 85, 86, 91, 1, 30, 35, - 41, 48, 49, 50, 63, 65, 81, 88, 99, 18, 20, 24, 25, 26, 28, 29, 45, 61, 67, 72, 74, 75, 76, 80, - 85, 87, 94, 98, 99, 3, 6, 7, 10, 11, 24, 39, 43, 45, 47, 49, 52, 54, 55, 60, 65, 66, 68, 78, - 84, 89, 13, 15, 25, 29, 31, 32, 33, 36, 39, 41, 48, 49, 51, 52, 54, 58, 60, 75, 86, 87, 0, 4, - 6, 10, 11, 16, 25, 28, 30, 31, 37, 40, 41, 44, 51, 53, 58, 60, 66, 73, 80, 91, 92, 6, 12, 17, - 20, 21, 58, 73, 84, 92, 98, 16, 20, 22, 23, 34, 45, 46, 66, 78, 86, 92, 2, 9, 10, 14, 15, 17, - 20, 27, 29, 35, 50, 58, 64, 68, 73, 78, 88, 26, 29, 37, 48, 50, 53, 55, 56, 60, 67, 69, 71, 77, - 81, 88, 2, 18, 20, 23, 51, 55, 59, 63, 64, 67, 68, 72, 76, 77, 78, 83, 84, 87, 94, 98, 0, 6, - 8, 10, 13, 20, 22, 26, 27, 35, 49, 63, 73, 75, 86, 87, 3, 6, 7, 13, 15, 17, 19, 23, 31, 32, - 33, 39, 41, 45, 46, 47, 48, 61, 66, 68, 70, 79, 90, 95, 99, 0, 1, 5, 16, 17, 22, 23, 30, 32, - 45, 46, 47, 51, 53, 54, 60, 62, 66, 72, 79, 87, 94, 97, 4, 5, 9, 17, 22, 30, 31, 38, 51, 57, - 70, 79, 85, 0, 3, 5, 7, 9, 12, 14, 17, 18, 22, 30, 34, 37, 50, 55, 58, 60, 73, 79, 83, 87, - 89, 92, 93, 96, 97, 98, 99, 0, 4, 10, 12, 25, 33, 34, 38, 47, 52, 64, 65, 66, 68, 73, 81, 82, - 88, 91, 0, 1, 3, 7, 18, 19, 26, 29, 41, 50, 56, 57, 70, 72, 75, 82, 93, 95, 97, 0, 22, 46, - 62, 74, 76, 83, 86, 3, 4, 6, 23, 27, 33, 38, 39, 43, 55, 67, 71, 81, 85, 87, 90, 17, 32, 34, - 37, 40, 42, 43, 44, 46, 57, 59, 69, 72, 74, 79, 81, 87, 90, 92, 98, 0, 4, 12, 13, 21, 22, 30, - 37, 41, 60, 69, 73, 75, 82, 84, 90, 92, 99, 3, 23, 38, 41, 45, 46, 49, 54, 58, 59, 63, 67, 69, - 71, 76, 80, 81, 84, 93, 98, 2, 12, 13, 19, 22, 23, 30, 35, 39, 40, 51, 57, 70, 78, 83, 85, 90, - 94, 2, 7, 10, 16, 17, 38, 44, 47, 49, 64, 69, 76, 77, 79, 81, 83, 2, 5, 13, 21, 37, 38, 62, - 67, 68, 81, 82, 86, 87, 95, 96, 97, 98, 1, 14, 23, 38, 42, 51, 55, 71, 74, 75, 76, 77, 89, 96, - 2, 4, 11, 13, 14, 16, 20, 21, 25, 30, 31, 40, 60, 75, 94, 3, 13, 25, 30, 31, 36, 38, 40, 66, - 71, 72, 76, 81, 84, 88, 89, 95, 0, 4, 6, 11, 12, 13, 16, 21, 30, 31, 34, 42, 47, 49, 51, 55, - 65, 68, 70, 71, 73, 75, 84, 88, 95, 1, 2, 12, 13, 19, 22, 27, 30, 51, 56, 57, 72, 75, 79, 90, - 91, 98, 0, 3, 8, 11, 19, 21, 22, 29, 40, 42, 47, 49, 50, 55, 57, 61, 63, 77, 83, 88, 90, 91, - 93, 0, 4, 8, 16, 19, 26, 27, 33, 35, 49, 50, 52, 53, 55, 62, 65, 66, 68, 71, 78, 82, 90, 94, - 98, 0, 2, 18, 22, 23, 28, 31, 32, 41, 44, 47, 48, 56, 58, 69, 70, 83, 96, 98, 2, 5, 6, 9, - 21, 22, 34, 50, 62, 65, 66, 69, 72, 79, 84, 6, 9, 12, 14, 23, 27, 31, 50, 56, 58, 59, 67, 76, - 77, 81, 97, 3, 12, 14, 21, 22, 31, 40, 59, 67, 74, 81, 89, 90, 3, 5, 6, 11, 13, 16, 21, 27, - 28, 33, 37, 44, 47, 49, 50, 59, 71, 72, 83, 89, 91, 96, 5, 6, 8, 9, 10, 11, 27, 35, 48, 51, - 53, 62, 65, 74, 2, 3, 4, 18, 32, 35, 38, 41, 48, 49, 64, 66, 74, 86, 87, 94, 95, 98, 2, 5, - 9, 14, 15, 16, 17, 22, 23, 24, 26, 33, 40, 51, 53, 61, 70, 72, 81, 83, 85, 2, 3, 8, 10, 28, - 38, 40, 53, 54, 55, 68, 70, 81, 83, 98, 1, 3, 4, 5, 9, 13, 16, 17, 21, 22, 23, 27, 31, 33, - 39, 45, 60, 62, 70, 77, 80, 82, 83, 84, 85, 86, 98, 0, 4, 7, 12, 20, 30, 49, 58, 61, 62, 63, - 65, 72, 76, 83, 89, 91, 0, 2, 13, 15, 16, 18, 31, 36, 43, 50, 52, 56, 60, 61, 66, 72, 83, 87, - 89, 92, 93, 0, 2, 5, 19, 28, 29, 40, 49, 61, 63, 86, 90, 7, 8, 9, 10, 18, 26, 28, 34, 42, - 57, 72, 74, 82, 87, 88, 96, 99, 1, 2, 7, 9, 16, 17, 19, 21, 34, 47, 50, 52, 56, 61, 67, 83, - 89, 90, 95, 97, 99, 3, 8, 21, 23, 25, 30, 31, 34, 46, 50, 52, 57, 62, 79, 81, 85, 87, 90, 99, - 2, 3, 5, 20, 27, 28, 37, 40, 43, 53, 54, 65, 69, 82, 84, 89, 90, 2, 5, 6, 8, 10, 15, 17, - 21, 26, 28, 30, 34, 43, 47, 50, 59, 69, 70, 79, 88, 97, 1, 6, 15, 18, 27, 38, 39, 40, 42, 51, - 52, 67, 68, 71, 77, 80, 97, 9, 16, 17, 30, 32, 35, 41, 47, 51, 58, 59, 60, 68, 72, 77, 86, 93, - 9, 10, 27, 37, 40, 44, 46, 47, 50, 55, 69, 74, 87, 98, 1, 3, 4, 5, 8, 13, 14, 16, 20, 28, - 31, 35, 38, 46, 48, 52, 55, 58, 61, 62, 64, 70, 77, 78, 82, 86, 89, 99, 1, 6, 13, 15, 23, 24, - 26, 29, 33, 34, 39, 47, 76, 77, 83, 87, 88, 96, 98, 99, 2, 14, 15, 17, 20, 36, 38, 44, 54, 56, - 57, 64, 71, 80, 81, 85, 86, 87, 88, 92, 93, 95, 0, 7, 11, 14, 15, 16, 17, 20, 22, 29, 35, 39, - 44, 45, 47, 48, 78, 85, 90, 92, 94, 99, 0, 1, 3, 5, 18, 20, 28, 36, 40, 42, 44, 46, 53, 61, - 73, 80, 82, 84, 91, 95, 5, 8, 13, 27, 28, 42, 44, 49, 53, 60, 69, 70, 72, 73, 91, 1, 7, 10, - 11, 15, 21, 25, 26, 28, 41, 50, 72, 75, 81, 82, 87, 94, 96, 7, 11, 30, 31, 32, 33, 38, 42, 48, - 52, 66, 68, 82, 0, 1, 11, 15, 20, 23, 40, 60, 69, 74, 76, 80, 93, 3, 7, 9, 19, 27, 34, 37, - 38, 40, 42, 43, 46, 53, 54, 58, 59, 66, 74, 78, 81, 84, 87, 88, 91, 5, 7, 14, 34, 35, 39, 43, - 50, 60, 64, 67, 72, 76, 78, 79, 83, 84, 96, 4, 6, 10, 11, 13, 16, 28, 33, 36, 41, 42, 49, 51, - 55, 58, 59, 60, 61, 62, 65, 73, 82, 84, 86, 97, 3, 10, 13, 16, 21, 24, 28, 39, 40, 46, 47, 52, - 60, 67, 76, 81, 82, 83, 0, 1, 17, 18, 20, 32, 37, 41, 58, 60, 66, 74, 75, 90, 94, 2, 5, 12, - 18, 22, 25, 29, 36, 43, 57, 60, 63, 70, 72, 74, 83, 94, 99, 3, 4, 6, 8, 9, 10, 14, 20, 22, - 28, 29, 31, 33, 37, 38, 43, 57, 62, 64, 66, 71, 73, 74, 78, 81, 91, 94, 95, 99, 0, 3, 11, 19, - 26, 27, 34, 46, 47, 49, 64, 68, 73, 74, 81, 90, 94, 95, 97, 7, 21, 33, 44, 46, 54, 55, 61, 62, - 65, 67, 72, 91, 99, 1, 2, 5, 10, 11, 30, 37, 38, 39, 41, 48, 49, 50, 54, 63, 65, 66, 67, 75, - 85, 88, 91, 96, 0, 2, 15, 16, 18, 23, 34, 48, 49, 55, 61, 76, 77, 81, 87, 89, 90, 97, 0, 2, - 5, 14, 16, 17, 23, 24, 25, 33, 38, 39, 62, 74, 75, 8, 9, 12, 13, 15, 17, 33, 35, 40, 49, 62, - 70, 74, 80, 93, 98, 99, 0, 6, 7, 11, 12, 14, 17, 20, 28, 31, 41, 45, 50, 57, 75, 78, 85, 86, - 87, 88, 95, 7, 15, 17, 30, 35, 43, 46, 47, 57, 65, 74, 76, 87, 88, 94, 0, 15, 33, 43, 44, 51, - 55, 64, 73, 78, 82, 90, 96, 98, 1, 9, 15, 31, 33, 35, 43, 53, 65, 68, 69, 83, 88, 91, 8, 13, - 14, 20, 24, 28, 33, 38, 40, 43, 48, 50, 51, 57, 59, 60, 71, 73, 93, 96, 7, 9, 15, 19, 20, 30, - 33, 39, 64, 65, 66, 72, 73, 75, 86, 87, 89, 93}; - -template -std::vector vals = { - 0.8385492, 0.0887047, 0.4178915, 0.4859754, 0.4469863, 0.2195207, 0.3129920, 0.1031984, 0.2898832, - 0.3742032, 0.0522814, 0.3923617, 0.4283062, 0.2236069, 0.1620676, 0.0181036, 0.0722899, 0.2825163, - 0.2854958, 0.3136983, 0.4021524, 0.3556329, 0.4577443, 0.1463357, 0.3288944, 0.4404407, 0.3466910, - 0.2799277, 0.1813836, 0.4619252, 0.1622771, 0.2565850, 0.3349850, 0.4806673, 0.2912005, 0.2509201, - 0.6396587, 0.5977305, 0.1196116, 0.2077467, 0.0345871, 0.4918659, 0.4194439, 0.4487811, 0.1682306, - 0.3017929, 0.1373989, 0.3152796, 0.3640917, 0.0489285, 0.4335400, 0.0987368, 0.1548646, 0.2137529, - 0.0130792, 0.0752723, 0.1238085, 0.3553386, 0.4349648, 0.3818015, 0.4697597, 0.4478265, 0.2176154, - 0.3768051, 0.3741169, 0.0550861, 0.3733355, 0.0161616, 0.0404749, 0.0530627, 0.3932415, 0.2313439, - 0.4807387, 0.3860448, 0.0887047, 0.1622771, 0.2646495, 0.4319774, 0.0975544, 0.3953015, 0.4127654, - 0.3950751, 0.0630765, 0.3240158, 0.3895027, 0.0263783, 0.3096741, 0.0810854, 0.2185860, 0.2931856, - 0.4413908, 0.4933484, 0.3265684, 0.3630947, 0.3439550, 0.4709083, 0.4871525, 0.4059546, 0.2835062, - 0.2319805, 0.1080630, 0.1148512, 0.4250860, 0.4319774, 0.3417962, 0.1542346, 0.1705101, 0.3939655, - 0.2228894, 0.2561502, 0.1612249, 0.3348420, 0.7638237, 0.2223779, 0.1142358, 0.2221761, 0.1023570, - 0.0100264, 0.4906516, 0.4211857, 0.4178915, 0.2112697, 0.0841055, 0.3054300, 0.4681202, 0.3307955, - 0.2055745, 0.3013350, 0.0921099, 0.2272112, 0.4771985, 0.0400448, 0.4924752, 0.3142720, 0.3691756, - 0.2582222, 0.2400539, 0.4489491, 0.5111299, 0.4255019, 0.3747997, 0.1873246, 0.2565850, 0.1914687, - 0.3671139, 0.1276162, 0.3537677, 0.4076773, 0.1181683, 0.7192769, 0.2186738, 0.2885858, 0.4734213, - 0.0072575, 0.0765674, 0.0898227, 0.3649966, 0.2496215, 0.1702205, 0.0710704, 0.3869004, 0.3349850, - 0.1886938, 0.3514959, 0.4643647, 0.4223959, 0.3594954, 0.2522124, 0.4105392, 0.2470788, 0.2545409, - 0.3583593, 0.2345200, 0.0271059, 0.3803033, 0.1930780, 0.4567223, 0.0613140, 0.2441548, 0.4808156, - 0.3853460, 0.4859754, 0.4806673, 0.2801995, 0.3858915, 0.0090301, 0.4087827, 0.3671360, 0.2667392, - 0.4641679, 0.4647529, 0.3445000, 0.1198545, 0.0282007, 0.1829597, 0.0539266, 0.0914677, 0.1638856, - 0.1201562, 0.4388565, 0.2036911, 0.2046127, 0.4811504, 0.3038480, 0.0642898, 0.2031245, 0.1680801, - 0.0394903, 0.4766186, 0.2023225, 0.0175873, 0.3034133, 0.4123132, 0.0379968, 0.2168891, 0.0675915, - 0.4039690, 0.3417962, 0.2112697, 0.2400451, 0.4558193, 0.1334496, 0.0195393, 0.3627390, 0.4262152, - 0.0403542, 0.3081270, 0.1527164, 0.0121030, 0.6241815, 0.4913400, 0.0157230, 0.3200969, 0.0437878, - 0.3018721, 0.0975544, 0.1886938, 0.8753713, 0.0700827, 0.2364397, 0.4924574, 0.2563165, 0.1126200, - 0.1547797, 0.0241622, 0.3814965, 0.3526533, 0.2161066, 0.2911978, 0.4464823, 0.3577181, 0.3152088, - 0.3317510, 0.2863414, 0.2801995, 0.0700827, 0.3417172, 0.2610632, 0.4037673, 0.1736438, 0.0880198, - 0.4559108, 0.1121846, 0.7814473, 0.3779829, 0.3405251, 0.1208012, 0.4304054, 0.1807327, 0.0049234, - 0.1778966, 0.3514959, 0.2046946, 0.2997384, 0.2013881, 0.0548181, 0.3352703, 0.2054045, 0.3389475, - 0.1449403, 0.3906285, 0.0580903, 0.3582265, 0.1743012, 0.2712877, 0.4273703, 0.4566499, 0.0667344, - 0.0676206, 0.1248124, 0.0026571, 0.2774455, 0.0032627, 0.1753686, 0.3725724, 0.4469863, 0.3858915, - 0.2046946, 0.3794979, 0.4016317, 0.3370037, 0.0815573, 0.4647915, 0.0563985, 0.4203163, 0.0915991, - 0.0276749, 0.3857849, 0.0461729, 0.3978934, 0.3614717, 0.3266448, 0.7978231, 0.4209127, 0.2912005, - 0.3953015, 0.4388565, 0.3417172, 0.2997384, 0.4108247, 0.2899171, 0.1479114, 0.4418810, 0.0634220, - 0.0929668, 0.4055436, 0.2457036, 0.3701515, 0.4134036, 0.0947451, 0.2785034, 0.3162361, 0.4036728, - 0.3741804, 0.4563937, 0.4904932, 0.1492740, 0.4887115, 0.4127654, 0.1542346, 0.1914687, 0.0090301, - 0.4108247, 0.3533593, 0.4300368, 0.3572507, 0.1412494, 0.4373029, 0.3273854, 0.2602280, 0.1690700, - 0.4756982, 0.0009060, 0.2393224, 0.0014211, 0.4101384, 0.1580024, 0.0231310, 0.5838791, 0.4132268, - 0.2181222, 0.3529412, 0.3698108, 0.2233849, 0.0987368, 0.2610632, 0.2013881, 0.3533593, 0.2908257, - 0.3609885, 0.2026076, 0.2999429, 0.2079948, 0.2704931, 0.2946429, 0.3154255, 0.0627621, 0.2774129, - 0.4206699, 0.0670598, 0.2860273, 0.3919643, 0.2397596, 0.2703603, 0.4632739, 0.4124186, 0.5805955, - 0.1959839, 0.3950751, 0.0841055, 0.3794979, 0.4300368, 0.4032480, 0.2078872, 0.0094638, 0.2755707, - 0.0376010, 0.4909527, 0.3097841, 0.2355419, 0.0072671, 0.2746342, 0.0053361, 0.1994108, 0.3969467, - 0.2509201, 0.3298818, 0.3886021, 0.0245763, 0.4638373, 0.4052183, 0.4148478, 0.0242814, 0.2414050, - 0.2932298, 0.0475468, 0.4618716, 0.4032480, 0.8676416, 0.4028524, 0.3012557, 0.1360013, 0.1863026, - 0.1490197, 0.0643736, 0.3395792, 0.2925389, 0.3659366, 0.4948683, 0.4953563, 0.1047673, 0.0355901, - 0.0856992, 0.1778870, 0.0851296, 0.3532749, 0.0398270, 0.0630765, 0.3671139, 0.4643647, 0.2400451, - 0.2364397, 0.4431843, 0.1266264, 0.4763364, 0.7873081, 0.2751093, 0.4222012, 0.1121367, 0.4474346, - 0.3652081, 0.1600931, 0.0614609, 0.0204758, 0.1615355, 0.4293712, 0.3882434, 0.6431416, 0.0548181, - 0.2899171, 0.3634890, 0.4412351, 0.1490288, 0.0447601, 0.4229826, 0.3807294, 0.0672451, 0.2775799, - 0.4666647, 0.4085002, 0.1297752, 0.1563804, 0.1522877, 0.2532282, 0.2805034, 0.1651538, 0.1046609, - 0.1760083, 0.2195207, 0.1705101, 0.1276162, 0.4558193, 0.4924574, 0.3572507, 0.3401189, 0.0565680, - 0.4332137, 0.2150277, 0.4809324, 0.2783410, 0.1570549, 0.4891155, 0.4529251, 0.2209245, 0.3658022, - 0.3961954, 0.3788675, 0.1621254, 0.3969478, 0.3886663, 0.4372073, 0.3537677, 0.4037673, 0.2908257, - 0.4028524, 0.4431843, 0.7202524, 0.3443225, 0.3538920, 0.3133293, 0.4439365, 0.1412494, 0.3012557, - 0.3634890, 0.3401189, 0.1250412, 0.4831129, 0.0737263, 0.3228796, 0.0975274, 0.1318027, 0.4008097, - 0.1548646, 0.2036911, 0.1334496, 0.4016317, 0.1479114, 0.3609885, 0.1360013, 0.1494316, 0.4203018, - 0.2847606, 0.1855530, 0.3948809, 0.1457941, 0.1710113, 0.4871747, 0.0616420, 0.2720916, 0.1494316, - 0.3342525, 0.4981484, 0.2835164, 0.2201109, 0.3569505, 0.3228796, 0.2664382, 0.1461955, 0.2912845, - 0.2178672, 0.0091858, 0.3888402, 0.3213883, 0.1017065, 0.2137529, 0.2078872, 0.1863026, 0.0565680, - 0.2497744, 0.0917027, 0.3077455, 0.2898162, 0.1962939, 0.0667715, 0.0511321, 0.4857582, 0.0757288, - 0.4719980, 0.0990155, 0.0358659, 0.3427203, 0.4911953, 0.0026993, 0.3121863, 0.3129920, 0.4076773, - 0.4087827, 0.0195393, 0.3352703, 0.1490197, 0.4412351, 0.4203018, 0.3342525, 0.4991112, 0.3198876, - 0.0273423, 0.1726720, 0.2868139, 0.0167729, 0.3167321, 0.3240158, 0.1181683, 0.4223959, 0.2054045, - 0.4418810, 0.2026076, 0.3298818, 0.4332137, 0.4679078, 0.2938424, 0.2349892, 0.3265936, 0.4161196, - 0.0540847, 0.4671349, 0.4922210, 0.4333457, 0.2783662, 0.3295173, 0.1414430, 0.4789151, 0.5482149, - 0.2405941, 0.0873055, 0.4915100, 0.1031984, 0.6396587, 0.3054300, 0.4373029, 0.2999429, 0.1490288, - 0.2150277, 0.4679078, 0.4463057, 0.3714156, 0.1611302, 0.3379962, 0.4654491, 0.0994459, 0.4963855, - 0.0027219, 0.2011968, 0.2413642, 0.0713272, 0.0186765, 0.5553801, 0.0508773, 0.4655451, 0.3939655, - 0.4681202, 0.2046127, 0.2079948, 0.0447601, 0.2938424, 0.4463057, 0.4189366, 0.4805591, 0.4724835, - 0.4029289, 0.3810731, 0.3855192, 0.2898832, 0.3895027, 0.3307955, 0.3594954, 0.4811504, 0.1736438, - 0.3370037, 0.2704931, 0.0094638, 0.4229826, 0.2349892, 0.1488369, 0.3299349, 0.3658398, 0.2805756, - 0.1943161, 0.1270155, 0.2077195, 0.1249269, 0.0572191, 0.3217881, 0.1812549, 0.4356323, 0.2024299, - 0.4955283, 0.2777625, 0.0642578, 0.4278218, 0.3742032, 0.2228894, 0.3627390, 0.0880198, 0.1250412, - 0.1488369, 0.6981739, 0.2518100, 0.2364128, 0.4279115, 0.4212285, 0.4749146, 0.2284694, 0.1864383, - 0.0079268, 0.2446150, 0.4631400, 0.2501489, 0.4844082, 0.0522814, 0.5977305, 0.0263783, 0.2522124, - 0.2755707, 0.3886021, 0.2847606, 0.4991112, 0.0239194, 0.4028964, 0.2294849, 0.2998522, 0.1320064, - 0.0275548, 0.1151714, 0.2652366, 0.2787146, 0.2884416, 0.1149032, 0.3923617, 0.3807294, 0.0540387, - 0.2807390, 0.0142855, 0.3054538, 0.0743166, 0.1352609, 0.3096741, 0.2561502, 0.7192769, 0.4809324, - 0.4981484, 0.3299349, 0.2030550, 0.2820974, 0.3606436, 0.1871530, 0.2116934, 0.1441479, 0.2874195, - 0.3848211, 0.3917919, 0.4778197, 0.2946429, 0.4189366, 0.2518100, 0.2030550, 0.4912895, 0.1356941, - 0.2409017, 0.4399648, 0.2600915, 0.1039219, 0.0522639, 0.1473574, 0.1156571, 0.2768389, 0.4478964, - 0.1246019, 0.1488771, 0.3747582, 0.0281233, 0.0742416, 0.4283062, 0.1612249, 0.4559108, 0.3389475, - 0.1266264, 0.0672451, 0.3265936, 0.2820974, 0.3309392, 0.0915848, 0.0509763, 0.4962989, 0.4802843, - 0.0841302, 0.1918956, 0.3192275, 0.4662680, 0.1974726, 0.0810854, 0.2783410, 0.4912895, 0.3111583, - 0.4521906, 0.2043965, 0.3393941, 0.2771504, 0.4931641, 0.1747926, 0.0280012, 0.3078630, 0.0456258, - 0.1170995, 0.0880413, 0.2797376, 0.2573348, 0.2639170, 0.3364275, 0.2011374, 0.0130792, 0.1121846, - 0.1449403, 0.0245763, 0.2775799, 0.1570549, 0.4161196, 0.0239194, 0.3309392, 0.3111583, 0.3020653, - 0.0100230, 0.4954931, 0.4227756, 0.3662207, 0.4669757, 0.1495063, 0.4342381, 0.0752723, 0.4105392, - 0.4262152, 0.3273854, 0.3154255, 0.1356941, 0.1063635, 0.3477053, 0.4418667, 0.4065750, 0.2158301, - 0.0978730, 0.3474138, 0.0941925, 0.2502904, 0.4167871, 0.1238085, 0.2055745, 0.3906285, 0.4763364, - 0.3606436, 0.2409017, 0.2856070, 0.4519934, 0.0640926, 0.3494168, 0.2239768, 0.1506959, 0.3404586, - 0.0097513, 0.3356108, 0.2007709, 0.0563368, 0.1196116, 0.0815573, 0.4891155, 0.4399648, 0.1063635, - 0.0469109, 0.4409516, 0.2269343, 0.1728651, 0.4690269, 0.4568825, 0.3838028, 0.1701081, 0.2478454, - 0.3553386, 0.3348420, 0.2563165, 0.0580903, 0.4647915, 0.2602280, 0.0643736, 0.7873081, 0.4831129, - 0.0540847, 0.3714156, 0.4521906, 0.0529002, 0.1118892, 0.3946897, 0.2185860, 0.3582265, 0.0737263, - 0.4671349, 0.1611302, 0.0540387, 0.2600915, 0.2043965, 0.0178831, 0.3605796, 0.4215185, 0.3441654, - 0.3192719, 0.2912215, 0.2253530, 0.4059448, 0.0770738, 0.2236069, 0.7638237, 0.2186738, 0.1126200, - 0.7814473, 0.1743012, 0.1690700, 0.2751093, 0.4922210, 0.3379962, 0.2364128, 0.3477053, 0.7218004, - 0.3724327, 0.2531753, 0.0252278, 0.2816279, 0.1346799, 0.1643871, 0.3633022, 0.1110411, 0.2297511, - 0.4249687, 0.4478221, 0.2225533, 0.2077467, 0.4349648, 0.3779829, 0.2712877, 0.4638373, 0.4666647, - 0.2835164, 0.4333457, 0.4028734, 0.3229839, 0.3908435, 0.3720633, 0.3528297, 0.4553215, 0.1170026, - 0.4753753, 0.0282417, 0.1620676, 0.2931856, 0.3671360, 0.1547797, 0.4052183, 0.4222012, 0.4085002, - 0.3198876, 0.3393941, 0.4418667, 0.3724327, 0.0297363, 0.4194855, 0.1562718, 0.1693750, 0.3152241, - 0.3387593, 0.2933232, 0.0599440, 0.1064471, 0.2469246, 0.0528503, 0.0321264, 0.0181036, 0.2223779, - 0.2667392, 0.4756982, 0.4148478, 0.1855530, 0.2201109, 0.3658398, 0.4028964, 0.4194855, 0.1724464, - 0.2184300, 0.4806912, 0.3213868, 0.4946703, 0.0183148, 0.4068079, 0.3882787, 0.1461515, 0.3377662, - 0.1434079, 0.1656042, 0.1153671, 0.0297401, 0.0722899, 0.3818015, 0.0376010, 0.1297752, 0.4529251, - 0.2497744, 0.4654491, 0.4805591, 0.3020653, 0.0469109, 0.2531753, 0.4028734, 0.3104094, 0.0983794, - 0.3041750, 0.7444220, 0.0469955, 0.4269330, 0.3876660, 0.4697597, 0.3013350, 0.2885858, 0.3038480, - 0.1121367, 0.1563804, 0.4279115, 0.2184300, 0.3897764, 0.1165223, 0.1623044, 0.3694641, 0.4647038, - 0.1950430, 0.0223306, 0.4734213, 0.0642898, 0.3405251, 0.0563985, 0.2209245, 0.3569505, 0.0994459, - 0.4806912, 0.3142114, 0.1688596, 0.2013356, 0.3616973, 0.1345261, 0.3665765, 0.1457076, 0.2400093, - 0.4413908, 0.1208012, 0.4203163, 0.4474346, 0.1522877, 0.4963855, 0.2771504, 0.3932629, 0.2256821, - 0.3466487, 0.1397347, 0.4893270, 0.1162840, 0.4933484, 0.0921099, 0.0072575, 0.0241622, 0.4273703, - 0.0009060, 0.3652081, 0.3228796, 0.0917027, 0.2805756, 0.1871530, 0.4409516, 0.0252278, 0.1562718, - 0.3213868, 0.0526326, 0.2417610, 0.1361428, 0.4773201, 0.2157922, 0.2075818, 0.1745262, 0.2272112, - 0.0765674, 0.4641679, 0.2031245, 0.0403542, 0.3814965, 0.2664382, 0.2294849, 0.3229839, 0.3104094, - 0.3142114, 0.1920804, 0.3407301, 0.3448193, 0.4478265, 0.3265684, 0.1142358, 0.4909527, 0.4724835, - 0.2998522, 0.1039219, 0.0100230, 0.3908435, 0.1693750, 0.1674092, 0.0846982, 0.3384884, 0.1067837, - 0.3844901, 0.1491689, 0.4107678, 0.5988698, 0.2176154, 0.4771985, 0.1680801, 0.0915991, 0.0634220, - 0.2393224, 0.0627621, 0.2532282, 0.3658022, 0.7202524, 0.3948809, 0.1943161, 0.4931641, 0.0983794, - 0.1688596, 0.4067034, 0.2580674, 0.4757213, 0.3928346, 0.1995547, 0.2107771, 0.3768051, 0.3630947, - 0.4647529, 0.3081270, 0.3077455, 0.0522639, 0.1747926, 0.2013356, 0.3932629, 0.0526326, 0.3694007, - 0.0972740, 0.3075456, 0.2167318, 0.4610244, 0.0345871, 0.3439550, 0.2221761, 0.0400448, 0.0394903, - 0.4566499, 0.0014211, 0.2774129, 0.1600931, 0.2805034, 0.3961954, 0.1461955, 0.0027219, 0.1270155, - 0.0915848, 0.0529002, 0.0703681, 0.0187762, 0.2613653, 0.1867701, 0.1502444, 0.3600508, 0.4655130, - 0.3398629, 0.4028377, 0.1709328, 0.2641133, 0.2825163, 0.1023570, 0.2470788, 0.4304054, 0.3395792, - 0.2783662, 0.3152241, 0.4067034, 0.9997413, 0.3054797, 0.4133712, 0.0630975, 0.0166616, 0.3381947, - 0.2909326, 0.2139573, 0.0475201, 0.2854958, 0.3741169, 0.0667344, 0.0929668, 0.4101384, 0.3097841, - 0.2011968, 0.2807390, 0.2856070, 0.4946703, 0.3897764, 0.1920804, 0.0187762, 0.3054797, 0.0461345, - 0.2358043, 0.4405020, 0.2239718, 0.0232168, 0.2595815, 0.1997993, 0.3136983, 0.0550861, 0.4924752, - 0.0242814, 0.2898162, 0.0273423, 0.0280012, 0.3387593, 0.4133712, 0.1691249, 0.4277944, 0.3262424, - 0.2545409, 0.3445000, 0.4766186, 0.1527164, 0.2355419, 0.1457941, 0.1962939, 0.4212285, 0.4065750, - 0.1674092, 0.0040041, 0.3576335, 0.6885277, 0.0684911, 0.0949263, 0.3370988, 0.4251885, 0.4918659, - 0.3733355, 0.3583593, 0.2023225, 0.1580024, 0.4206699, 0.2414050, 0.0614609, 0.4749146, 0.2816279, - 0.0183148, 0.1165223, 0.3407301, 0.0630975, 0.3476292, 0.2974767, 0.0964920, 0.2228194, 0.2653476, - 0.0658719, 0.3992334, 0.4709083, 0.1198545, 0.0204758, 0.3788675, 0.3228796, 0.3295173, 0.2413642, - 0.2284694, 0.0178831, 0.4068079, 0.1623044, 0.0846982, 0.0461345, 0.1464626, 0.1254936, 0.4546162, - 0.0599609, 0.2089537, 0.0068666, 0.0161616, 0.4871525, 0.3142720, 0.2925389, 0.2912845, 0.0667715, - 0.2116934, 0.3078630, 0.4519934, 0.3616973, 0.2256821, 0.3476292, 0.1306226, 0.2562920, 0.1834991, - 0.1524191, 0.4803574, 0.0404749, 0.3691756, 0.0898227, 0.0282007, 0.0121030, 0.4055436, 0.0670598, - 0.1615355, 0.1710113, 0.0511321, 0.1414430, 0.1864383, 0.0640926, 0.1346799, 0.3882787, 0.3694007, - 0.0812578, 0.3378220, 0.2461788, 0.3674253, 0.4063063, 0.4194439, 0.3649966, 0.2457036, 0.0072671, - 0.2178672, 0.1473574, 0.0509763, 0.0456258, 0.2158301, 0.3041750, 0.3694641, 0.1306226, 0.0812578, - 0.4179677, 0.0273935, 0.1376181, 0.1237823, 0.0175873, 0.0231310, 0.2860273, 0.4789151, 0.4029289, - 0.1320064, 0.4954931, 0.1643871, 0.7444220, 0.2580674, 0.0972740, 0.2613653, 0.3378220, 0.0734471, - 0.5716440, 0.3270837, 0.4374486, 0.3034133, 0.6241815, 0.0091858, 0.1441479, 0.1170995, 0.2269343, - 0.3605796, 0.3633022, 0.1461515, 0.2417610, 0.4179677, 0.1296077, 0.4877253, 0.1591760, 0.4487811, - 0.4059546, 0.0100264, 0.2582222, 0.1829597, 0.0676206, 0.0276749, 0.5838791, 0.3659366, 0.4857582, - 0.0713272, 0.0275548, 0.1156571, 0.4215185, 0.3720633, 0.4647038, 0.1361428, 0.4757213, 0.0166616, - 0.2358043, 0.0040041, 0.0734471, 0.1602434, 0.0591811, 0.1030985, 0.1983638, 0.4710790, 0.4003320, - 0.1682306, 0.2496215, 0.1248124, 0.3701515, 0.1621254, 0.3443225, 0.4871747, 0.1726720, 0.2077195, - 0.0079268, 0.4962989, 0.1110411, 0.2440522, 0.4165031, 0.0252984, 0.3045145, 0.4441046, 0.4572209, - 0.2415059, 0.4238202, 0.0530627, 0.3857849, 0.4134036, 0.3919643, 0.4948683, 0.0142855, 0.2768389, - 0.1728651, 0.3466487, 0.3448193, 0.3384884, 0.3576335, 0.1296077, 0.1268078, 0.2563025, 0.1895228, - 0.3345918, 0.4166048, 0.4054141, 0.2596988, 0.4439297, 0.4482521, 0.4021524, 0.2345200, 0.3526533, - 0.0461729, 0.0947451, 0.4132268, 0.2397596, 0.4953563, 0.1651538, 0.2868139, 0.1151714, 0.4802843, - 0.4690269, 0.1118892, 0.2297511, 0.3528297, 0.0649494, 0.1603665, 0.3632484, 0.4808010, 0.3155171, - 0.0421940, 0.3556329, 0.3017929, 0.2835062, 0.2400539, 0.2746342, 0.1047673, 0.0757288, 0.3054538, - 0.0880413, 0.0978730, 0.4568825, 0.3441654, 0.1345261, 0.3381947, 0.2440522, 0.1453612, 0.0627209, - 0.4289585, 0.3434332, 0.1462075, 0.4489491, 0.0539266, 0.0026571, 0.3888402, 0.4719980, 0.3474138, - 0.3838028, 0.2933232, 0.3665765, 0.1867701, 0.0273935, 0.5716440, 0.1602434, 0.4165031, 0.3889723, - 0.1373989, 0.0271059, 0.4913400, 0.2161066, 0.2785034, 0.4293712, 0.0975274, 0.0616420, 0.0990155, - 0.4227756, 0.3377662, 0.0591811, 0.0649494, 0.4863133, 0.3123243, 0.3094676, 0.4548634, 0.3543404, - 0.3803033, 0.2911978, 0.5482149, 0.0186765, 0.3810731, 0.1249269, 0.4478964, 0.0941925, 0.4553215, - 0.1950430, 0.1464626, 0.2461788, 0.2376485, 0.4577443, 0.3152796, 0.4464823, 0.3162361, 0.0355901, - 0.3969478, 0.2797376, 0.1502444, 0.1376181, 0.1268078, 0.1453612, 0.8429500, 0.2124143, 0.2319805, - 0.1930780, 0.4123132, 0.2932298, 0.3213883, 0.2446150, 0.2874195, 0.1246019, 0.2573348, 0.2502904, - 0.3494168, 0.3192719, 0.1457076, 0.1397347, 0.3928346, 0.3075456, 0.1254936, 0.2563025, 0.4863133, - 0.2630258, 0.1192136, 0.1283403, 0.3361003, 0.3254332, 0.5111299, 0.4567223, 0.3978934, 0.4631400, - 0.2652366, 0.0841302, 0.2239768, 0.1434079, 0.3600508, 0.6885277, 0.2562920, 0.1030985, 0.0627209, - 0.3123243, 0.2376485, 0.6660228, 0.2737032, 0.0725528, 0.4906516, 0.1702205, 0.0157230, 0.3577181, - 0.2774455, 0.2181222, 0.0358659, 0.0572191, 0.0743166, 0.3662207, 0.4167871, 0.0599440, 0.0469955, - 0.4773201, 0.1995547, 0.2167318, 0.4655130, 0.2909326, 0.4405020, 0.2974767, 0.0252984, 0.6660228, - 0.4688708, 0.4444213, 0.2486204, 0.1080630, 0.3200969, 0.0032627, 0.3529412, 0.3882434, 0.3538920, - 0.3427203, 0.1918956, 0.2639170, 0.2912215, 0.4249687, 0.0223306, 0.3398629, 0.1834991, 0.4289585, - 0.1192136, 0.2737032, 0.4688708, 0.1463357, 0.3640917, 0.2703603, 0.0053361, 0.0856992, 0.3855192, - 0.3848211, 0.4669757, 0.2107771, 0.4028377, 0.4546162, 0.1895228, 0.1603665, 0.1891034, 0.1633865, - 0.3932415, 0.4255019, 0.1807327, 0.1994108, 0.1046609, 0.1318027, 0.0167729, 0.1352609, 0.1506959, - 0.1067837, 0.1709328, 0.4277944, 0.3270837, 0.1983638, 0.3345918, 0.4444213, 0.4795561, 0.3394504, - 0.1148512, 0.4211857, 0.0710704, 0.0914677, 0.0379968, 0.0437878, 0.3614717, 0.1778870, 0.1760083, - 0.4911953, 0.3167321, 0.5553801, 0.3217881, 0.3917919, 0.1488771, 0.3404586, 0.3844901, 0.2239718, - 0.0684911, 0.0599609, 0.4877253, 0.3045145, 0.4166048, 0.3094676, 0.1283403, 0.4126990, 0.0727838, - 0.3816538, 0.3677183, 0.3288944, 0.4250860, 0.3152088, 0.0475468, 0.2720916, 0.1017065, 0.2501489, - 0.2253530, 0.4478221, 0.1064471, 0.0949263, 0.3674253, 0.4441046, 0.4054141, 0.3361003, 0.3239112, - 0.1663671, 0.0782135, 0.4374697, 0.0613140, 0.6431416, 0.1812549, 0.1701081, 0.4059448, 0.4893270, - 0.2157922, 0.2139573, 0.0232168, 0.0964920, 0.1524191, 0.4710790, 0.4609937, 0.1566380, 0.0489285, - 0.2313439, 0.3747997, 0.3018721, 0.3317510, 0.2405941, 0.4778197, 0.3747582, 0.3192275, 0.1495063, - 0.1170026, 0.2469246, 0.1656042, 0.1162840, 0.3262424, 0.2228194, 0.2089537, 0.4803574, 0.3632484, - 0.1891034, 0.3239112, 0.1381195, 0.0077237, 0.4404407, 0.4807387, 0.4036728, 0.3698108, 0.3969467, - 0.3886663, 0.4844082, 0.4753753, 0.0528503, 0.2075818, 0.0475201, 0.3434332, 0.3889723, 0.3254332, - 0.4126990, 0.4609937, 0.1381195, 0.0022522, 0.3466910, 0.3860448, 0.1873246, 0.3266448, 0.2233849, - 0.4632739, 0.4372073, 0.3133293, 0.4008097, 0.4356323, 0.0281233, 0.4662680, 0.2595815, 0.2596988, - 0.4808010, 0.1638856, 0.2168891, 0.0049234, 0.1753686, 0.3741804, 0.4124186, 0.2024299, 0.2787146, - 0.3364275, 0.0321264, 0.1997993, 0.4374486, 0.4439297, 0.2124143, 0.2074694, 0.1906150, 0.1204390, - 0.2799277, 0.3869004, 0.2441548, 0.2863414, 0.1778966, 0.7978231, 0.5805955, 0.0851296, 0.0026993, - 0.0508773, 0.4342381, 0.3946897, 0.1153671, 0.1491689, 0.3155171, 0.4548634, 0.1633865, 0.4795561, - 0.0727838, 0.1663671, 0.1552885, 0.4808156, 0.4563937, 0.1959839, 0.0873055, 0.2884416, 0.0097513, - 0.0770738, 0.2225533, 0.4107678, 0.2653476, 0.4482521, 0.1462075, 0.3816538, 0.0782135, 0.1552885, - 0.1813836, 0.4904932, 0.4955283, 0.3356108, 0.2478454, 0.4269330, 0.1745262, 0.3370988, 0.4572209, - 0.3543404, 0.0725528, 0.0077237, 0.3415696, 0.1628898, 0.4335400, 0.0675915, 0.1492740, 0.4655451, - 0.2777625, 0.1149032, 0.2007709, 0.2400093, 0.0658719, 0.4063063, 0.1237823, 0.2486204, 0.4374697, - 0.0022522, 0.1201562, 0.3725724, 0.4209127, 0.3532749, 0.4439365, 0.3121863, 0.0642578, 0.0742416, - 0.2011374, 0.0563368, 0.0282417, 0.0297401, 0.3876660, 0.5988698, 0.4610244, 0.2641133, 0.1591760, - 0.2415059, 0.1906150, 0.1628898, 0.3853460, 0.4039690, 0.4887115, 0.4618716, 0.0398270, 0.4915100, - 0.4278218, 0.1974726, 0.4251885, 0.3992334, 0.0068666, 0.4003320, 0.4238202, 0.0421940, 0.3394504, - 0.3677183, 0.1566380, 0.1204390}; - -template -std::vector rows1 = { 0, 19, 33, 44, 63, 75, 89, 101, 115, 122, 134, 146, 156, 169, 182, 192, 205, 216, 231, 237, 244, 256, 269, 280, 291, 296, 303, 315, 325, 336, 349, 368, 382, 390, 405, 418, 429, 432, 442, 455, 466, 481, 491, 505, 517, 523, 534, 546, 562, 570, 590, @@ -655,7 +350,7 @@ std::vector rows1 = { 991, 999, 1006, 1019, 1034, 1042, 1058, 1068, 1077, 1088, 1103, 1112, 1121, 1129, 1140, 1152}; template -std::vector cols1 = { +std::vector cols = { {0, 3, 5, 14, 29, 31, 33, 34, 35, 39, 51, 61, 76, 80, 85, 88, 91, 92, 96, 1, 6, 7, 8, 19, 35, 44, 65, 72, 76, 78, 80, 90, 97, 28, 42, 43, 51, 52, 59, 63, 68, 90, 91, 92, 0, 3, 4, 11, 21, 30, 33, 40, 46, 49, 54, 57, 59, 60, 66, 67, 72, 84, 88, 3, 16, 23, 32, 34, 39, 45, 50, 60, @@ -706,7 +401,7 @@ std::vector cols1 = { 83, 14, 24, 28, 38, 43, 51, 59, 60, 71, 93, 96, 7, 9, 19, 20, 30, 33, 39, 65, 66, 72, 73, 86}}; template -std::vector vals1 = { +std::vector vals = { 0.8385492, 0.0887047, 0.4178915, 0.4469863, 0.3129920, 0.1031984, 0.2898832, 0.3742032, 0.0522814, 0.4283062, 0.0722899, 0.2825163, 0.3556329, 0.4577443, 0.1463357, 0.3288944, 0.4404407, 0.3466910, 0.1813836, 0.4619252, 0.2565850, 0.3349850, 0.4806673, 0.2509201, @@ -964,9 +659,9 @@ const std::vector> inputsd_SM = { 1e-15, raft::sparse::solver::LANCZOS_WHICH::SM, 42, - rows1, - cols1, - vals1, + rows, + cols, + vals, {-0.03944135, 0.01367824}}}; const std::vector> inputsd_LM = { @@ -981,7 +676,7 @@ const std::vector> inputsd_LM = { rows, cols, vals, - {-2.48497686, 5.47778263}}}; + {-2.00968758, 3.45939575}}}; const std::vector> inputsd_LA = { {2, @@ -995,7 +690,7 @@ const std::vector> inputsd_LA = { rows, cols, vals, - {2.40271478, 5.47778263}}}; + {1.99482678, 3.45939575}}}; const std::vector> inputsd_SA = { {2, @@ -1009,7 +704,7 @@ const std::vector> inputsd_SA = { rows, cols, vals, - {-2.48497686, -2.31603463}}}; + {-2.00968758, -1.83487935}}}; const std::vector> inputsf_SM = { {2, @@ -1020,9 +715,9 @@ const std::vector> inputsf_SM = { 1e-15, raft::sparse::solver::LANCZOS_WHICH::SM, 42, - rows1, - cols1, - vals1, + rows, + cols, + vals, {-0.03944135, 0.01367824}}}; const std::vector> inputsf_LM = { @@ -1037,7 +732,7 @@ const std::vector> inputsf_LM = { rows, cols, vals, - {-2.48497686, 5.47778263}}}; + {-2.00968758, 3.45939575}}}; const std::vector> inputsf_LA = { {2, @@ -1051,7 +746,7 @@ const std::vector> inputsf_LA = { rows, cols, vals, - {2.40271478, 5.47778263}}}; + {1.99482678, 3.45939575}}}; const std::vector> inputsf_SA = { {2, @@ -1065,7 +760,7 @@ const std::vector> inputsf_SA = { rows, cols, vals, - {-2.48497686, -2.31603463}}}; + {-2.00968758, -1.83487935}}}; const std::vector> rmat_inputsf = { {50, From b34dc3e58a2dc0054b7bd97875d14c197d3a91a6 Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 21 May 2025 04:29:33 +0000 Subject: [PATCH 24/35] update pytest --- .../pylibraft/pylibraft/tests/test_sparse.py | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index 32081a38fa..152cc75593 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -17,6 +17,7 @@ import cupyx.scipy.sparse.linalg # NOQA import numpy import pytest +import scipy from cupyx.scipy import sparse from pylibraft.sparse.linalg import eigsh @@ -66,6 +67,8 @@ class TestEigsh: density = 0.33 tol = {numpy.float32: 1e-5, numpy.complex64: 1e-5, "default": 1e-12} res_tol = {"f": 1e-5, "d": 1e-12} + res_tol_factor = {"SA": 1, "LA": 1, "LM": 1, "SM": 2} + maxiter = 10000 return_eigenvectors = True def _make_matrix(self, dtype, xp): @@ -77,17 +80,27 @@ def _make_matrix(self, dtype, xp): return a def _test_eigsh(self, a, k, xp, sp, which): - expected_ret = sp.linalg.eigsh( - a, k=k, return_eigenvectors=self.return_eigenvectors, which=which + scipy_csr = sp.sparse.csr_matrix( + (a.data.get(), a.indices.get(), a.indptr.get()), shape=a.shape ) - actual_ret = eigsh(a, k=k, which=which) + expected_ret = sp.sparse.linalg.eigsh( + scipy_csr, + k=k, + return_eigenvectors=self.return_eigenvectors, + which=which, + maxiter=self.maxiter, + ) + actual_ret = eigsh(a, k=k, which=which, maxiter=self.maxiter) if self.return_eigenvectors: w, x = actual_ret exp_w, _ = expected_ret # Check the residuals to see if eigenvectors are correct. ax_xw = a @ x - xp.multiply(x, w.reshape(1, k)) res = xp.linalg.norm(ax_xw) / xp.linalg.norm(w) - tol = self.res_tol[numpy.dtype(a.dtype).char.lower()] + tol = ( + self.res_tol[numpy.dtype(a.dtype).char.lower()] + * self.res_tol_factor[which] + ) assert res < tol else: w = actual_ret @@ -98,14 +111,14 @@ def _test_eigsh(self, a, k, xp, sp, which): @pytest.mark.parametrize("format", ["csr"]) # , 'csc', 'coo']) @pytest.mark.parametrize("k", [3, 6, 12]) @pytest.mark.parametrize("dtype", ["f", "d"]) - @pytest.mark.parametrize("which", ["LA", "LM", "SA"]) + @pytest.mark.parametrize("which", ["LA", "LM", "SA", "SM"]) def test_sparse(self, format, k, dtype, which, xp=cupy, sp=sparse): if format == "csc": pytest.xfail("may be buggy") # trans=True a = self._make_matrix(dtype, xp) a = sp.coo_matrix(a).asformat(format) - return self._test_eigsh(a, k, xp, sp, which) + return self._test_eigsh(a, k, xp, scipy, which) def test_invalid(self): xp, sp = cupy, sparse From eead7581770d52de8f1b8ad7ff9c402f4e4611f5 Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 21 May 2025 20:32:18 +0000 Subject: [PATCH 25/35] test ci --- cpp/tests/sparse/solver/lanczos.cu | 2 +- python/pylibraft/pylibraft/tests/test_sparse.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/tests/sparse/solver/lanczos.cu b/cpp/tests/sparse/solver/lanczos.cu index 271aeb4aa4..b883346401 100644 --- a/cpp/tests/sparse/solver/lanczos.cu +++ b/cpp/tests/sparse/solver/lanczos.cu @@ -227,7 +227,7 @@ class rmat_lanczos_tests ASSERT_TRUE(raft::devArrMatch(eigenvalues.data_handle(), expected_eigenvalues.data_handle(), n_components, - raft::CompareApprox(1e-5), + raft::CompareApprox(1e-4), stream)); } diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index 152cc75593..cdf8b73a29 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -67,7 +67,7 @@ class TestEigsh: density = 0.33 tol = {numpy.float32: 1e-5, numpy.complex64: 1e-5, "default": 1e-12} res_tol = {"f": 1e-5, "d": 1e-12} - res_tol_factor = {"SA": 1, "LA": 1, "LM": 1, "SM": 2} + res_tol_factor = {"SA": 1, "LA": 1, "LM": 1, "SM": 10} maxiter = 10000 return_eigenvectors = True From d221be2aa9b5753f4d55bb98f9ddaa04889e4e00 Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 21 May 2025 23:18:23 +0000 Subject: [PATCH 26/35] test ci --- python/pylibraft/pylibraft/tests/test_sparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index cdf8b73a29..6668b30aa3 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -68,7 +68,7 @@ class TestEigsh: tol = {numpy.float32: 1e-5, numpy.complex64: 1e-5, "default": 1e-12} res_tol = {"f": 1e-5, "d": 1e-12} res_tol_factor = {"SA": 1, "LA": 1, "LM": 1, "SM": 10} - maxiter = 10000 + maxiter = 100000 return_eigenvectors = True def _make_matrix(self, dtype, xp): From b2166f6b417e61f4b694b9a176309896d27e10d3 Mon Sep 17 00:00:00 2001 From: aamijar Date: Thu, 29 May 2025 08:42:56 +0000 Subject: [PATCH 27/35] test ci --- cpp/include/raft/sparse/solver/detail/lanczos.cuh | 2 ++ python/pylibraft/pylibraft/tests/test_sparse.py | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cpp/include/raft/sparse/solver/detail/lanczos.cuh b/cpp/include/raft/sparse/solver/detail/lanczos.cuh index e262218312..f6e4a749b2 100644 --- a/cpp/include/raft/sparse/solver/detail/lanczos.cuh +++ b/cpp/include/raft/sparse/solver/detail/lanczos.cuh @@ -2149,6 +2149,8 @@ auto lanczos_smallest( RAFT_LOG_TRACE("Iteration %f: residual (tolerance) %d", iter, res); } + std::cout << "iter " << iter << " maxiter " << maxIter << " res " << res << std::endl; + raft::copy(eigVals_dev, eigenvalues_k.data_handle(), nEigVecs, stream); raft::copy(eigVecs_dev, ritz_eigenvectors.data_handle(), n * nEigVecs, stream); diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index 6668b30aa3..5cf2e98ddd 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -68,7 +68,7 @@ class TestEigsh: tol = {numpy.float32: 1e-5, numpy.complex64: 1e-5, "default": 1e-12} res_tol = {"f": 1e-5, "d": 1e-12} res_tol_factor = {"SA": 1, "LA": 1, "LM": 1, "SM": 10} - maxiter = 100000 + maxiter = 10000000 return_eigenvectors = True def _make_matrix(self, dtype, xp): @@ -91,9 +91,13 @@ def _test_eigsh(self, a, k, xp, sp, which): maxiter=self.maxiter, ) actual_ret = eigsh(a, k=k, which=which, maxiter=self.maxiter) + cupy_actual_ret = sparse.linalg.eigsh( + a, k=k, which=which, maxiter=self.maxiter + ) if self.return_eigenvectors: w, x = actual_ret exp_w, _ = expected_ret + cupy_exp_w, _ = cupy_actual_ret # Check the residuals to see if eigenvectors are correct. ax_xw = a @ x - xp.multiply(x, w.reshape(1, k)) res = xp.linalg.norm(ax_xw) / xp.linalg.norm(w) @@ -106,6 +110,9 @@ def _test_eigsh(self, a, k, xp, sp, which): w = actual_ret exp_w = expected_ret w = xp.sort(w) + print(w, "raft") + print(exp_w, "scipy") + print(cupy_exp_w, "cupy") assert cupy.allclose(w, exp_w, rtol=tol, atol=tol) @pytest.mark.parametrize("format", ["csr"]) # , 'csc', 'coo']) From d49830b5260e2479e6cdb5b5e87a8e84911b4008 Mon Sep 17 00:00:00 2001 From: aamijar Date: Thu, 29 May 2025 09:13:06 +0000 Subject: [PATCH 28/35] test ci --- python/pylibraft/pylibraft/tests/test_sparse.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index 5cf2e98ddd..0b2c2d1471 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -91,13 +91,13 @@ def _test_eigsh(self, a, k, xp, sp, which): maxiter=self.maxiter, ) actual_ret = eigsh(a, k=k, which=which, maxiter=self.maxiter) - cupy_actual_ret = sparse.linalg.eigsh( - a, k=k, which=which, maxiter=self.maxiter - ) + # cupy_actual_ret = sparse.linalg.eigsh( + # a, k=k, which=which, maxiter=self.maxiter + # ) if self.return_eigenvectors: w, x = actual_ret exp_w, _ = expected_ret - cupy_exp_w, _ = cupy_actual_ret + # cupy_exp_w, _ = cupy_actual_ret # Check the residuals to see if eigenvectors are correct. ax_xw = a @ x - xp.multiply(x, w.reshape(1, k)) res = xp.linalg.norm(ax_xw) / xp.linalg.norm(w) @@ -112,7 +112,7 @@ def _test_eigsh(self, a, k, xp, sp, which): w = xp.sort(w) print(w, "raft") print(exp_w, "scipy") - print(cupy_exp_w, "cupy") + # print(cupy_exp_w, "cupy") assert cupy.allclose(w, exp_w, rtol=tol, atol=tol) @pytest.mark.parametrize("format", ["csr"]) # , 'csc', 'coo']) From eb5fa148092214de30f175f6d24c6e529bb27531 Mon Sep 17 00:00:00 2001 From: aamijar Date: Thu, 29 May 2025 10:18:18 +0000 Subject: [PATCH 29/35] test ci --- python/pylibraft/pylibraft/tests/test_sparse.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index 0b2c2d1471..b02bdb61d0 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -90,7 +90,13 @@ def _test_eigsh(self, a, k, xp, sp, which): which=which, maxiter=self.maxiter, ) - actual_ret = eigsh(a, k=k, which=which, maxiter=self.maxiter) + actual_ret = eigsh( + a, + k=k, + which=which, + maxiter=self.maxiter, + v0=xp.ones((self.n,), dtype=a.dtype), + ) # cupy_actual_ret = sparse.linalg.eigsh( # a, k=k, which=which, maxiter=self.maxiter # ) From 3cd8f21bd6b2b5b446421474d6330ae524bc7b57 Mon Sep 17 00:00:00 2001 From: aamijar Date: Sat, 31 May 2025 00:09:54 +0000 Subject: [PATCH 30/35] test ci --- python/pylibraft/pylibraft/tests/test_sparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index b02bdb61d0..1ad6ff023d 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -95,7 +95,7 @@ def _test_eigsh(self, a, k, xp, sp, which): k=k, which=which, maxiter=self.maxiter, - v0=xp.ones((self.n,), dtype=a.dtype), + # v0=xp.ones((self.n,), dtype=a.dtype), ) # cupy_actual_ret = sparse.linalg.eigsh( # a, k=k, which=which, maxiter=self.maxiter From 594b825335af68c0c70c0004d47b71c7e872d39c Mon Sep 17 00:00:00 2001 From: aamijar Date: Tue, 3 Jun 2025 02:21:41 +0000 Subject: [PATCH 31/35] test ci shift-inverse --- .../pylibraft/pylibraft/tests/test_sparse.py | 175 +++++++++++++++++- 1 file changed, 167 insertions(+), 8 deletions(-) diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index 1ad6ff023d..0aaed68d4f 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -66,7 +66,7 @@ class TestEigsh: n = 30 density = 0.33 tol = {numpy.float32: 1e-5, numpy.complex64: 1e-5, "default": 1e-12} - res_tol = {"f": 1e-5, "d": 1e-12} + res_tol = {"f": 1e-5, "d": 1e-9} res_tol_factor = {"SA": 1, "LA": 1, "LM": 1, "SM": 10} maxiter = 10000000 return_eigenvectors = True @@ -90,13 +90,171 @@ def _test_eigsh(self, a, k, xp, sp, which): which=which, maxiter=self.maxiter, ) - actual_ret = eigsh( - a, - k=k, - which=which, - maxiter=self.maxiter, - # v0=xp.ones((self.n,), dtype=a.dtype), - ) + + if which == "SM": + + def eigsh_sm_using_shift_invert( + A, k=6, sigma=0.0, gpu=False, **kwargs + ): + """ + Find smallest magnitude eigenvalues + using shift-invert transformation. + + This mimics scipy's shift-invert mode by: + 1. Solving (A - sigma*I)^(-1) instead of A + 2. Using LM mode on the transformed problem + 3. Converting results back to original eigenvalues + """ + # import scipy.sparse as sp + import numpy as np + import scipy.sparse.linalg as spla + from scipy.sparse.linalg import LinearOperator + + n = A.shape[0] + + # Step 1: Create shifted matrix A_shifted = A - sigma * I + if sigma == 0.0: + sigma = 1e-12 + + A_shifted = A - sigma * sp.sparse.eye(n, format=A.format) + + # Step 2: Create LU decomposition for efficient solving + lu = spla.splu(A_shifted.tocsc()) + + # Step 3: Create LinearOperator that applies (A - sigma*I)^(-1) + def matvec(x): + return lu.solve(x) + + def rmatvec(x): + return lu.solve(x, trans="T") + + shift_inv_op = LinearOperator( + shape=(n, n), matvec=matvec, rmatvec=rmatvec, dtype=A.dtype + ) + if gpu: + # print(type(shift_inv_op)) + # Create identity matrix (columns are basis vectors) + I_matrix = np.eye(n) + + # Apply shift-invert operator to each basis vector + dense_matrix = np.column_stack( + [shift_inv_op @ I_matrix[:, i] for i in range(n)] + ) + + # Convert to CSR (even though it's likely dense) + dense_matrix = sp.sparse.csr_matrix(dense_matrix) + print( + type(dense_matrix), + dense_matrix.shape, + dense_matrix.nnz, + ) + csr_test_matrix = sparse.csr_matrix( + dense_matrix, dtype=A.dtype + ) + print(csr_test_matrix.dtype) + theta, v = eigsh( + csr_test_matrix, k=k, which="LM", maxiter=self.maxiter + ) + else: + # Step 4: Solve eigenvalue problem + # for the transformed operator + # Use LM (largest magnitude) + # on the shift-inverted problem + theta, v = sp.sparse.linalg.eigsh( + shift_inv_op, k=k, which="LM", maxiter=self.maxiter + ) + + # Step 5: Transform eigenvalues back to original problem + # If theta are eigenvalues of (A - sigma*I)^(-1), then + # original eigenvalues w = 1/theta + sigma + w = 1.0 / theta + sigma + + # Step 6: Sort by magnitude (smallest first) + idx = np.argsort(w) + w = w[idx] + v = v[:, idx] + + return w, v + + A = scipy_csr + n = A.shape[0] + sigma = 0 + + # Create shifted matrix A - sigma*I + I_matrix = sp.sparse.eye(n, format="csr", dtype=A.dtype) + A_shifted = A - sigma * I_matrix + + # Convert to CuPy if needed + # if hasattr(A_shifted, "get"): + # A_shifted_cpu = A_shifted.get() + # else: + # A_shifted_cpu = A_shifted + + # For SM, we want to find eigenvalues closest to zero + # Use a small shift to avoid singularity + sigma_small = 1e-6 + A_shifted = A - sigma_small * I_matrix + + # Use your working LA mode to find + # largest eigenvalues of (A - sigma*I)^(-1) + # This is equivalent to finding + # smallest magnitude eigenvalues of A + + # Since direct inversion is expensive, we can use the fact that: + # If Ax = λx, then (A + σI)x = (λ + σ)x + # So we shift the matrix and use SA to find + # smallest algebraic eigenvalues + A_shifted = A + abs(sigma_small) * I_matrix + + # Use SA to find smallest eigenvalues of shifted matrix + eigenvals, eigenvecs = sp.sparse.linalg.eigsh( + A, + k=k, + maxiter=self.maxiter, + return_eigenvectors=self.return_eigenvectors, + sigma=0, + ) + + # Transform back: original eigenvalues + # = shifted eigenvalues - sigma + original_eigenvals = eigenvals - abs(sigma_small) + + print("") + print(original_eigenvals, "scipy shifted mode") + + original_eigenvals, eigenvecs = eigsh_sm_using_shift_invert(A, k=k) + + print("") + print(original_eigenvals, "scipy shifted mode custom") + + eigenvals, eigenvecs = eigsh( + sparse.csr_matrix(A_shifted), + k=k, + which=which, + maxiter=self.maxiter, + ) + + original_eigenvals = eigenvals - abs(sigma_small) + + print("") + print(original_eigenvals, "raft shifted mode") + + original_eigenvals, eigenvecs = eigsh_sm_using_shift_invert( + A, k=k, gpu=True + ) + + actual_ret = (original_eigenvals, eigenvecs) + + print("") + print(original_eigenvals, "raft shifted mode custom") + else: + actual_ret = eigsh( + a, + k=k, + which=which, + maxiter=self.maxiter, + # v0=xp.ones((self.n,), dtype=a.dtype), + ) # cupy_actual_ret = sparse.linalg.eigsh( # a, k=k, which=which, maxiter=self.maxiter # ) @@ -111,6 +269,7 @@ def _test_eigsh(self, a, k, xp, sp, which): self.res_tol[numpy.dtype(a.dtype).char.lower()] * self.res_tol_factor[which] ) + print(res, tol) assert res < tol else: w = actual_ret From 020e4f4a838020d6674686e6d36fa7f2e436dd3a Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 4 Jun 2025 22:49:48 +0000 Subject: [PATCH 32/35] remove SM --- .../pylibraft/pylibraft/tests/test_sparse.py | 180 +----------------- 1 file changed, 9 insertions(+), 171 deletions(-) diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index 0aaed68d4f..9f2bb76315 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -66,8 +66,8 @@ class TestEigsh: n = 30 density = 0.33 tol = {numpy.float32: 1e-5, numpy.complex64: 1e-5, "default": 1e-12} - res_tol = {"f": 1e-5, "d": 1e-9} - res_tol_factor = {"SA": 1, "LA": 1, "LM": 1, "SM": 10} + res_tol = {"f": 1e-5, "d": 1e-12} + res_tol_factor = {"SA": 1, "LA": 1, "LM": 1, "SM": 1} maxiter = 10000000 return_eigenvectors = True @@ -91,170 +91,12 @@ def _test_eigsh(self, a, k, xp, sp, which): maxiter=self.maxiter, ) - if which == "SM": - - def eigsh_sm_using_shift_invert( - A, k=6, sigma=0.0, gpu=False, **kwargs - ): - """ - Find smallest magnitude eigenvalues - using shift-invert transformation. - - This mimics scipy's shift-invert mode by: - 1. Solving (A - sigma*I)^(-1) instead of A - 2. Using LM mode on the transformed problem - 3. Converting results back to original eigenvalues - """ - # import scipy.sparse as sp - import numpy as np - import scipy.sparse.linalg as spla - from scipy.sparse.linalg import LinearOperator - - n = A.shape[0] - - # Step 1: Create shifted matrix A_shifted = A - sigma * I - if sigma == 0.0: - sigma = 1e-12 - - A_shifted = A - sigma * sp.sparse.eye(n, format=A.format) - - # Step 2: Create LU decomposition for efficient solving - lu = spla.splu(A_shifted.tocsc()) - - # Step 3: Create LinearOperator that applies (A - sigma*I)^(-1) - def matvec(x): - return lu.solve(x) - - def rmatvec(x): - return lu.solve(x, trans="T") - - shift_inv_op = LinearOperator( - shape=(n, n), matvec=matvec, rmatvec=rmatvec, dtype=A.dtype - ) - if gpu: - # print(type(shift_inv_op)) - # Create identity matrix (columns are basis vectors) - I_matrix = np.eye(n) - - # Apply shift-invert operator to each basis vector - dense_matrix = np.column_stack( - [shift_inv_op @ I_matrix[:, i] for i in range(n)] - ) - - # Convert to CSR (even though it's likely dense) - dense_matrix = sp.sparse.csr_matrix(dense_matrix) - print( - type(dense_matrix), - dense_matrix.shape, - dense_matrix.nnz, - ) - csr_test_matrix = sparse.csr_matrix( - dense_matrix, dtype=A.dtype - ) - print(csr_test_matrix.dtype) - theta, v = eigsh( - csr_test_matrix, k=k, which="LM", maxiter=self.maxiter - ) - else: - # Step 4: Solve eigenvalue problem - # for the transformed operator - # Use LM (largest magnitude) - # on the shift-inverted problem - theta, v = sp.sparse.linalg.eigsh( - shift_inv_op, k=k, which="LM", maxiter=self.maxiter - ) - - # Step 5: Transform eigenvalues back to original problem - # If theta are eigenvalues of (A - sigma*I)^(-1), then - # original eigenvalues w = 1/theta + sigma - w = 1.0 / theta + sigma - - # Step 6: Sort by magnitude (smallest first) - idx = np.argsort(w) - w = w[idx] - v = v[:, idx] - - return w, v - - A = scipy_csr - n = A.shape[0] - sigma = 0 - - # Create shifted matrix A - sigma*I - I_matrix = sp.sparse.eye(n, format="csr", dtype=A.dtype) - A_shifted = A - sigma * I_matrix - - # Convert to CuPy if needed - # if hasattr(A_shifted, "get"): - # A_shifted_cpu = A_shifted.get() - # else: - # A_shifted_cpu = A_shifted - - # For SM, we want to find eigenvalues closest to zero - # Use a small shift to avoid singularity - sigma_small = 1e-6 - A_shifted = A - sigma_small * I_matrix - - # Use your working LA mode to find - # largest eigenvalues of (A - sigma*I)^(-1) - # This is equivalent to finding - # smallest magnitude eigenvalues of A - - # Since direct inversion is expensive, we can use the fact that: - # If Ax = λx, then (A + σI)x = (λ + σ)x - # So we shift the matrix and use SA to find - # smallest algebraic eigenvalues - A_shifted = A + abs(sigma_small) * I_matrix - - # Use SA to find smallest eigenvalues of shifted matrix - eigenvals, eigenvecs = sp.sparse.linalg.eigsh( - A, - k=k, - maxiter=self.maxiter, - return_eigenvectors=self.return_eigenvectors, - sigma=0, - ) - - # Transform back: original eigenvalues - # = shifted eigenvalues - sigma - original_eigenvals = eigenvals - abs(sigma_small) - - print("") - print(original_eigenvals, "scipy shifted mode") - - original_eigenvals, eigenvecs = eigsh_sm_using_shift_invert(A, k=k) - - print("") - print(original_eigenvals, "scipy shifted mode custom") - - eigenvals, eigenvecs = eigsh( - sparse.csr_matrix(A_shifted), - k=k, - which=which, - maxiter=self.maxiter, - ) - - original_eigenvals = eigenvals - abs(sigma_small) - - print("") - print(original_eigenvals, "raft shifted mode") - - original_eigenvals, eigenvecs = eigsh_sm_using_shift_invert( - A, k=k, gpu=True - ) - - actual_ret = (original_eigenvals, eigenvecs) - - print("") - print(original_eigenvals, "raft shifted mode custom") - else: - actual_ret = eigsh( - a, - k=k, - which=which, - maxiter=self.maxiter, - # v0=xp.ones((self.n,), dtype=a.dtype), - ) + actual_ret = eigsh( + a, + k=k, + which=which, + maxiter=self.maxiter, + ) # cupy_actual_ret = sparse.linalg.eigsh( # a, k=k, which=which, maxiter=self.maxiter # ) @@ -269,21 +111,17 @@ def rmatvec(x): self.res_tol[numpy.dtype(a.dtype).char.lower()] * self.res_tol_factor[which] ) - print(res, tol) assert res < tol else: w = actual_ret exp_w = expected_ret w = xp.sort(w) - print(w, "raft") - print(exp_w, "scipy") - # print(cupy_exp_w, "cupy") assert cupy.allclose(w, exp_w, rtol=tol, atol=tol) @pytest.mark.parametrize("format", ["csr"]) # , 'csc', 'coo']) @pytest.mark.parametrize("k", [3, 6, 12]) @pytest.mark.parametrize("dtype", ["f", "d"]) - @pytest.mark.parametrize("which", ["LA", "LM", "SA", "SM"]) + @pytest.mark.parametrize("which", ["LA", "LM", "SA"]) def test_sparse(self, format, k, dtype, which, xp=cupy, sp=sparse): if format == "csc": pytest.xfail("may be buggy") # trans=True From fbd7509dae53e99175a37e221b92a8d4fae0b964 Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 4 Jun 2025 22:51:16 +0000 Subject: [PATCH 33/35] remove SM --- python/pylibraft/pylibraft/tests/test_sparse.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index 9f2bb76315..dfda5923e1 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -67,7 +67,6 @@ class TestEigsh: density = 0.33 tol = {numpy.float32: 1e-5, numpy.complex64: 1e-5, "default": 1e-12} res_tol = {"f": 1e-5, "d": 1e-12} - res_tol_factor = {"SA": 1, "LA": 1, "LM": 1, "SM": 1} maxiter = 10000000 return_eigenvectors = True @@ -97,20 +96,13 @@ def _test_eigsh(self, a, k, xp, sp, which): which=which, maxiter=self.maxiter, ) - # cupy_actual_ret = sparse.linalg.eigsh( - # a, k=k, which=which, maxiter=self.maxiter - # ) if self.return_eigenvectors: w, x = actual_ret exp_w, _ = expected_ret - # cupy_exp_w, _ = cupy_actual_ret # Check the residuals to see if eigenvectors are correct. ax_xw = a @ x - xp.multiply(x, w.reshape(1, k)) res = xp.linalg.norm(ax_xw) / xp.linalg.norm(w) - tol = ( - self.res_tol[numpy.dtype(a.dtype).char.lower()] - * self.res_tol_factor[which] - ) + tol = self.res_tol[numpy.dtype(a.dtype).char.lower()] assert res < tol else: w = actual_ret From 932a36e60de49ec6519b414fd9833bb3d3c90b37 Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 4 Jun 2025 22:52:32 +0000 Subject: [PATCH 34/35] remove SM --- python/pylibraft/pylibraft/tests/test_sparse.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/python/pylibraft/pylibraft/tests/test_sparse.py b/python/pylibraft/pylibraft/tests/test_sparse.py index dfda5923e1..e9fa1237d4 100644 --- a/python/pylibraft/pylibraft/tests/test_sparse.py +++ b/python/pylibraft/pylibraft/tests/test_sparse.py @@ -67,7 +67,6 @@ class TestEigsh: density = 0.33 tol = {numpy.float32: 1e-5, numpy.complex64: 1e-5, "default": 1e-12} res_tol = {"f": 1e-5, "d": 1e-12} - maxiter = 10000000 return_eigenvectors = True def _make_matrix(self, dtype, xp): @@ -87,14 +86,12 @@ def _test_eigsh(self, a, k, xp, sp, which): k=k, return_eigenvectors=self.return_eigenvectors, which=which, - maxiter=self.maxiter, ) actual_ret = eigsh( a, k=k, which=which, - maxiter=self.maxiter, ) if self.return_eigenvectors: w, x = actual_ret From 09d8028db1155fd3807c5c70a7bee2771396099d Mon Sep 17 00:00:00 2001 From: aamijar Date: Wed, 11 Jun 2025 20:36:46 +0000 Subject: [PATCH 35/35] remove SM --- cpp/include/raft/sparse/solver/detail/lanczos.cuh | 2 -- cpp/tests/sparse/solver/lanczos.cu | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cpp/include/raft/sparse/solver/detail/lanczos.cuh b/cpp/include/raft/sparse/solver/detail/lanczos.cuh index f6e4a749b2..e262218312 100644 --- a/cpp/include/raft/sparse/solver/detail/lanczos.cuh +++ b/cpp/include/raft/sparse/solver/detail/lanczos.cuh @@ -2149,8 +2149,6 @@ auto lanczos_smallest( RAFT_LOG_TRACE("Iteration %f: residual (tolerance) %d", iter, res); } - std::cout << "iter " << iter << " maxiter " << maxIter << " res " << res << std::endl; - raft::copy(eigVals_dev, eigenvalues_k.data_handle(), nEigVecs, stream); raft::copy(eigVecs_dev, ritz_eigenvectors.data_handle(), n * nEigVecs, stream); diff --git a/cpp/tests/sparse/solver/lanczos.cu b/cpp/tests/sparse/solver/lanczos.cu index b883346401..271aeb4aa4 100644 --- a/cpp/tests/sparse/solver/lanczos.cu +++ b/cpp/tests/sparse/solver/lanczos.cu @@ -227,7 +227,7 @@ class rmat_lanczos_tests ASSERT_TRUE(raft::devArrMatch(eigenvalues.data_handle(), expected_eigenvalues.data_handle(), n_components, - raft::CompareApprox(1e-4), + raft::CompareApprox(1e-5), stream)); }