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

◆ addMProduct()

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

Definition at line 26 of file SLP.cpp.

27{
28 mNodes.push_back(MProduct);
29 mNumInputs.push_back(a->len);
30 for (int i = 0; i < a->len; i++)
31 mInputPositions.push_back(a->array[i] -
32 static_cast<GATE_POSITION>(mNodes.size()) + 1);
33 return static_cast<GATE_POSITION>(mNodes.size()) - 1;
34}
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 MProduct.

Referenced by rawSLPProductGate().