SetUtils.hpp
auto indices(const std::vector< std::string > &names, const NamedValues &values) -> Indices
Return the indices of some entries in a container.
Definition: SetUtils.hxx:59
auto index(const T &value, const std::vector< T > &values) -> Index
Find the index of a value in a container of values.
Definition: SetUtils.hxx:21
auto names(const NamedValues &values) -> std::vector< std::string >
Return the names of the entries in a container.
Definition: Utils.hxx:22
auto extract(const std::vector< T > &values, const Indices &indices) -> std::vector< T >
Extract values from a vector given a list of indices.
Definition: SetUtils.hxx:233
auto unify(const std::vector< T > &values1, const std::vector< T > &values2) -> std::vector< T >
Determine the union of two containers.
Definition: SetUtils.hxx:110
auto equal(const Container &values1, const Container &values2) -> bool
Check if two containers are equal.
Definition: SetUtils.hxx:163
auto emptyDifference(const std::vector< T > &values1, const std::vector< T > &values2) -> bool
Check if two containers have empty difference.
Definition: SetUtils.hxx:154
auto indexAny(const Names &names, const NamedValues &values) -> Index
Return the index of the first entry in a container of named values with any of the given names.
Definition: SetUtils.hxx:47
auto emptyIntersection(const std::vector< T > &values1, const std::vector< T > &values2) -> bool
Check if two containers have empty intersection.
Definition: SetUtils.hxx:145
auto minValue(const Container &values) -> typename Container::value_type
Return the minimum value in a STL compatible container.
Definition: SetUtils.hxx:244
auto range(T first, T last, T step) -> std::vector< T >
Return a range of values.
Definition: SetUtils.hxx:191
auto filter(const std::vector< T > &values, Predicate predicate) -> std::vector< T >
Filter the values that pass on the predicate.
Definition: SetUtils.hxx:213
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto difference(const std::vector< T > &values1, const std::vector< T > &values2) -> std::vector< T >
Determine the difference of two containers.
Definition: SetUtils.hxx:133
auto isunique(Container values) -> bool
Check if a container has unique values.
Definition: SetUtils.hxx:174
std::vector< Index > Indices
Define a type that represents a collection of indices.
Definition: Index.hpp:29
auto contained(const Container &values1, const Container &values2) -> bool
Check if a value is contained in a container of values.
Definition: SetUtils.hxx:101
auto remove(const std::vector< T > &values, Predicate predicate) -> std::vector< T >
Remove the values that pass on the predicate.
Definition: SetUtils.hxx:223
auto maxValue(const Container &values) -> typename Container::value_type
Return the maximum value in a STL compatible container.
Definition: SetUtils.hxx:250
auto unique(std::vector< T > values) -> std::vector< T >
Create a container with unique values from another.
Definition: SetUtils.hxx:181
auto intersect(const std::vector< T > &values1, const std::vector< T > &values2) -> std::vector< T >
Determine the intersection of two containers.
Definition: SetUtils.hxx:121