| 4 | |
| 5 | #[pyfunction] |
| 6 | pub fn angular_grid(num_points: usize) -> (Vec<(f64, f64, f64)>, Vec<f64>) { |
| 7 | let offsets = tables::offsets::offsets(); |
| 8 | |
| 9 | let offset: usize = match offsets.get(&num_points) { |
| 10 | Some(v) => *v, |
| 11 | None => panic!( |
| 12 | "angular_grid called with unsupported num_points, allowed are: {:?}", |
| 13 | valid_input_values() |
| 14 | ), |
| 15 | }; |
| 16 | |
| 17 | ( |
| 18 | tables::coordinates::COORDINATES[offset..(offset + num_points)].to_vec(), |
| 19 | tables::weights::WEIGHTS[offset..(offset + num_points)].to_vec(), |
| 20 | ) |
| 21 | } |
| 22 | |
| 23 | pub fn get_closest_num_angular(n: usize) -> usize { |
| 24 | for number in valid_input_values() { |