Macaulay2 Engine
Loading...
Searching...
No Matches

◆ addMSum()

SLProgram::GATE_POSITION SLProgram::addMSum ( const M2_arrayint a)

Definition at line 17 of file SLP.cpp.

18{
19 mNodes.push_back(MSum);
20 mNumInputs.push_back(a->len);
21 for (int i = 0; i < a->len; i++)
22 mInputPositions.push_back(a->array[i] -
23 static_cast<GATE_POSITION>(mNodes.size()) + 1);
24 return static_cast<GATE_POSITION>(mNodes.size()) - 1;
25}
std::vector< GATE_POSITION > mInputPositions
Definition SLP-defs.hpp:98
int GATE_POSITION
Definition SLP-defs.hpp:93
std::vector< GATE_SIZE > mNumInputs
Definition SLP-defs.hpp:96
std::vector< GATE_TYPE > mNodes
Definition SLP-defs.hpp:95

References mInputPositions, mNodes, mNumInputs, and MSum.

Referenced by rawSLPSumGate().