hx3d
1
2D/3D Simple Game Framework
|
Useful algorithm helpers. More...
Functions | |
template<class Container , class Function > | |
void | apply (Container &container, Function func) |
Function application helper on a container. More... | |
template<class Source , class Dest > | |
void | clone (Source &src, Dest &dst) |
Clone a container. More... | |
template<class Container , class Type > | |
Type | reduce (Container &container, Type init) |
Apply a simple reduce. More... | |
template<class Container , class Type , class Operation > | |
Type | reduce (Container &container, Type init, Operation operation) |
Apply a reduce operation. More... | |
Useful algorithm helpers.
void hx3d::algo::apply | ( | Container & | container, |
Function | func | ||
) |
Function application helper on a container.
container | Container |
func | Function |
Example code
Definition at line 25 of file algorithm.inl.hpp.
void hx3d::algo::clone | ( | Source & | src, |
Dest & | dst | ||
) |
Clone a container.
src | Source container |
dst | Destination container |
Definition at line 30 of file algorithm.inl.hpp.
Type hx3d::algo::reduce | ( | Container & | container, |
Type | init | ||
) |
Apply a simple reduce.
container | Container |
init | Base value |
Definition at line 35 of file algorithm.inl.hpp.
Type hx3d::algo::reduce | ( | Container & | container, |
Type | init, | ||
Operation | operation | ||
) |
Apply a reduce operation.
container | Container |
init | Base value |
operation | Operation |
Definition at line 40 of file algorithm.inl.hpp.