Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Network::Network(const Network& other)
- {
- this->_nodeList = other._nodeList;
- this->_inputNodeList = other._inputNodeList;
- this->_outputNodeList = other._outputNodeList;
- this->_globalActivation = other._globalActivation;
- }
- Network::Network(Network&& other) noexcept
- {
- this->_nodeList = other._nodeList;
- this->_inputNodeList = other._inputNodeList;
- this->_outputNodeList = other._outputNodeList;
- this->_globalActivation = other._globalActivation;
- // Deleting only _nodeList, the other 2 are just views and are not used in the destructor.
- for (size_t i = 0; i < other._nodeList.size(); i++)
- {
- other._nodeList[i] = nullptr;
- }
- }
- Network& Network::operator=(const Network& other)
- {
- return *this = Network(other);
- }
- Network& Network::operator=(Network&& other) noexcept
- {
- return *this = Network(other);
- }
Add Comment
Please, Sign In to add comment