Package org.jamesii.core.parameters

Examples of org.jamesii.core.parameters.ParameterBlock


          factory = selectedFactories.get(0);
        }
      }
    }

    return new Pair<>(new ParameterBlock(chosenURI, IURIHandling.URI), factory);
  }
View Full Code Here


    }

    List<IHighlighter> highlighters =
        HighlightingManager.getAvailableHighlightersFor(model);

    ParameterBlock par =
        new ParameterBlock(highlighters.get(0).getDocumentClass(),
            AbstractModelInfoProviderFactory.DOCUMENT_CLASS);

    List<IModelInfoProvider> infoProviders = new ArrayList<>();

    List<ModelInfoProviderFactory> list = null;
View Full Code Here

    // set (and will not be set again)
    asr = (AlgoSelectionRegistry) SimSystem.getRegistry();
  }

  public void testParameterBlockCopying() {
    ParameterBlock first = new ParameterBlock();
    first.addSubBl("B", new ParameterBlock());
    ParameterBlock second = new ParameterBlock("A");
    second.addSubBl("B", new ParameterBlock("C"));
    second.addSubBl("C", new ParameterBlock("D"));

    AlgoSelectionRegistry.copyValues(first, second);

    assertEquals("A", first.getValue());
    assertEquals(2, first.getSubBlocks().size());
View Full Code Here

   * @return the configured simple sim-space explorer
   */
  protected SimpleSimSpaceExplorer configureSimSpaceExplorer(
      SelectionTreeSet selectionTreeSet) {
    SimpleSimSpaceExplorer explorer =
        simSpExFactory.create(new ParameterBlock(selectionTreeSet,
            SimpleSimSpaceExplorerFactory.SELECTION_TREE_SET), SimSystem.getRegistry().createContext());
    explorer.setNumOfReplications(replications);
    explorer.setMaxModelSpaceElems(sampleSize);
    return explorer;
  }
View Full Code Here

   * .
   */
  public void testFactoryLookup() {

    assertEquals(0, asr.lookupFactories(null).size());
    assertEquals(0, asr.lookupFactories(new ParameterBlock()).size());

    ParameterBlock pb = new ParameterBlock();
    pb.addSubBl("test",
        new ParameterBlock(StochSearchPortfolioSelFactory.class.getName()));

    Set<Class<? extends Factory<?>>> facs = asr.lookupFactories(pb);
    assertEquals(1, facs.size());
    assertEquals(StochSearchPortfolioSelFactory.class, facs.iterator().next());
  }
View Full Code Here

          factory = selectedFactories.get(0);
        }
      }
    }

    return new Pair<>(new ParameterBlock(chosenURI, IURIHandling.URI), factory);
  }
View Full Code Here

   * Test failure tolerance setting.
   */
  public void testFailureTolerance() throws Exception {

    asr.setAndStoreFailureTolerance(FailureTolerance.ACCEPT_UNTESTED);
    ParameterBlock parameters = createFactoryInfoAndParameters();
    boolean nffExceptionCaught = false;
    try {
      asr.getFactory(AbstractProcessorFactory.class, parameters);
    } catch (NoFactoryFoundException e) {
      nffExceptionCaught = true;
View Full Code Here

    domFactory.setClassname(BestSimulatorInTheWorldFactory.class.getName());
    domFactory.setParameters(new ArrayList<IParameter>());

    asr.addNewFactoryManually(new BestSimulatorInTheWorldFactory(), domFactory);

    ParameterBlock parameters = new ParameterBlock();
    parameters.addSubBl(AbstractProcessorFactory.PARTITION, new Partition(
        new Model() {
          private static final long serialVersionUID = -2162741150899329228L;
        }, null, null));
    return parameters;
  }
View Full Code Here

public class SoftMaxTest extends TestPolicyPerformance {

  @Override
  protected Pair<MinBanditPolicyFactory, ParameterBlock> getPolicySetup() {
    return new Pair<MinBanditPolicyFactory, ParameterBlock>(
        new SoftMaxFactory(), new ParameterBlock());
  }
View Full Code Here

public class UCB1TunedTest extends TestPolicyPerformance {

  @Override
  protected Pair<MinBanditPolicyFactory, ParameterBlock> getPolicySetup() {
    return new Pair<MinBanditPolicyFactory, ParameterBlock>(
        new UCB1TunedFactory(), new ParameterBlock());
  }
View Full Code Here

TOP

Related Classes of org.jamesii.core.parameters.ParameterBlock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.