@@ -141,6 +141,19 @@ extension vDSP {
141
141
/// - Parameter vector: Source vector.
142
142
/// - Parameter bounds: Clipping threshold.
143
143
/// - Returns: The clipped result.
144
+ ///
145
+ /// This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
146
+ /// `C` is `bounds.upperBound`, and `D` is the inverted clip result:
147
+ /// ```
148
+ /// for (int n = 0; n < N; ++n) {
149
+ /// if (A[n] <= *B || A[n] >= *C)
150
+ /// D[n] = A[n];
151
+ /// else if (A[n] < 0)
152
+ /// D[n] = *B;
153
+ /// else
154
+ /// D[n] = *C;
155
+ /// }
156
+ /// ```
144
157
@inline ( __always)
145
158
@available ( iOS 9999 , OSX 9999 , tvOS 9999 , watchOS 9999 , * )
146
159
public static func invertedClip< U> ( _ vector: U ,
@@ -167,6 +180,19 @@ extension vDSP {
167
180
/// - Parameter vector: Source vector.
168
181
/// - Parameter bounds: Clipping threshold.
169
182
/// - Parameter result: The clipped result.
183
+ ///
184
+ /// This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
185
+ /// `C` is `bounds.upperBound`, and `D` is the inverted clip result:
186
+ /// ```
187
+ /// for (int n = 0; n < N; ++n) {
188
+ /// if (A[n] <= *B || A[n] >= *C)
189
+ /// D[n] = A[n];
190
+ /// else if (A[n] < 0)
191
+ /// D[n] = *B;
192
+ /// else
193
+ /// D[n] = *C;
194
+ /// }
195
+ /// ```
170
196
@inline ( __always)
171
197
@available ( iOS 9999 , OSX 9999 , tvOS 9999 , watchOS 9999 , * )
172
198
public static func invertedClip< U, V> ( _ vector: U ,
@@ -200,6 +226,19 @@ extension vDSP {
200
226
/// - Parameter vector: Source vector.
201
227
/// - Parameter bounds: Clipping threshold.
202
228
/// - Returns: The clipped result.
229
+ ///
230
+ /// This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
231
+ /// `C` is `bounds.upperBound`, and `D` is the inverted clip result:
232
+ /// ```
233
+ /// for (int n = 0; n < N; ++n) {
234
+ /// if (A[n] <= *B || A[n] >= *C)
235
+ /// D[n] = A[n];
236
+ /// else if (A[n] < 0)
237
+ /// D[n] = *B;
238
+ /// else
239
+ /// D[n] = *C;
240
+ /// }
241
+ /// ```
203
242
@inline ( __always)
204
243
@available ( iOS 9999 , OSX 9999 , tvOS 9999 , watchOS 9999 , * )
205
244
public static func invertedClip< U> ( _ vector: U ,
@@ -226,6 +265,19 @@ extension vDSP {
226
265
/// - Parameter vector: Source vector.
227
266
/// - Parameter bounds: Clipping threshold.
228
267
/// - Parameter result: The clipped result.
268
+ ///
269
+ /// This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
270
+ /// `C` is `bounds.upperBound`, and `D` is the inverted clip result:
271
+ /// ```
272
+ /// for (int n = 0; n < N; ++n) {
273
+ /// if (A[n] <= *B || A[n] >= *C)
274
+ /// D[n] = A[n];
275
+ /// else if (A[n] < 0)
276
+ /// D[n] = *B;
277
+ /// else
278
+ /// D[n] = *C;
279
+ /// }
280
+ /// ```
229
281
@inline ( __always)
230
282
@available ( iOS 9999 , OSX 9999 , tvOS 9999 , watchOS 9999 , * )
231
283
public static func invertedClip< U, V> ( _ vector: U ,
0 commit comments