/** * This will connect the specified unit to be an output to this unit. * @param o The unit. * @param n It's connection number for this connection. * @return True if the connection was made, false otherwise. */ protected boolean connectOutput(NeuralConnection o, int n) { for (int noa = 0; noa < m_numOutputs; noa++) { if (o == m_outputList[noa]) { return false; } } if (m_numOutputs >= m_outputList.length) { //then allocate more space to it. allocateOutputs(); } m_outputList[m_numOutputs] = o; m_outputNums[m_numOutputs] = n; m_numOutputs++; return true; }
/** * This will connect the specified unit to be an output to this unit. * @param o The unit. * @param n It's connection number for this connection. * @return True if the connection was made, false otherwise. */ protected boolean connectOutput(NeuralConnection o, int n) { for (int noa = 0; noa < m_numOutputs; noa++) { if (o == m_outputList[noa]) { return false; } } if (m_numOutputs >= m_outputList.length) { //then allocate more space to it. allocateOutputs(); } m_outputList[m_numOutputs] = o; m_outputNums[m_numOutputs] = n; m_numOutputs++; return true; }