void Node::setTreeOutEdgeIndex(unsigned int index) { if(index<getOutSize() && index>=0) { treeOutEdgeIndex = index; } }
Edge* Node::getOutEdge(unsigned int index) { if(index<getOutSize() && index>=0) { return outEdges[index]; } return NULL; }
template <typename num_t> void Tensor<num_t>::setBlock(Matrix<num_t>& mat) { if (all_elem_.data() != mat.data()) { // std::cout << "ENTER setBlock" << std::endl; if (mat.row() == getInSize() && mat.col() == getOutSize()) { std::copy(mat.data(),mat.data()+mat.row()*mat.col(),all_elem_.data()); } else { std::cout << "The Matrix do not correspond with the tensor bonds size\nPass the operation" << std::endl; } } return; }
template <typename num_t> Matrix<num_t> Tensor<num_t>::getBlock() { Matrix<num_t> tmp; tmp.point2other(all_elem_.data(),getInSize(),getOutSize()); return tmp; }