@@ -182,14 +182,18 @@ where
182
182
S : Data < Elem = A > ,
183
183
D : Dimension ,
184
184
{
185
- /// Finds the first index of the minimum value of the array.
185
+ /// Finds the index of the minimum value of the array.
186
186
///
187
187
/// Returns `None` if any of the pairwise orderings tested by the function
188
188
/// are undefined. (For example, this occurs if there are any
189
189
/// floating-point NaN values in the array.)
190
190
///
191
191
/// Returns `None` if the array is empty.
192
192
///
193
+ /// Even if there are multiple (equal) elements that are minima, only one
194
+ /// index is returned. (Which one is returned is unspecified and may depend
195
+ /// on the memory layout of the array.)
196
+ ///
193
197
/// # Example
194
198
///
195
199
/// ```
@@ -214,12 +218,20 @@ where
214
218
/// floating-point NaN values in the array.)
215
219
///
216
220
/// Additionally, returns `None` if the array is empty.
221
+ ///
222
+ /// Even if there are multiple (equal) elements that are minima, only one
223
+ /// is returned. (Which one is returned is unspecified and may depend on
224
+ /// the memory layout of the array.)
217
225
fn min ( & self ) -> Option < & A >
218
226
where
219
227
A : PartialOrd ;
220
228
221
229
/// Finds the elementwise minimum of the array, skipping NaN values.
222
230
///
231
+ /// Even if there are multiple (equal) elements that are minima, only one
232
+ /// is returned. (Which one is returned is unspecified and may depend on
233
+ /// the memory layout of the array.)
234
+ ///
223
235
/// **Warning** This method will return a NaN value if none of the values
224
236
/// in the array are non-NaN values. Note that the NaN value might not be
225
237
/// in the array.
@@ -228,14 +240,18 @@ where
228
240
A : MaybeNan ,
229
241
A :: NotNan : Ord ;
230
242
231
- /// Finds the first index of the maximum value of the array.
243
+ /// Finds the index of the maximum value of the array.
232
244
///
233
245
/// Returns `None` if any of the pairwise orderings tested by the function
234
246
/// are undefined. (For example, this occurs if there are any
235
247
/// floating-point NaN values in the array.)
236
248
///
237
249
/// Returns `None` if the array is empty.
238
250
///
251
+ /// Even if there are multiple (equal) elements that are maxima, only one
252
+ /// index is returned. (Which one is returned is unspecified and may depend
253
+ /// on the memory layout of the array.)
254
+ ///
239
255
/// # Example
240
256
///
241
257
/// ```
@@ -260,12 +276,20 @@ where
260
276
/// floating-point NaN values in the array.)
261
277
///
262
278
/// Additionally, returns `None` if the array is empty.
279
+ ///
280
+ /// Even if there are multiple (equal) elements that are maxima, only one
281
+ /// is returned. (Which one is returned is unspecified and may depend on
282
+ /// the memory layout of the array.)
263
283
fn max ( & self ) -> Option < & A >
264
284
where
265
285
A : PartialOrd ;
266
286
267
287
/// Finds the elementwise maximum of the array, skipping NaN values.
268
288
///
289
+ /// Even if there are multiple (equal) elements that are maxima, only one
290
+ /// is returned. (Which one is returned is unspecified and may depend on
291
+ /// the memory layout of the array.)
292
+ ///
269
293
/// **Warning** This method will return a NaN value if none of the values
270
294
/// in the array are non-NaN values. Note that the NaN value might not be
271
295
/// in the array.
0 commit comments