Update linearRegression to header file
This commit is contained in:
@ -7,13 +7,12 @@ OrderBookEntry::OrderBookEntry(
|
|||||||
std::string _product,
|
std::string _product,
|
||||||
OrderBookType _orderType,
|
OrderBookType _orderType,
|
||||||
std::string _username)
|
std::string _username)
|
||||||
:
|
: price(_price),
|
||||||
price(_price),
|
amount(_amount),
|
||||||
amount(_amount),
|
timestamp(_timestamp),
|
||||||
timestamp(_timestamp),
|
product(_product),
|
||||||
product(_product),
|
orderType(_orderType),
|
||||||
orderType(_orderType),
|
username(_username)
|
||||||
username(_username)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,8 @@ class Bot
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Bot(std::string filename);
|
Bot(std::string filename);
|
||||||
|
/** returns a vector with the Y, B0 and B1 values in the formula Y = B0 + B1.X */
|
||||||
|
std::vector<double> linearRegresion(std::vector<OrderBookEntry> orderList, unsigned int start, unsigned int end);
|
||||||
void Print(int intLimit);
|
void Print(int intLimit);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -22,7 +22,6 @@ public:
|
|||||||
* assumes the order was made by the owner of the wallet
|
* assumes the order was made by the owner of the wallet
|
||||||
*/
|
*/
|
||||||
void processSale(OrderBookEntry &sale);
|
void processSale(OrderBookEntry &sale);
|
||||||
|
|
||||||
/** generate a string representation of the wallet */
|
/** generate a string representation of the wallet */
|
||||||
std::string toString();
|
std::string toString();
|
||||||
friend std::ostream &operator<<(std::ostream &os, Wallet &wallet);
|
friend std::ostream &operator<<(std::ostream &os, Wallet &wallet);
|
||||||
|
|||||||
Reference in New Issue
Block a user