tfel
Loading...
Searching...
No Matches
tfel::fsalgo::equal< N > Class Template Reference

Equal returns true if the two ranges [first1, first1+N) and [first2, first2 + N) are identical when compared element-by-element, and otherwise returns false. More...

#include </home/runner/work/tfel/tfel/include/TFEL/FSAlgorithm/equal.hxx>

Static Public Member Functions

template<typename InputIterator, typename InputIterator2>
static TFEL_FSALGORITHM_INLINE bool exe (InputIterator p, InputIterator2 q)
template<typename InputIterator, typename InputIterator2, typename BinaryPredicate>
static TFEL_FSALGORITHM_INLINE bool exe (InputIterator p, InputIterator2 q, BinaryPredicate binary_pred)

Detailed Description

template<unsigned int N>
class tfel::fsalgo::equal< N >

Equal returns true if the two ranges [first1, first1+N) and [first2, first2 + N) are identical when compared element-by-element, and otherwise returns false.

Template Parameters
Nnumber of elements to be compared.

This documentation is mostly inspired from: http://www.sgi.com/tech/stl/equal.html

See also
transform.cxx for some elementary tests.
Author
Thomas Helfer
Date
30/06/2006

Member Function Documentation

◆ exe() [1/2]

template<unsigned int N>
template<typename InputIterator, typename InputIterator2>
TFEL_FSALGORITHM_INLINE bool tfel::fsalgo::equal< N >::exe ( InputIterator p,
InputIterator2 q )
inlinestatic
Template Parameters
InputIteratoriterator for the first sequence
InputIterator2iterator for the second sequence
Parameters
[in]piterator to the first element of the first sequence
[in]qiterator to the first element of the second sequence
Returns
true if all elements are equal
Precondition
  • InputIterator1 is a model of Input Iterator.
  • InputIterator2 is a model of Input Iterator.
  • InputIterator1's value type is a model of Equality Comparable.
  • InputIterator2's value type is a model of Equality Comparable.
  • InputIterator1's value type can be compared for equality with InputIterator2's value type.

◆ exe() [2/2]

template<unsigned int N>
template<typename InputIterator, typename InputIterator2, typename BinaryPredicate>
TFEL_FSALGORITHM_INLINE bool tfel::fsalgo::equal< N >::exe ( InputIterator p,
InputIterator2 q,
BinaryPredicate binary_pred )
inlinestatic
Template Parameters
InputIteratoriterator for the first sequence
InputIterator2iterator for the second sequence
BinaryPredicatepredicate used to make comparison
Parameters
[in]piterator to the first element of the first sequence
[in]qiterator to the first element of the second sequence
[in]binary_predpredicate used to make comparison
Returns
true if all elements are one-by-one equal given the predicate used.
Precondition
  • InputIterator1 is a model of Input Iterator.
  • InputIterator2 is a model of Input Iterator.
  • BinaryPredicate is a model of Binary Predicate.
  • InputIterator1's value type is convertible to BinaryPredicate's first argument type.
  • InputIterator2's value type is convertible to BinaryPredicate's second argument type.

The documentation for this class was generated from the following file: