|
PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
|
#include "Concepts.h"#include "Eigen.h"#include "pbat/Aliases.h"#include <concepts>#include <numeric>#include <random>#include <ranges>Go to the source code of this file.
Namespaces | |
| namespace | pbat |
| The main namespace of the library. | |
| namespace | pbat::common |
| Common functionality. | |
Functions | |
| template<CIndexRange R, std::integral TIndex = std::ranges::range_value_t<R>> | |
| auto | pbat::common::CumSum (R &&sizes) -> Eigen::Vector< TIndex, Eigen::Dynamic > |
| Cumulative sum of a range of integers. | |
| template<std::integral TIndex> | |
| auto | pbat::common::Counts (auto begin, auto end, TIndex ncounts) -> Eigen::Vector< TIndex, Eigen::Dynamic > |
| Counts the number of occurrences of each integer in a contiguous range. | |
| template<std::integral TIndex> | |
| auto | pbat::common::Shuffle (TIndex begin, TIndex end) -> Eigen::Vector< TIndex, Eigen::Dynamic > |
| Randomly shuffle a range of integers. | |
| template<std::integral TIndexB, std::integral TIndexE, class Func, class TIndex = std::common_type_t<TIndexB, TIndexE>> | |
| auto | pbat::common::Filter (TIndexB begin, TIndexE end, Func &&f) -> Eigen::Vector< TIndex, Eigen::Dynamic > |
| Filters a range of integers based on a predicate function. | |
| template<class TDerivedX, class TDerivedR, class TScalar = typename TDerivedX::Scalar, std::integral TIndex = typename TDerivedR::Scalar> | |
| auto | pbat::common::Repeat (Eigen::DenseBase< TDerivedX > const &x, Eigen::DenseBase< TDerivedR > const &r) -> Eigen::Vector< TScalar, Eigen::Dynamic > |
| Repeats elements of a vector according to a repetition vector. | |