faunus
Classes | Namespaces | Functions | Variables
auxiliary.h File Reference

This file contains auxiliary functionality that have no dependencies other than STL and can hence be copied to other projects. More...

#include "average.h"
#include <nlohmann/json.hpp>
#include <ranges>
#include <functional>
#include <iterator>
#include <fstream>
#include <vector>
#include <string>
#include <sstream>
#include <concepts>
Include dependency graph for auxiliary.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Faunus::ordered_pair< T >
 Ordered pair where first<=second More...
 
class  Faunus::Quantize< Tfloat >
 Round and bin numbers for use with tables and histograms. More...
 
struct  Faunus::BasePointerVector< T >
 Helper class for storing vectors of base pointers. More...
 

Namespaces

 Faunus
 Cell list class templates.
 

Functions

template<std::integral TOut, std::floating_point TIn>
TOut Faunus::numeric_cast (const TIn number)
 Convert floating point number to integral number. More...
 
template<std::forward_iterator Titer, typename Tfunction , typename T = double, typename Taggregate_function >
Faunus::for_each_unique_pair (Titer begin, Titer end, Tfunction f, Taggregate_function aggregator=std::plus< T >())
 Iterate over pairs in container, call a function on the elements, and sum results. More...
 
template<std::ranges::range T>
Faunus::erase_range (T target, const T &values)
 Erase from target range all values found in values range.
 
template<std::floating_point T, std::integral Tint = int>
Tint Faunus::to_bin (T x, T dx=1)
 Round a floating point to integer for use with histogram binning. More...
 
template<StringStreamable T>
auto Faunus::splitConvert (const std::string &words)
 Convert space separated words into vector of type T. More...
 
template<std::ranges::range Range>
std::string Faunus::joinToString (const Range &values) requires StringStreamable< std
 Convert range of values into space separated string. More...
 
template<typename T >
void Faunus::to_json (nlohmann::json &j, const BasePointerVector< T > &b)
 
template<typename T >
void Faunus::from_json (const nlohmann::json &j, BasePointerVector< T > &b)
 

Variables

template<class T >
concept Faunus::StringStreamable
 

Detailed Description

This file contains auxiliary functionality that have no dependencies other than STL and can hence be copied to other projects.