|
Minsky: 3.17.0
|
#include <intOp.h>


Public Member Functions | |
| IntOp () | |
| IntOp (const IntOp &x) | |
| ~IntOp () | |
| IntOp & | operator= (const IntOp &x) |
| std::weak_ptr< Port > | ports (std::size_t i) const override |
| callback to be run when item deleted from group More... | |
| std::string | valueId () const |
| void | draw (cairo_t *) const override |
| draw this item into a cairo context More... | |
| void | resize (const LassoBox &b) override |
| resize this item on the canvas More... | |
| bool | onKeyPress (int keySym, const std::string &utf8, int state) override |
| respond to key press events More... | |
| bool | toggleCoupled () |
| toggles coupled state of integration variable. Only valid for integrate More... | |
| bool | coupled () const |
| Units | units (bool) const override |
| compute the dimensional units More... | |
| void | pack (classdesc::pack_t &x, const std::string &d) const override |
| void | unpack (classdesc::unpack_t &x, const std::string &d) override |
| std::string | description (const std::string &desc) |
| name of the associated integral variable More... | |
| std::string | description () const |
| name of the associated integral variable More... | |
Public Member Functions inherited from minsky::ItemT< IntOp, Operation< minsky::OperationType::integrate > > | |
| std::string | classType () const override |
| ItemT * | clone () const override |
| void | RESTProcess (classdesc::RESTProcess_t &rp, const std::string &d) override |
| void | RESTProcess (classdesc::RESTProcess_t &rp, const std::string &d) const override |
| void | json_pack (classdesc::json_pack_t &j) const override |
| ItemT ()=default | |
| ItemT (const ItemT &)=default | |
| ItemT (ItemT &&)=delete | |
| ItemT & | operator= (const ItemT &)=default |
| ItemT & | operator= (ItemT &&)=delete |
Public Member Functions inherited from minsky::Operation< minsky::OperationType::integrate > | |
| Type | type () const override |
| void | iconDraw (cairo_t *) const override |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *cairo) const |
| visual representation of operation on the canvas More... | |
| void | iconDraw (cairo_t *) const |
| visual representation of operation on the canvas More... | |
| std::size_t | numPorts () const override |
| Operation () | |
| Operation (const Operation &x) | |
| Operation (Operation &&x) | |
| Operation & | operator= (const Operation &x) |
| Operation & | operator= (Operation &&x) |
| std::string | classType () const override |
Public Member Functions inherited from minsky::ItemT< Operation< T >, OperationBase > | |
| void | RESTProcess (classdesc::RESTProcess_t &rp, const std::string &d) override |
| void | RESTProcess (classdesc::RESTProcess_t &rp, const std::string &d) const override |
| ItemT ()=default | |
| ItemT (const ItemT &)=default | |
| ItemT (ItemT &&)=delete | |
| ItemT & | operator= (const ItemT &)=default |
| ItemT & | operator= (ItemT &&)=delete |
Public Member Functions inherited from minsky::OperationBase | |
| const OperationBase * | operationCast () const override |
| OperationBase * | operationCast () override |
| std::string | portValues () const |
| returns a list of values the ports currently have More... | |
| bool | multiWire () const |
| virtual void | addPorts () |
| void | drawUserFunction (cairo_t *cairo) const |
| void | draw (cairo_t *) const override |
| draw this item into a cairo context More... | |
| void | resize (const LassoBox &b) override |
| resize this item on the canvas More... | |
| float | scaleFactor () const override |
| factor by which item has been resized More... | |
| double | value () const override |
| current value of output port More... | |
| std::vector< std::string > | dimensions () const |
| return dimension names of tensor object attached to input if binary op, then the union of dimension names is returned More... | |
| Units | units (bool check=false) const override |
| compute the dimensional units More... | |
Public Member Functions inherited from minsky::BottomRightResizerItem | |
| bool | onResizeHandle (float x, float y) const override |
| void | drawResizeHandles (cairo_t *cairo) const override |
| virtual Point | resizeHandleCoords () const |
| returns coordinates of the resizer handle More... | |
Public Member Functions inherited from minsky::Item | |
| Item ()=default | |
| std::size_t | portsSize () const |
| number of ports More... | |
| float | portX (std::size_t i) |
| float | portY (std::size_t i) |
| virtual bool | contains (float xx, float yy) const |
| bool | contains (const Point &p) const |
| void | updateBoundingBox () override |
| void | throw_error (const std::string &) const |
| mark item on canvas, then throw More... | |
| virtual bool | ioVar () const |
| indicates this is a group I/O variable More... | |
| double | rotation () const |
| double | rotation (const double &r) |
| std::pair< double, bool > | rotationAsRadians () const |
| return the rotation as radians, and whether rotation should have additional straight angle added for text that stays upright. More... | |
| float | iWidth () const |
| float | iWidth (const float &w) |
| float | iHeight () const |
| float | iHeight (const float &h) |
| virtual void | flip () |
| rotate icon though 180∘ More... | |
| std::string | id () const |
| return an id uniquely identifying this item More... | |
| virtual float | x () const |
| virtual float | y () const |
| virtual float | zoomFactor () const |
| void | ensureBBValid () const |
| float | width () const |
| float | height () const |
| virtual std::vector< Point > | corners () const |
| float | left () const |
| float | right () const |
| float | top () const |
| float | bottom () const |
| std::string | bookmarkId () const |
| Id of bookmark associated with this. More... | |
| void | adjustBookmark () const override |
| adjust bookmark list to reflect current configuration More... | |
| float | resizeHandleSize () const |
| resize handles should be at least a percentage if the icon size (#1025) More... | |
| virtual bool | inItem (float x, float y) const |
| virtual bool | onItem (float x, float y) const |
| returns true if (x,y) is on the icon More... | |
| virtual void | onMouseDown (float x, float y) |
| respond to mouse down events More... | |
| virtual void | onMouseUp (float x, float y) |
| respond to mouse up events More... | |
| virtual bool | onMouseMotion (float x, float y) |
| respond to mouse motion events with button pressed More... | |
| virtual bool | onMouseOver (float x, float y) |
| respond to mouse motion events (hover) without button pressed More... | |
| virtual void | onMouseLeave () |
| respond to mouse leave events (when mouse leaves item) More... | |
| virtual void | deleteAttachedWires () |
| delete all attached wires More... | |
| virtual bool | visible () const |
| whether this item is visible on the canvas. More... | |
| void | moveTo (float x, float y) |
| virtual float | scaleFactor (const float &sf) |
| void | dummyDraw () const |
| draw into a dummy cairo context, for purposes of calculating port positions More... | |
| virtual void | displayTooltip (cairo_t *, const std::string &) const |
| display tooltip text, eg on mouseover More... | |
| virtual void | updateIcon (double t) |
| update display after a step() More... | |
| Item (const Item &)=default | |
| Item & | operator= (const Item &)=default |
| virtual | ~Item () |
| void | drawPorts (cairo_t *cairo) const |
| virtual ClickType::Type | clickType (float x, float y) const |
| returns the clicktype given a mouse click at x, y. More... | |
| virtual std::shared_ptr< Port > | closestOutPort (float x, float y) const |
| returns closest output port to x,y More... | |
| virtual std::shared_ptr< Port > | closestInPort (float x, float y) const |
| virtual std::shared_ptr< Item > | select (float x, float y) const |
| returns the variable if point (x,y) is within a visible variable icon, null otherwise. More... | |
| void | RESTProcess (classdesc::RESTProcess_t &rp, const std::string &d) override |
| runs the RESTProcess descriptor suitable for this type More... | |
| void | RESTProcess (classdesc::RESTProcess_t &rp, const std::string &d) const override |
| virtual void | displayDelayedTooltip (float x, float y) |
| enable extended tooltip help message appropriate for mouse at (x,y) More... | |
| virtual void | disableDelayedTooltip () |
| virtual bool | editorMode () const |
| some items have an editor mode attribute More... | |
| virtual void | toggleEditorMode () |
| Units | checkUnits () const |
| perform units consistency checks More... | |
| ItemPtr | itemPtrFromThis () const |
| return a shared_ptr to this More... | |
| virtual void | destroyFrame () |
| destroy any popup windows associated with this More... | |
Public Member Functions inherited from minsky::NoteBase | |
| virtual std::string const & | detailedText () const |
| virtual std::string const & | detailedText (const std::string &x) |
| virtual std::string const & | tooltip () const |
| virtual std::string const & | tooltip (const std::string &x) |
| virtual | ~NoteBase ()=default |
Public Attributes | |
| VariablePtr | intVar |
| return reference to integration variable More... | |
Public Attributes inherited from minsky::OperationBase | |
| double | arg =1 |
| operation argument. For example, the offset used in a difference operator, or binsize in a binning op More... | |
| std::string | axis |
| axis selector in tensor operations More... | |
Public Attributes inherited from minsky::Item | |
| float | m_x =0 |
| float | m_y =0 |
| position in canvas, or within group More... | |
| float | m_sf =1 |
| scale factor of item on canvas, or within group More... | |
| bool | onResizeHandles =false |
| set to true to indicate mouse is ovcaler resize handles More... | |
| bool | onBorder =false |
| true to indicate mouse hovering over border More... | |
| std::string | deleteCallback |
| BoundingBox | bb |
| canvas bounding box. More... | |
Public Attributes inherited from minsky::NoteBase | |
| bool | mouseFocus =false |
| true if target of a mouseover More... | |
| bool | selected =false |
| true if selected for cut, copy or group operation More... | |
| bool | bookmark =false |
| Is this item also a bookmark? More... | |
Static Public Attributes | |
| static constexpr float | intVarOffset =10 |
Static Public Attributes inherited from minsky::OperationBase | |
| static constexpr float | l =-8 |
| static constexpr float | h =12 |
| static constexpr float | r =12 |
Private Types | |
| typedef ItemT< IntOp, Operation< minsky::OperationType::integrate > > | Super |
Private Member Functions | |
| CLASSDESC_ACCESS (IntOp) | |
| integration variable associated with this op. More... | |
| void | insertControlled (Selection &selection) override |
| void | removeControlledItems (minsky::GroupItems &) override |
Private Attributes | |
| bool | m_coupled =true |
Friends | |
| struct | SchemaHelper |
Additional Inherited Members | |
Public Types inherited from minsky::Operation< minsky::OperationType::integrate > | |
| typedef OperationType::Type | Type |
Public Types inherited from minsky::OperationBase | |
| typedef OperationType::Type | Type |
Public Types inherited from minsky::OperationType | |
| enum | Type { constant, time, integrate, differentiate, data, ravel, euler, pi, zero, one, inf, percent, add, subtract, multiply, divide, min, max, and_, or_, log, pow, polygamma, lt, le, eq, userFunction, copy, sqrt, exp, ln, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, abs, floor, frac, not_, Gamma, fact, sum, product, infimum, supremum, any, all, infIndex, supIndex, runningSum, runningProduct, difference, differencePlus, innerProduct, outerProduct, index, gather, meld, merge, slice, size, shape, mean, median, stdDev, moment, histogram, covariance, correlation, linearRegression, numOps } |
| enum | Group { general, constop, binop, function, reduction, scan, tensor, statistics } |
Static Public Member Functions inherited from minsky::OperationBase | |
| static OperationBase * | create (Type type) |
| factory method. More... | |
Static Public Member Functions inherited from minsky::Item | |
| static void | drawSelected (cairo_t *cairo) |
Static Public Member Functions inherited from minsky::OperationType | |
| static std::string | typeName (int type) |
| return the symbolic name of type More... | |
| static Group | classify (Type t) |
Protected Member Functions inherited from minsky::OperationBase | |
| void | setCachedText (cairo_t *, const std::string &, double) const |
| check if cachedPango is up to date, and if not recreate More... | |
Static Protected Member Functions inherited from minsky::Item | |
| static void | drawResizeHandle (cairo_t *cairo, double x, double y, double sf, double angle) |
Protected Attributes inherited from minsky::OperationBase | |
| classdesc::Exclude< std::shared_ptr< ecolab::Pango > > | cachedPango |
Protected Attributes inherited from minsky::Item | |
| double | m_width =20 |
| double | m_height =20 |
| ItemPortVector | m_ports |
| minsky::Item::MemoisedRotator | memoisedRotator |
|
private |
|
inline |
Definition at line 43 of file intOp.h.
References description().

|
inline |
Definition at line 47 of file intOp.h.
References description(), intVar, and minsky::Item::x().

|
inline |
|
private |
integration variable associated with this op.
|
inline |
| string minsky::IntOp::description | ( | const std::string & | desc | ) |
name of the associated integral variable
Definition at line 211 of file intOp.cc.
References minsky::Item::bb, minsky::Minsky::convertVarType(), description(), minsky::group, minsky::VariableType::integral, intVar, m_coupled, minsky::minsky(), minsky::Minsky::model, minsky::VariableValues::newName(), minsky::BoundingBox::update(), minsky::valueId(), and minsky::Minsky::variableValues.

|
inline |
name of the associated integral variable
Definition at line 54 of file intOp.h.
References intVar.
Referenced by description(), and IntOp().

|
overridevirtual |
draw this item into a cairo context
Reimplemented from minsky::Item.
Definition at line 37 of file intOp.cc.
References coupled(), minsky::Item::displayTooltip(), minsky::RenderVariable::draw(), minsky::DrawBinOp::drawPort(), minsky::Item::drawPorts(), minsky::BottomRightResizerItem::drawResizeHandles(), minsky::Item::drawSelected(), minsky::DrawBinOp::drawSymbol(), minsky::OperationBase::h, minsky::RenderVariable::height(), minsky::Item::iHeight(), intVar, intVarOffset, minsky::Item::iWidth(), minsky::OperationBase::l, M_PI, minsky::Item::m_ports, minsky::NoteBase::mouseFocus, minsky::Operation< minsky::OperationType::integrate >::numPorts(), minsky::Item::onResizeHandles, minsky::OperationBase::r, minsky::Item::rotation(), minsky::Item::rotationAsRadians(), minsky::OperationBase::scaleFactor(), minsky::NoteBase::selected, minsky::NoteBase::tooltip(), minsky::RenderVariable::width(), minsky::Item::x(), minsky::Item::y(), and minsky::Item::zoomFactor().

|
overrideprivate |
Definition at line 193 of file intOp.cc.
References minsky::Selection::ensureItemInserted(), and intVar.

|
inlineoverridevirtual |
respond to key press events
Reimplemented from minsky::Item.
Definition at line 72 of file intOp.h.
References intVar.
Definition at line 198 of file intOp.cc.
References intVar, minsky::ItemT< IntOp, Operation< minsky::OperationType::integrate > >::operator=(), and minsky::Item::x().

|
override |
Definition at line 314 of file intOp.cc.
References minsky::Item::x().

|
inlineoverridevirtual |
callback to be run when item deleted from group
return a weak reference to the ith port
Reimplemented from minsky::Item.
Definition at line 57 of file intOp.h.
References coupled(), intVar, and minsky::Item::ports().

|
overrideprivate |
Definition at line 205 of file intOp.cc.
References intVar, and minsky::GroupItems::removeItem().

|
overridevirtual |
resize this item on the canvas
Reimplemented from minsky::Item.
Definition at line 181 of file intOp.cc.
References minsky::Item::bb, minsky::Item::iHeight(), intVar, minsky::Item::iWidth(), minsky::Item::moveTo(), minsky::BoundingBox::update(), minsky::LassoBox::x0, minsky::LassoBox::x1, minsky::LassoBox::y0, minsky::LassoBox::y1, and minsky::Item::zoomFactor().

| bool minsky::IntOp::toggleCoupled | ( | ) |
toggles coupled state of integration variable. Only valid for integrate
Definition at line 282 of file intOp.cc.
References minsky::Item::bb, coupled(), minsky::group, minsky::OperationType::integrate, intVar, m_coupled, minsky::Item::m_ports, minsky::minsky(), minsky::Minsky::model, minsky::Item::rotation(), minsky::Operation< minsky::OperationType::integrate >::type(), and minsky::BoundingBox::update().

|
overridevirtual |
compute the dimensional units
| check | - if true, then perform consistency checks |
| if | check=true and dimensions inconsistent |
Reimplemented from minsky::Item.
Definition at line 29 of file intOp.cc.
References minsky::cminsky(), minsky::Item::m_ports, minsky::OperationBase::r, minsky::Simulation::timeUnit, and minsky::timeUnit.

|
override |
Definition at line 317 of file intOp.cc.
References minsky::Item::x().

|
inline |
Definition at line 63 of file intOp.h.
References intVar.
|
friend |
| VariablePtr minsky::IntOp::intVar |
return reference to integration variable
Definition at line 70 of file intOp.h.
Referenced by description(), draw(), insertControlled(), IntOp(), onKeyPress(), operator=(), ports(), removeControlledItems(), resize(), toggleCoupled(), and valueId().
|
static |
|
private |
Definition at line 36 of file intOp.h.
Referenced by coupled(), description(), and toggleCoupled().