Commit 71ac38b2 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Removed containsValue and containsOnlyValue from Array and ArrayView

The algorithms are implemented as plain functions in TNL::Algorithms.
containsValue was replaced with contains.
parent 0d2a5781
Loading
Loading
Loading
Loading
+1 −40
Original line number Diff line number Diff line
@@ -56,8 +56,7 @@ template< int, typename > class StaticArray;
 * explicit data transfer which is not buffered, so it can be very slow.
 *
 * Other methods, such as \ref operator=, \ref operator==, \ref operator!=,
 * \ref setValue, \ref containsValue, \ref containsOnlyValue, and \ref evaluate,
 * provide various operations on whole arrays.
 * \ref setValue, and \ref evaluate, provide various operations on whole arrays.
 *
 * See also \ref ArrayView, \ref Vector, \ref VectorView.
 *
@@ -722,44 +721,6 @@ class Array
      template< typename Function >
      void forAllElements( Function&& f ) const;

      /**
       * \brief Checks if there is an element with value \e v.
       *
       * By default, all elements of the array are checked. If \e begin or
       * \e end is set to a non-zero value, only elements in the sub-interval
       * `[begin, end)` are checked.
       *
       * \param value The value to be checked.
       * \param begin The beginning of the array sub-interval. It is 0 by
       *              default.
       * \param end The end of the array sub-interval. The default value is 0
       *            which is, however, replaced with the array size.
       * \return `true` if there is _at least one_ element in the sub-interval
       *         `[begin, end)` which has the value \e value.
       */
      bool containsValue( ValueType value,
                          IndexType begin = 0,
                          IndexType end = 0 ) const;

      /**
       * \brief Checks if all elements have the same value \e v.
       *
       * By default, all elements of the array are checked. If \e begin or
       * \e end is set to a non-zero value, only elements in the sub-interval
       * `[begin, end)` are checked.
       *
       * \param value The value to be checked.
       * \param begin The beginning of the array sub-interval. It is 0 by
       *              default.
       * \param end The end of the array sub-interval. The default value is 0
       *            which is, however, replaced with the array size.
       * \return `true` if _all_ elements in the sub-interval `[begin, end)`
       *         have the same value \e value.
       */
      bool containsOnlyValue( ValueType value,
                              IndexType begin = 0,
                              IndexType end = 0 ) const;

      /**
       * \brief Method for saving the array to a binary file \e fileName.
       *
Loading