Пример #1
0
  public ModelGraph generateModelGraph() throws ReflectionException {
    LBConfiguration lbConf = laboConf.getLBConfiguration(simDesc.getLBConfigurationId());

    SubLatticesConfiguration subConf = lbConf.getSubLatticesConfiguration();
    ModelGraphGenerator mGraphGen =
        (ModelGraphGenerator) Reflection.newInstance(subConf.getGeneratorClassName());

    LatticeDescription lattDesc = lbConf.getLatticeDescription();
    int[] size = lattDesc.getSize();
    Lattice latt = (Lattice) Reflection.newInstance(lattDesc.getClassName());
    LatticeDescriptor desc = latt.getLatticeDescriptor();
    mGraphGen.setParameters(size, subConf.getMinSubLatticesCount(), desc);

    return mGraphGen.generateModelGraph();
  }
Пример #2
0
  public Lattice getLatticeInstance() throws LBException {

    try {

      return (Lattice) Reflection.newInstance(latticeClass);

    } catch (Exception e) {

      throw new LBException("Could not instantiate lattice.", e);
    }
  }