| 1 | #cxx . . $ `<file>/fon/SampledXY.h`/ifndef _SampledXY_h_ |
| 2 | #define _SampledXY_h_cxx . . $ `fon/SampledXY.h:2:9`! |
| 3 | /* SampledXY.h |
| 4 | * |
| 5 | * Copyright (C) 1992-2011,2013-2017,2023,2024 Paul Boersma |
| 6 | * |
| 7 | * This code is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or (at |
| 10 | * your option) any later version. |
| 11 | * |
| 12 | * This code is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 15 | * See the GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | #include "Sampled.h"cxx . . $ `<file>/fon/Sampled.h`/ |
| 22 | |
| 23 | #include "SampledXY_def.h"cxx . . $ `<file>/fon/SampledXY_def.h`/ |
| 24 | |
| 25 | void SampledXY_initcxx . . $ SampledXY_init(6070c73102fabd7). (mutableSampledXYcxx . . $ mutableSampledXY# me, double xmin, double xmax, integercxx . . $ integer# nx, double dx, double x1, |
| 26 | double ymin, double ymax, integercxx . . $ integer# ny, double dy, double y1); |
| 27 | |
| 28 | template <typename T> static inline double SampledXY_indexToYcxx . . $ SampledXY_indexToY(3ae72866b16d2115). (constSampledXYcxx . . $ constSampledXY# me, T index) { return mycxx . . $ `melder/melder.h:44:9`! y1cxx . . $ structSampledXY#y1. +cxx . . $ operator+(f51ce004bf8b037). (index -cxx . . $ operator-(c8fab9ce909c5d29). (T) 1) *cxx . . $ `operator*`(b464376f9cf8932a). mycxx . . $ `melder/melder.h:44:9`! dycxx . . $ structSampledXY#dy.; } |
| 29 | static inline double SampledXY_yToIndexcxx . . $ SampledXY_yToIndex(b64596108dbdd62a). (constSampledXYcxx . . $ constSampledXY# me, double y) { return (y - mycxx . . $ `melder/melder.h:44:9`! y1cxx . . $ structSampledXY#y1.) / mycxx . . $ `melder/melder.h:44:9`! dycxx . . $ structSampledXY#dy. + 1.0; } |
| 30 | static inline integercxx . . $ integer# SampledXY_yToLowIndexcxx . . $ SampledXY_yToLowIndex(4f19b6c1abfd172d). (constSampledXYcxx . . $ constSampledXY# me, double y) { return Melder_ifloorcxx . . $ Melder_iroundDown(a6e4a4c8b00c35a3). ((y - mycxx . . $ `melder/melder.h:44:9`! y1cxx . . $ structSampledXY#y1.) / mycxx . . $ `melder/melder.h:44:9`! dycxx . . $ structSampledXY#dy. + 1.0); } |
| 31 | static inline integercxx . . $ integer# SampledXY_yToHighIndexcxx . . $ SampledXY_yToHighIndex(4f19b6c1abfd172d). (constSampledXYcxx . . $ constSampledXY# me, double y) { return Melder_iceilingcxx . . $ `melder/melder_ftoi.h:45:9`! ((y - mycxx . . $ `melder/melder.h:44:9`! y1cxx . . $ structSampledXY#y1.) / mycxx . . $ `melder/melder.h:44:9`! dycxx . . $ structSampledXY#dy. + 1.0); } |
| 32 | static inline integercxx . . $ integer# SampledXY_yToNearestIndexcxx . . $ SampledXY_yToNearestIndex(4f19b6c1abfd172d). (constSampledXYcxx . . $ constSampledXY# me, double y) { return Melder_iroundcxx . . $ `melder/melder_ftoi.h:78:9`! ((y - mycxx . . $ `melder/melder.h:44:9`! y1cxx . . $ structSampledXY#y1.) / mycxx . . $ `melder/melder.h:44:9`! dycxx . . $ structSampledXY#dy. + 1.0); } |
| 33 | |
| 34 | integercxx . . $ integer# SampledXY_getWindowSamplesYcxx . . $ SampledXY_getWindowSamplesY(4302ed892b02b0fc). ( |
| 35 | const constSampledXYcxx . . $ constSampledXY# me, |
| 36 | const double ymin, |
| 37 | const double ymax, |
| 38 | integercxx . . $ integer# *const iymin, |
| 39 | integercxx . . $ integer# *const iymax |
| 40 | ); |
| 41 | |
| 42 | void SampledXY_unidirectionalAutowindowYcxx . . $ SampledXY_unidirectionalAutowindowY(b6a531eed30bf40e). ( |
| 43 | const constSampledXYcxx . . $ constSampledXY# me, |
| 44 | double *const ymin, |
| 45 | double *const ymax |
| 46 | ); |
| 47 | void SampledXY_bidirectionalAutowindowYcxx . . $ SampledXY_bidirectionalAutowindowY(b6a531eed30bf40e). ( |
| 48 | const constSampledXYcxx . . $ constSampledXY# me, |
| 49 | double *const y1, |
| 50 | double *const y2 |
| 51 | ); |
| 52 | |
| 53 | /* End of file SampledXY.h */ |
| 54 | #endif |