Minsky
integral.h
Go to the documentation of this file.
1 /*
2  @copyright Steve Keen 2016
3  @author Russell Standish
4  This file is part of Minsky.
5 
6  Minsky is free software: you can redistribute it and/or modify it
7  under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Minsky is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Minsky. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef INTEGRAL_H
21 #define INTEGRAL_H
22 #include "intOp.h"
23 #include "variableValues.h"
24 
25 namespace minsky
26 {
28  class Integral
29  {
31  public:
33  VariableValue& input() {assert(m_input->size()==stock->size()); return *m_input;}
34  IntOp* operation; //< reference to the internal operation object
36  m_input=input;
37  if (stock)
38  {
39  // redimension stock to that of the input
40  stock->index(m_input->index());
41  stock->hypercube(m_input->hypercube());
42  }
43  }
44  };
45 
46 }
47 
48 #endif
void setInput(const VariableValuePtr &input)
Definition: integral.h:35
Definition: input.py:1
An integral is an additional stock variable, that integrates its flow variable.
Definition: integral.h:28
VariableValuePtr m_input
Definition: integral.h:30
VariableValue & input()
Definition: integral.h:33
a shared_ptr that default constructs a default target, and is always valid
VariableValuePtr stock
Definition: integral.h:32
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky&#39;s state cha...
Definition: constMap.h:22
IntOp * operation
Definition: integral.h:34