Minsky
minsky::anonymous_namespace{operation.cc}::MulInputPort Struct Reference
Inheritance diagram for minsky::anonymous_namespace{operation.cc}::MulInputPort:
Inheritance graph
Collaboration diagram for minsky::anonymous_namespace{operation.cc}::MulInputPort:
Collaboration graph

Public Member Functions

void combineInput (double &x, double y) const override
 combine two input wires More...
 
 MulInputPort (Item &item)
 
double identity () const override
 input port value if no wire attached More...
 
- Public Member Functions inherited from minsky::MultiWireInputPort
bool multiWireAllowed () const override
 true if multiple wires are allowed to connect to an input port, such as an input port of an add operation. Irrelevant, otherwise More...
 
 MultiWireInputPort (Item &item)
 
- Public Member Functions inherited from minsky::InputPort
bool input () const override
 true if input port More...
 
 InputPort (Item &item)
 
- Public Member Functions inherited from minsky::Port
std::vector< Wire * > const & wires () const
 returns a vector of weak references to the wires attached to this port More...
 
std::size_t numWires () const
 
void eraseWire (Wire *)
 remove wire from wires. No ownership passed. More...
 
void deleteWires ()
 delete all attached wires More...
 
float x () const
 
float y () const
 
void moveTo (float x, float y)
 
 Port (Item &item)
 
 ~Port ()
 
double value () const
 value associated with this port More...
 
Units units (bool) const
 
Units checkUnits () const
 dimensional analysis with consistency check More...
 
Itemitem ()
 owner of this port More...
 
const Itemitem () const
 owner of this port More...
 

Detailed Description

Definition at line 52 of file operation.cc.

Constructor & Destructor Documentation

◆ MulInputPort()

minsky::anonymous_namespace{operation.cc}::MulInputPort::MulInputPort ( Item item)
inline

Definition at line 55 of file operation.cc.

MultiWireInputPort(Item &item)
Definition: port.h:117
Item & item()
owner of this port
Definition: port.h:66

Member Function Documentation

◆ combineInput()

void minsky::anonymous_namespace{operation.cc}::MulInputPort::combineInput ( double &  x,
double  y 
) const
inlineoverridevirtual

combine two input wires

Parameters
xinput to be updated
yinput to be combined with x

Reimplemented from minsky::Port.

Definition at line 54 of file operation.cc.

54 {x*=y;}
float y() const
Definition: port.cc:44
float x() const
Definition: port.cc:39

◆ identity()

double minsky::anonymous_namespace{operation.cc}::MulInputPort::identity ( ) const
inlineoverridevirtual

input port value if no wire attached

Reimplemented from minsky::Port.

Definition at line 56 of file operation.cc.

56 {return 1;}

The documentation for this struct was generated from the following file: