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
{
30
VariableValuePtr
m_input
;
31
public
:
32
VariableValuePtr
stock
;
33
VariableValue
&
input
() {assert(
m_input
->size()==
stock
->size());
return
*
m_input
;}
34
IntOp
*
operation
;
//< reference to the internal operation object
35
void
setInput
(
const
VariableValuePtr
&
input
) {
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
minsky::Integral::setInput
void setInput(const VariableValuePtr &input)
Definition:
integral.h:35
input
Definition:
input.py:1
minsky::Integral
An integral is an additional stock variable, that integrates its flow variable.
Definition:
integral.h:28
minsky::Integral::m_input
VariableValuePtr m_input
Definition:
integral.h:30
minsky::Integral::input
VariableValue & input()
Definition:
integral.h:33
minsky::VariableValuePtr
a shared_ptr that default constructs a default target, and is always valid
Definition:
variableValues.h:37
intOp.h
variableValues.h
minsky::Integral::stock
VariableValuePtr stock
Definition:
integral.h:32
minsky
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky's state cha...
Definition:
constMap.h:22
minsky::VariableValue
Definition:
variableValue.h:71
minsky::IntOp
Definition:
intOp.h:31
minsky::Integral::operation
IntOp * operation
Definition:
integral.h:34
engine
integral.h
Generated on Tue Mar 18 2025 13:00:33 for Minsky by
1.8.14