Orderbook Simulation
OrderbookSim is a C++ application simulating a financial market order book. It efficiently manages and matches buy and sell orders while calculating the Volume-Weighted Average Price (VWAP).
TrainingData.hpp
Go to the documentation of this file.
1 
9 #pragma once
10 
11 #include <iostream>
12 #include <vector>
13 #include <fstream>
14 #include <string>
15 
23 class TrainingData {
24 public:
30  TrainingData(const std::string filename);
31 
37  bool isEof(void) { return _trainingDataFile.eof(); }
38 
47  void getTopology(std::vector<unsigned>& topology);
48 
57  unsigned getNextInputs(std::vector<double>& inputVals);
58 
67  unsigned getTargetOutputs(std::vector<double>& targetOutputsVals);
68 
69 private:
70  std::ifstream _trainingDataFile;
71 };
Manages reading and parsing of training data for neural network training.
Definition: TrainingData.hpp:23
void getTopology(std::vector< unsigned > &topology)
Reads the network topology from the training data file.
Definition: TrainingData.cpp:23
bool isEof(void)
Checks if the end of the training data file has been reached.
Definition: TrainingData.hpp:37
unsigned getNextInputs(std::vector< double > &inputVals)
Reads the next set of input values from the training data file.
Definition: TrainingData.cpp:72
unsigned getTargetOutputs(std::vector< double > &targetOutputsVals)
Reads the next set of target output values from the training data file.
Definition: TrainingData.cpp:97
TrainingData(const std::string filename)
Constructs a TrainingData object and opens the specified training data file.
Definition: TrainingData.cpp:59