dsalglib
1.0.0
dsalglib is a ready to use data structures and algorithms library written in C++ . Object Oriented Template implementations are written.
Main Page
Namespaces
Classes
Files
File List
File Members
source
include
alginc.h
Go to the documentation of this file.
1
//
2
// Created by moghya_s on 10/1/2016.
3
//
4
5
#ifndef DSALGLIB_ALGINC_H
6
#define DSALGLIB_ALGINC_H
7
8
/*
9
* contains fundamental functions required
10
*/
11
12
namespace
dsa
13
{
14
15
16
template
<
typename
T>
17
inline
void
swapit
(T &x, T &y)
18
{
19
T t = x;
20
x = y;
21
y = t;
22
}
23
24
template
<
typename
T>
25
inline
T
maxof
(T x, T y)
26
{
27
T max;
28
max = (x > y) ? x : y;
29
return
max;
30
}
31
32
template
<
typename
T>
33
inline
T
minof
(T x, T y)
34
{
35
T min;
36
min = (x < y) ? x : y;
37
return
min;
38
}
39
40
}
41
#endif //DSALGLIB_ALGINC_H
dsa::swapit
void swapit(T &x, T &y)
Definition:
alginc.h:17
dsa
Definition:
alginc.h:12
dsa::minof
T minof(T x, T y)
Definition:
alginc.h:33
dsa::maxof
T maxof(T x, T y)
Definition:
alginc.h:25
Generated by
1.8.11