Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
Catch::Matchers::Vector::Detail Namespace Reference

Functions

template<typename InputIterator , typename T >
size_t count (InputIterator first, InputIterator last, T const &item)
 
template<typename InputIterator , typename T >
bool contains (InputIterator first, InputIterator last, T const &item)
 

Function Documentation

template<typename InputIterator , typename T >
bool Catch::Matchers::Vector::Detail::contains ( InputIterator  first,
InputIterator  last,
T const &  item 
)

Definition at line 2757 of file catch.hpp.

Referenced by Catch::Matchers::Vector::UnorderedEqualsMatcher< T >::match().

2757  {
2758  for (; first != last; ++first) {
2759  if (*first == item) {
2760  return true;
2761  }
2762  }
2763  return false;
2764  }
template<typename InputIterator , typename T >
size_t Catch::Matchers::Vector::Detail::count ( InputIterator  first,
InputIterator  last,
T const &  item 
)

Definition at line 2747 of file catch.hpp.

Referenced by gen_cqty_binned(), Catch::Matchers::Vector::UnorderedEqualsMatcher< T >::match(), read_benchmark_file(), read_chi_test_file(), read_dm_test_file(), read_growth_hiz_test_file(), read_growth_test_file(), read_halomod_test_file(), and read_massfunc_test_file().

2747  {
2748  size_t cnt = 0;
2749  for (; first != last; ++first) {
2750  if (*first == item) {
2751  ++cnt;
2752  }
2753  }
2754  return cnt;
2755  }