-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMisc.h
More file actions
32 lines (23 loc) · 688 Bytes
/
Misc.h
File metadata and controls
32 lines (23 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
namespace Misc
{
int Random(int min, int max); //Returns a random number in the range (min, max)
template<typename T> void CopyArray(T* source, T* destination, int arraySize) /*
Copies the elements of the source to the destination*/
{
//Copying the elements
for (int a = 0; a < arraySize; ++a)
{
destination[a] = source[a];
}
}
signed char Signum(double x);
double Sigmoid(double x);
double DeSigmoid(double y);
double Tanh(double x);
double TanhInverse(double y);
double ReLu(double x);
double DeReLu(double y);
double Average(double* vals, int n);
int PowWrt10(double x); /*Returns the power of x wrt 10*/
}