@Override
	public void setStructure(boolean[][] adjMatrix) throws RuntimeException {
		
		if( adjMatrix.length != nodeIndexing.getNodesNumber() || adjMatrix[0].length != nodeIndexing.getNodesNumber())
			throw new IllegalArgumentException("Error: the adjacency matrix must be an NxN matrix where N is the number of nodes in the general indexing");
		
		for(int i = 0; i < this.nodeIndexing.getNodesNumber(); ++i) {
			if( this.getNode(i) == null)
				throw new RuntimeException("Error: not all the nodes defined in the general indexing are set");
			this.getNode(i).removeAllParents();
		}
		
		for(int i = 0; i < adjMatrix.length; ++i) {
			NodeType parentNode = this.getNode(i);
			for(int j = 0; j < adjMatrix[0].length; ++j)
				if( adjMatrix[i][j])
					parentNode.addChild(this.getNode(j));
		}
	}