Ejemplo n.º 1
0
void Node::setTreeOutEdgeIndex(unsigned int index)
{
    if(index<getOutSize() && index>=0)
    {
        treeOutEdgeIndex = index;
    }
}
Ejemplo n.º 2
0
Edge* Node::getOutEdge(unsigned int index)
{
    if(index<getOutSize() && index>=0)
    {
        return outEdges[index];
    }
    return NULL;
}
Ejemplo n.º 3
0
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;
}
Ejemplo n.º 4
0
template <typename num_t> Matrix<num_t> Tensor<num_t>::getBlock() {
    Matrix<num_t> tmp;
    tmp.point2other(all_elem_.data(),getInSize(),getOutSize());
    return tmp;
}