Version: SMASH-3.1
algorithms.h File Reference

Generic algorithms on containers and ranges. More...

#include <algorithm>
#include <cmath>
#include <utility>

Go to the source code of this file.

Namespaces

 smash
 

Functions

template<typename Iterator >
static bool smash::enforce_periodic_boundaries (Iterator begin, const Iterator &end, typename std::iterator_traits< Iterator >::value_type length)
 Enforces periodic boundaries on the given collection of values. More...
 
template<typename Container , typename UnaryPredicate >
bool smash::all_of (Container &&c, UnaryPredicate &&p)
 Convenience wrapper for std::all_of that operates on a complete container. More...
 
template<typename Container , typename UnaryFunction >
UnaryFunction smash::for_each (Container &&c, UnaryFunction &&f)
 Convenience wrapper for std::for_each that operates on a complete container. More...
 

Detailed Description

Generic algorithms on containers and ranges.

This file collects generic algorithms that follow the general idea of C++ algorithms as defined in the C++ standard library. These typically work with iterators from arbitrary containers.

The C++ standard itself categorizes algorithms into the following:

  • Non-modifying sequence operations
  • Mutating sequence operations
  • Sorting and related operations

Definition in file algorithms.h.