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

◆ addDivide()

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

Definition at line 44 of file SLP.cpp.

45{
46 mNodes.push_back(Divide);
47 if (a->len != 2) ERROR("Divide expected two arguments");
48 for (int i = 0; i < 2; i++)
49 mInputPositions.push_back(a->array[i] -
50 static_cast<GATE_POSITION>(mNodes.size()) + 1);
51 return static_cast<GATE_POSITION>(mNodes.size()) - 1;
52}
std::vector< GATE_POSITION > mInputPositions
Definition SLP-defs.hpp:98
int GATE_POSITION
Definition SLP-defs.hpp:93
std::vector< GATE_TYPE > mNodes
Definition SLP-defs.hpp:95
const int ERROR
Definition m2-mem.cpp:55

References Divide, ERROR, mInputPositions, and mNodes.

Referenced by rawSLPDivideGate().