Aham! I think I get it. So what you plan to do is to have *only one* CMAPInference class, where the user selects in the constructor which type she wants to use (e.g. TreeMaxProduct). Then, the different methods to perform inference will be in the CMapInferImpl. Is that right?