Examples of IntListParameter


Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntListParameter

    protected BitSet labelIndices = null;

    @Override
    protected void makeOptions(Parameterization config) {
      super.makeOptions(config);
      IntListParameter labelIndicesP = new IntListParameter(LABEL_INDICES_ID, true);

      labelIndices = new BitSet();
      if(config.grab(labelIndicesP)) {
        List<Integer> labelcols = labelIndicesP.getValue();
        for(Integer idx : labelcols) {
          labelIndices.set(idx);
        }
      }
    }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntListParameter

        factory = factoryP.instantiateClass(config);
      }
    }

    protected void getLabelIndices(Parameterization config) {
      IntListParameter labelIndicesP = new IntListParameter(LABEL_INDICES_ID, true);

      labelIndices = new BitSet();
      if(config.grab(labelIndicesP)) {
        List<Integer> labelcols = labelIndicesP.getValue();
        for(Integer idx : labelcols) {
          labelIndices.set(idx);
        }
      }
    }
View Full Code Here

Examples of org.gudy.azureus2.ui.swt.config.IntListParameter

  Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority");
  String fpLabels[] = { MessageText.getString("ConfigView.text.all"),
      MessageText.getString("ConfigView.text.any") };
  int fpValues[] = { DefaultRankCalculator.FIRSTPRIORITY_ALL,
      DefaultRankCalculator.FIRSTPRIORITY_ANY };
  new IntListParameter(cArea, "StartStopManager_iFirstPriority_Type",
      fpLabels, fpValues);
  label = new Label(cArea, SWT.NULL);
  Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.following");

    // row
    label = new Label(cFP, SWT.NULL);
    Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.shareRatio");
    String minQueueLabels[] = new String[55];
    int minQueueValues[] = new int[55];
    minQueueLabels[0] = "1:2 (" + 0.5 + ")";
    minQueueValues[0] = 500;
  minQueueLabels[1] = "3:4 (" + 0.75 +")";
  minQueueValues[1] = 750;
  minQueueLabels[2] = "1:1";
  minQueueValues[2] = 1000;
  minQueueLabels[3] = "5:4 (" + 1.25 +")";
  minQueueValues[3] = 1250;
  minQueueLabels[4] = "3:2 (" + 1.50 +")";
  minQueueValues[4] = 1500;
  minQueueLabels[5] = "7:4 (" + 1.75 +")";
  minQueueValues[5] = 1750;
    for (int i = 6; i < minQueueLabels.length; i++) {
      minQueueLabels[i] = i - 4 + ":1";
      minQueueValues[i] = (i - 4) * 1000;
    }
    new IntListParameter(cFP, "StartStopManager_iFirstPriority_ShareRatio",
                         minQueueLabels, minQueueValues);

  String sMinutes = MessageText.getString("ConfigView.text.minutes");
    String sHours = MessageText.getString("ConfigView.text.hours");
 
    // row
    label = new Label(cFP, SWT.NULL);
    Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.DLMinutes");

    String dlTimeLabels[] = new String[15];
    int dlTimeValues[] = new int[15];
    dlTimeLabels[0] = MessageText.getString("ConfigView.text.ignore");
    dlTimeValues[0] = 0;
    for (int i = 1; i < dlTimeValues.length; i++) {
      dlTimeLabels[i] = "<= " + (i + 2) + " " + sHours ;
      dlTimeValues[i] = (i + 2) * 60;
    }
    new IntListParameter(cFP, "StartStopManager_iFirstPriority_DLMinutes",
                         dlTimeLabels, dlTimeValues);
 
  label = new Label(cFirstPriorityArea, SWT.WRAP);
 
    // row
    label = new Label(cFP, SWT.NULL);
    Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.seedingMinutes");

    String seedTimeLabels[] = new String[15];
    int seedTimeValues[] = new int[15];
    seedTimeLabels[0] = MessageText.getString("ConfigView.text.ignore");
    seedTimeValues[0] = 0;
    seedTimeLabels[1] = "<= 90 " + sMinutes;
    seedTimeValues[1] = 90;
    for (int i = 2; i < seedTimeValues.length; i++) {
      seedTimeLabels[i] = "<= " + i + " " + sHours ;
      seedTimeValues[i] = i * 60;
    }
    new IntListParameter(cFP, "StartStopManager_iFirstPriority_SeedingMinutes",
                         seedTimeLabels, seedTimeValues);

 
 
//   Group Ignore FP
 
    Composite cIgnoreFP = new Group(cFirstPriorityArea, SWT.NULL);
    layout = new GridLayout();
    layout.numColumns = 2;
    layout.verticalSpacing = 6;
  cIgnoreFP.setLayout(layout);
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
  cIgnoreFP.setLayoutData(gridData);
    Messages.setLanguageText(cIgnoreFP, "ConfigView.label.seeding.firstPriority.ignore");
 
  // Ignore S:P Ratio
  label = new Label(cIgnoreFP, SWT.NULL);
  Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.ignoreSPRatio");
  String ignoreSPRatioLabels[] = new String[15];
    int ignoreSPRatioValues[] = new int[15];
  ignoreSPRatioLabels[0] = MessageText.getString("ConfigView.text.ignore");
  ignoreSPRatioValues[0] = 0;
    for (int i = 1; i < ignoreSPRatioLabels.length; i++) {
    ignoreSPRatioLabels[i] = i * 10 + " " + ":1" ;
    ignoreSPRatioValues[i] = i * 10;
    }
  new IntListParameter(cIgnoreFP, "StartStopManager_iFirstPriority_ignoreSPRatio", 0,
              ignoreSPRatioLabels, ignoreSPRatioValues);

  //   Ignore 0 Peers
    new BooleanParameter(cIgnoreFP,
                         "StartStopManager_bFirstPriority_ignore0Peer",
                         "ConfigView.label.seeding.firstPriority.ignore0Peer");

    label = new Label(cIgnoreFP, SWT.NULL);

    // Ignore idle hours
    label = new Label(cIgnoreFP, SWT.NULL);
    Messages.setLanguageText(label,
        "ConfigView.label.seeding.firstPriority.ignoreIdleHours");
    int[] availIdleHours = { 2, 3, 4, 5, 6, 7, 8, 12, 18, 24, 48, 72, 168 };
    String ignoreIdleHoursLabels[] = new String[availIdleHours.length + 1];
    int ignoreIdleHoursValues[] = new int[availIdleHours.length + 1];
    ignoreIdleHoursLabels[0] = MessageText.getString("ConfigView.text.ignore");
    ignoreIdleHoursValues[0] = 0;
    for (int i = 0; i < availIdleHours.length; i++) {
      ignoreIdleHoursLabels[i + 1] = availIdleHours[i] + " " + sHours;
      ignoreIdleHoursValues[i + 1] = availIdleHours[i];
    }
    new IntListParameter(cIgnoreFP,
        "StartStopManager_iFirstPriority_ignoreIdleHours", 0,
        ignoreIdleHoursLabels, ignoreIdleHoursValues);

  //   row
  cArea1 = new Composite(cIgnoreFP, SWT.NULL);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.