diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-05-06 18:28:23 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-05-06 18:28:23 -0300 |
commit | 74d795cb074b6ae9aa93bcfacee8995d7e6d5945 (patch) | |
tree | ea56758240928de036e9632dde2fb94bb634ba08 /Project/ControlElement.h | |
parent | 412ddd0fa4a6e32651619897c8606d4cbaaa1ffa (diff) | |
download | PSP.git-74d795cb074b6ae9aa93bcfacee8995d7e6d5945.tar.gz PSP.git-74d795cb074b6ae9aa93bcfacee8995d7e6d5945.tar.xz PSP.git-74d795cb074b6ae9aa93bcfacee8995d7e6d5945.zip |
Streight control solver implemented
Buggy, running 2x... Why??
Diffstat (limited to 'Project/ControlElement.h')
-rw-r--r-- | Project/ControlElement.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Project/ControlElement.h b/Project/ControlElement.h index 8e377b2..e2b9a29 100644 --- a/Project/ControlElement.h +++ b/Project/ControlElement.h @@ -63,14 +63,13 @@ class ControlElement : public Element std::vector<Node*> GetNodeList() const { return m_nodeList; } virtual void DrawNodes() const; - void SetInput(double input) { m_input = input; } - double GetInput() const { return m_input; } - double GetOutput() const { return m_output; } - virtual bool Solve() { return false; } + virtual bool IsSolved() const { return m_solved; } + virtual void SetSolved(bool solved = true) { m_solved = solved; } + virtual bool Solve(double input) { return true; } + virtual double GetOutput() const { return m_output; } protected: std::vector<Node*> m_nodeList; - - double m_input = 0.0; + bool m_solved = false; double m_output = 0.0; }; |