Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

rs::gen_algo Namespace Reference

Some generic algorithms. More...


Compounds

struct  BubbleSort
 sorts an array of T with size N using inlined bubble-sort. More...

struct  BubbleSort< T, 1 >
 BubbleSort an array which contains one element. More...


Functions

template<class T> void swap (T &a, T &b)
 swap(a, b) swaps the contents of a and b. More...

template<class T> T min (const T &t1, const T &t2)
 min(a, b) returns the minimum of a and b. More...

template<class T> T max (const T &t1, const T &t2)
 max(a, b) returns the maximum of a and b. More...


Detailed Description

Some generic algorithms.

Function Documentation

void swap T &    a,
T &    b
[inline]
 

swap(a, b) swaps the contents of a and b.

Definition at line 11 of file generic_algo.h.

T min const T &    t1,
const T &    t2
 

min(a, b) returns the minimum of a and b.

Definition at line 14 of file generic_algo.h.

T max const T &    t1,
const T &    t2
 

max(a, b) returns the maximum of a and b.

Definition at line 16 of file generic_algo.h.


Contact me in case of errors or questions.
This documentation is powered by Doxygen.
(C) 2000-2002 Doxygen