-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutilities.h
34 lines (25 loc) · 1.08 KB
/
utilities.h
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
33
34
/**
* @file utilities.h
* @author Al Timofeyev
* @date April 15, 2019
* @brief This utilities file is used as a helper file for ProcessFunctions.h
* and SearchAlgorithms.h, and to create matricies using the Mersenne Twister.
*/
#ifndef BENCHMARKFUNCTIONS_UTILITIES_H
#define BENCHMARKFUNCTIONS_UTILITIES_H
#define _USE_MATH_DEFINES // Uncomment if cmath constants are desirable, like M_PI.
#include <iostream>
#include <string>
#include <string.h>
#include <vector>
#include <cmath>
using namespace std;
/** Parses a string of numbers into a vector of doubles.*/
vector<double> parseStringDbl(string str, string delimiter);
/** Parses a string of numbers into a vector of integers.*/
vector<int> parseStringInt(string str, string delimiter);
/** Parses a string of characters into a vector of strings.*/
vector<string> parseStringStr(string str, string delimiter);
/** Preps the setup vector for the matrix of a function by resizing to size 3.*/
void prepForFunctionMatrix(vector<double> &setup);
#endif //BENCHMARKFUNCTIONS_UTILITIES_H