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).
NeuralNetwork.hpp
Go to the documentation of this file.
1 
9 #pragma once
10 
11 #include "Net.hpp"
12 #include "TrainingData.hpp"
13 
23 private:
24  std::vector<unsigned> topology;
25  Net myNet;
26  std::vector<double> inputVals;
27  std::vector<double> targetVals;
28  std::vector<double> resultVals;
29  int trainingPass = 0;
30 
31 public:
37  NeuralNetwork() = default;
38 
47  void loadTogology(const std::vector<unsigned>& topology);
48 
59  void Run(std::vector<double>& inputVals, std::vector<double>& targetVals, std::vector<double>& resultVals);
60 
72  std::vector<double> RunWithReturn(std::vector<double>& inputVals, std::vector<double>& targetVals, std::vector<double>& resultVals);
73 };
Defines the Net class for a neural network.
Declares the TrainingData class, which is responsible for reading and parsing training data from a fi...
Represents a neural network composed of layers of neurons.
Definition: Net.hpp:28
Manages a neural network's structure, data, and training process.
Definition: NeuralNetwork.hpp:22
void loadTogology(const std::vector< unsigned > &topology)
Loads the topology of the neural network.
Definition: NeuralNetwork.cpp:19
std::vector< double > RunWithReturn(std::vector< double > &inputVals, std::vector< double > &targetVals, std::vector< double > &resultVals)
Runs the network with input and target values, and returns the result.
Definition: NeuralNetwork.cpp:57
void Run(std::vector< double > &inputVals, std::vector< double > &targetVals, std::vector< double > &resultVals)
Runs a single training pass through the network.
Definition: NeuralNetwork.cpp:33
NeuralNetwork()=default
Default constructor for the NeuralNetwork class.