/** * This function will remove all the inputs to this unit. * In doing so it will also terminate the connections at the other end. */ public void removeAllInputs() { for (int noa = 0; noa < m_numInputs; noa++) { //this command will simply remove any connections this node has //with the other in 1 go, rather than seperately. m_inputList[noa].disconnectOutput(this, -1); } //now reset the inputs. m_inputList = new NeuralConnection[0]; setType(getType() & (~INPUT)); if (getNumOutputs() == 0) { setType(getType() & (~CONNECTED)); } m_inputNums = new int[0]; m_numInputs = 0; }
/** * This function will remove all the inputs to this unit. * In doing so it will also terminate the connections at the other end. */ public void removeAllInputs() { for (int noa = 0; noa < m_numInputs; noa++) { //this command will simply remove any connections this node has //with the other in 1 go, rather than seperately. m_inputList[noa].disconnectOutput(this, -1); } //now reset the inputs. m_inputList = new NeuralConnection[0]; setType(getType() & (~INPUT)); if (getNumOutputs() == 0) { setType(getType() & (~CONNECTED)); } m_inputNums = new int[0]; m_numInputs = 0; }
boolean stat1 = s.disconnectOutput(t, -1); boolean stat2 = t.disconnectInput(s, -1); if (stat1 && stat2) {
boolean stat1 = s.disconnectOutput(t, -1); boolean stat2 = t.disconnectInput(s, -1); if (stat1 && stat2) {
s.disconnectOutput(t, t.getNumInputs()); return false;
s.disconnectOutput(t, t.getNumInputs()); return false;