+/*!
+ * Computes the maximal value within every tuple of \a this array.
+ * \return DataArrayDouble * - the new instance of DataArrayDouble containing the
+ * same number of tuples as \a this array and one component.
+ * The caller is to delete this result array using decrRef() as it is no more
+ * needed.
+ * \throw If \a this is not allocated.
+ * \sa DataArrayDouble::maxPerTupleWithCompoId, DataArrayDouble::minPerTuple
+ */
+DataArrayDouble *DataArrayDouble::maxPerTuple() const
+{
+ return this->operatePerTuple([](const double *bg, const double *endd) { return *std::max_element(bg,endd); });
+}
+
+/*!
+ * Computes the minimal value within every tuple of \a this array.
+ * \return DataArrayDouble * - the new instance of DataArrayDouble containing the
+ * same number of tuples as \a this array and one component.
+ * The caller is to delete this result array using decrRef() as it is no more
+ * needed.
+ * \throw If \a this is not allocated.
+ * \sa DataArrayDouble::maxPerTuple
+ */
+DataArrayDouble *DataArrayDouble::minPerTuple() const
+{
+ return this->operatePerTuple([](const double *bg, const double *endd) { return *std::min_element(bg,endd); });
+}
+