-
Notifications
You must be signed in to change notification settings - Fork 0
/
unlimited.hpp
76 lines (58 loc) · 1.7 KB
/
unlimited.hpp
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// General use header file for unlimited
#ifndef UNLIMITED_H
#define UNLIMITED_H
#include <iostream>
using namespace std;
#include<valarray>
using namespace std;
#include<fstream>
using namespace std;
#include<string>
using namespace std;
#include<vector>
using namespace std;
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include <vector>
#include <algorithm>
#include <iterator>
#include<list>
#include <sys/stat.h>
// Edit this value to experiment with the data block size
// for the processing of data blocks
#define BUFFER_SIZE 240
typedef double* DoubleArrayPtr;
typedef char* CharArrayPtr;
// A structure is group of data elements grouped together under one name. These data elements known as members
// Declares a structure types, called Statistics, and defines it having 4 members: mean, variance, stddev, kurtosis each of a different fundamental type.
//This declaration creates a new type (Statistics), which is then used to declare three objects (variables) of this type
struct Statistics
{
double mean;
double variance;
double stddev;
double kurtosis;
};
struct dataContent
{
DoubleArrayPtr data;
DoubleArrayPtr memorydata;
int numberofvalues;
int datasize;
long int sizeoffile;
};
struct Morse
{
string alphabet;
string morseCode;
Morse(string alphabetName, string morseCodeValue) :
alphabet(alphabetName), morseCode(morseCodeValue)
{
}
};
struct dataContent decimate(struct dataContent);
struct dataContent readBinaryFile(CharArrayPtr);
void binfilewrite(struct dataContent);
void moments(struct dataContent, struct Statistics*);
#endif /* unlimited_hpp */