KrisLibrary
1.0.0
|
Convenience routines for C arrays and STL vectors. More...
Functions | |
template<typename T > | |
void | copy (const T &a, T *out, int n) |
template<typename T > | |
void | copy (const T *a, T *out, int n) |
template<typename T , typename ftype > | |
void | foreach (T *a, ftype f, int n) |
template<typename T > | |
void | reverse (T *a, int n) |
template<typename t1 , typename t2 , typename ftype > | |
void | transform (const t1 *a, t2 *out, ftype f, int n) |
template<typename t1 , typename t2 , typename t3 , typename ftype > | |
void | binary_transform (const t1 *a, const t2 *b, t3 *out, ftype f, int n) |
template<typename T > | |
void | add (const T *a, const T *b, T *out, int n) |
template<typename T > | |
void | sub (const T *a, const T *b, T *out, int n) |
template<typename T > | |
void | mul (const T *a, const T *b, T *out, int n) |
template<typename T > | |
void | div (const T *a, const T *b, T *out, int n) |
template<typename T > | |
T | nth_element (const std::vector< T > &S, size_t n) |
returns the nth largest element in the array a | |
template<typename T , typename fless > | |
T | nth_element (const std::vector< T > &S, size_t n, fless less) |
returns the nth largest element in the array a | |
template<typename T > | |
bool | is_sorted (T *a, int n) |
template<typename T , typename fless > | |
bool | is_sorted (T *a, int n, fless f) |
template<typename T > | |
void | quicksort (T *a, int p, int r) |
template<typename T , typename fless > | |
void | quicksort (T *a, int p, int r, fless f) |
template<typename T > | |
void | sort (T *a, int n) |
template<typename T , typename fless > | |
void | sort (T *a, int n, fless f) |
template<class T > | |
void | concat (std::vector< T > &a, const std::vector< T > &b) |
Concatenates b onto the end of a. | |
Convenience routines for C arrays and STL vectors.
|
inline |
Utils
References copy().
Referenced by DisplacementPlanner::BuildRoadmap(), ResourceLibrary::ChangeBaseDirectory(), concat(), copy(), Geometry::PolytopeProjection2D::Create(), AnyCollection::enumerate_keys_dfs(), Meshing::FastMarchingMethod(), Meshing::FastMarchingMethod_Fill(), ContactFormation::flatten(), GetDefaultIKDofs(), GLDraw::GLRenderToImage::GetDepth(), Math::SparseMatrixTemplate_RM< T >::getEntry(), GLDraw::GLRenderToImage::GetRGBA(), RobotWithGeometry::Merge(), Geometry::NearestNeighborGraph(), AsyncReaderQueue::Reset(), ArrayND< T >::resize(), Statistics::GaussianMixtureModel::TrainEM(), and IncrementalMMPRM_Search::UpdatePriority().