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>
Go to the source code of this file.
|
| | Faunus |
| | Cell list class templates.
|
| |
|
| 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 > |
| T | 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> |
| 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) |
| |
|
| template<class T > |
| concept | Faunus::StringStreamable |
| |
This file contains auxiliary functionality that have no dependencies other than STL and can hence be copied to other projects.