protected Map<CmpVertex,CmpVertex> copyStatesAndTransitions(LearnerGraphND machineFrom, LearnerGraphND graphTo) {
Map<CmpVertex,CmpVertex> machineVertexToGraphVertex = new HashMap<CmpVertex,CmpVertex>();
graphTo.getTransitionMatrix().clear();
Set<CmpVertex> machineStates = machineFrom.getTransitionMatrix().keySet();
for (CmpVertex cmpVertex : machineStates) { //copy all vertices
CmpVertex newVertex = AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("o"+cmpVertex.getStringId()), graphTo.config);
DeterministicDirectedSparseGraph.copyVertexData(cmpVertex, newVertex);
machineVertexToGraphVertex.put(cmpVertex, newVertex);
}
graphTo.setInit(machineVertexToGraphVertex.get(machineFrom.getInit()));
AbstractLearnerGraph.addAndRelabelGraphs(machineFrom, machineVertexToGraphVertex, graphTo);