Populates  an array with the probabilities associated with the outcomes of this sequece.
@param ps a pre-allocated array to use to hold the values of the probabilities of the outcomes for this sequence.
426302
public void getProbs(double[] ps) {
    for (int pi=0,pl=probs.size();pi<pl;pi++) {
      ps[pi] = ((Double) probs.get(pi)).doubleValue();
    }
  }
803366
public function populate_slots_with_sections() {
        $sections = array_values($this->sections);
        foreach ($sections as $i => $section) {
            if (isset($sections[$i + 1])) {
                $section->lastslot = $sections[$i + 1]->firstslot - 1;
            } else {
                $section->lastslot = count($this->slotsinorder);
            }
            for ($slot = $section->firstslot; $slot <= $section->lastslot; $slot += 1) {
                $this->slotsinorder[$slot]->section = $section;
            }
        }
    }
520462
@Override
  public final void setSpecifics(final SpecificsOfItem pSpecifics) {
    this.specifics = pSpecifics;
    if (this.itsId == null) {
      this.itsId = new ServiceSpecificsId();
    }
    this.itsId.setSpecifics(this.specifics);
  }
938951
public void process(Clustering<?> result1, Clustering<?> result2) {
    // Get the clusters
    final List<? extends Cluster<?>> cs1 = result1.getAllClusters();
    final List<? extends Cluster<?>> cs2 = result2.getAllClusters();

    // Initialize
    size1 = cs1.size();
    size2 = cs2.size();
    contingency = new int[size1 + 2][size2 + 2];
    noise1 = BitsUtil.zero(size1);
    noise2 = BitsUtil.zero(size2);

    // Fill main part of matrix
    {
      final Iterator<? extends Cluster<?>> it2 = cs2.iterator();
      for(int i2 = 0; it2.hasNext(); i2++) {
        final Cluster<?> c2 = it2.next();
        if(c2.isNoise()) {
          BitsUtil.setI(noise2, i2);
        }
        contingency[size1 + 1][i2] = c2.size();
        contingency[size1 + 1][size2] += c2.size();
      }
    }
    final Iterator<? extends Cluster<?>> it1 = cs1.iterator();
    for(int i1 = 0; it1.hasNext(); i1++) {
      final Cluster<?> c1 = it1.next();
      if(c1.isNoise()) {
        BitsUtil.setI(noise1, i1);
      }
      final DBIDs ids = DBIDUtil.ensureSet(c1.getIDs());
      contingency[i1][size2 + 1] = c1.size();
      contingency[size1][size2 + 1] += c1.size();

      final Iterator<? extends Cluster<?>> it2 = cs2.iterator();
      for(int i2 = 0; it2.hasNext(); i2++) {
        final Cluster<?> c2 = it2.next();
        int count = DBIDUtil.intersectionSize(ids, c2.getIDs());
        contingency[i1][i2] = count;
        contingency[i1][size2] += count;
        contingency[size1][i2] += count;
        contingency[size1][size2] += count;
      }
    }
  }
1317636
public function addRandomValues($SerieName = "Serie1", array $Options = [])
    {
        $Values = isset($Options["Values"]) ? $Options["Values"] : 20;
        $Min = isset($Options["Min"]) ? $Options["Min"] : 0;
        $Max = isset($Options["Max"]) ? $Options["Max"] : 100;
        $withFloat = isset($Options["withFloat"]) ? $Options["withFloat"] : false;

        for ($i = 0; $i <= $Values; $i++) {
            $Value = $withFloat ? rand($Min * 100, $Max * 100) / 100 : rand($Min, $Max);
            $this->addPoints($Value, $SerieName);
        }
    }
238918
function _ps(args, lineProcessor) {
  const output = runProgram('ps', args).trim();
  const result = [];
  _.each(output.split('\n'), line => {
    const process = lineProcessor(line);
    if (!process) return;
    // Normalize pid and ppid to be numbers
    _.each(['pid', 'ppid'], numericField => process[numericField] = parseInt(process[numericField], 10));
    result.push(process);
  });
  return result;
}
722879
private void resize(int s) {
        int[] n;
        int count;

        n = new int[s];
        count = (s < data.length)? s : data.length;
        System.arraycopy(data, 0, n, 0, count);
        data = n;
    }
1035061
public void setSortOrder(boolean[] ascending) {
		PdfObject o = get(PdfName.S);
		if (o instanceof PdfArray) {
			if (((PdfArray)o).size() != ascending.length) {
				throw new IllegalArgumentException("The number of booleans in this array doesn't correspond with the number of fields.");
			}
			PdfArray array = new PdfArray();
			for (int i = 0; i < ascending.length; i++) {
				array.add(new PdfBoolean(ascending[i]));
			}
			put(PdfName.A, array);
		}
		else {
			throw new IllegalArgumentException("You need a single boolean for this collection sort dictionary.");
		}
	}
547566
def addPendingResult( self, ps, jobid ):
        """"""
        k = self._parametersAsIndex(ps)

        # retrieve or create the result list
        if k in self._results.keys():
            rs = self._results[k]
        else:
            rs = []
            self._results[k] = rs

        # append the pending result's jobid
        rs.insert(0, jobid)

        # map job id to parameters to which it refers
        self._pending[jobid] = k
657419
public float[] calculate(float pSample[])
	{
		final int wAps = pSample.length / ss;
		int n2 = ss2;
//		int nu1 = nu - 1;
		int a = 0;

		for (int b=0; a<pSample.length; b++)
		{
			xre[b] = (long)(pSample[a]*FRAC_FAC);
			xim[b] = 0;
			a += wAps;
		}

		int x = 0;
		for (int l=1; l<=nu; l++)
		{
			for (int k=0; k<ss; k+=n2)
			{
				for (int i=1; i<=n2; i++)
				{
					final long c = fftCos[x];
					final long s = fftSin[x];
					final int kn2 = k + n2;
					final long tr = (xre[kn2]*c + xim[kn2]*s)>>FRAC_BITS;
					final long ti = (xim[kn2]*c - xre[kn2]*s)>>FRAC_BITS;
					xre[kn2] = xre[k] - tr;
					xim[kn2] = xim[k] - ti;
					xre[k] += tr;
					xim[k] += ti;
					k++;
					x++;
				}

			}

//			nu1--;
			n2 >>= 1;
		}

		for (int k=0; k<ss; k++)
		{
			final int r = fftBr[k];
			if (r > k)
			{
				final long tr = xre[k];
				final long ti = xim[k];
				xre[k] = xre[r];
				xim[k] = xim[r];
				xre[r] = tr;
				xim[r] = ti;
			}
		}

		mag[0] = ((float)((longSqrt(xre[0]*xre[0] + xim[0]*xim[0]))>>FRAC_BITS)) / ((float)ss);
		for (int i=1; i<ss2; i++)
			mag[i] = ((float)((longSqrt(xre[i]*xre[i] + xim[i]*xim[i])<<1)>>FRAC_BITS)) / ((float)ss);

		return mag;
	}
1164989
public static void fill(final Object[] array, final Object value) {
        //        final int n = array.length;
        //        if (n > 0) {
        //            array[0] = value;
        //        }
        //        for (int i = 1; i < n; i += i) {
        //           System.arraycopy(array, 0, array, i, ((n - i) < i) ? (n - i) : i);
        //        }
        for (int i=0; i<array.length; i++) {
            array[i] = value;
        }        
    }
1304155
public SortedClassProbability[] sortByDescendingClassProbability(BinomialModelPrediction p) {
    String[] domainValues = m.getDomainValues(m.getResponseIdx());
    double[] classProbabilities = p.classProbabilities;
    return sortByDescendingClassProbability(domainValues, classProbabilities);
  }
398356
@Override
	public void cacheResult(List<CPOptionValue> cpOptionValues) {
		for (CPOptionValue cpOptionValue : cpOptionValues) {
			if (entityCache.getResult(
						CPOptionValueModelImpl.ENTITY_CACHE_ENABLED,
						CPOptionValueImpl.class, cpOptionValue.getPrimaryKey()) == null) {
				cacheResult(cpOptionValue);
			}
			else {
				cpOptionValue.resetOriginalValues();
			}
		}
	}
1211011
public final void loadAll(Properties ps)
	{
		//表示如果Field是static的，则obj即便给它传值，JVM也会忽略的。还说明了，此入参在这种情况下可以为null
		for(Field f:getClass().getDeclaredFields())
		{
			try {
				setFiled(f,ps.getProperty(f.getName()));
			} catch (Exception e) {
				log.error(e.getMessage(),e);
			}
		}
	}
311892
public void setProbability(double v) {
    if (WordForm_Type.featOkTst && ((WordForm_Type)jcasType).casFeat_probability == null)
      jcasType.jcas.throwFeatMissing("probability", "com.digitalpebble.rasp.WordForm");
    jcasType.ll_cas.ll_setDoubleValue(addr, ((WordForm_Type)jcasType).casFeatCode_probability, v);}
302167
public double[] getSentenceProbabilities() {
    double[] sentProbArray = new double[sentProbs.size()];
    for (int i = 0; i < sentProbArray.length; i++) {
      sentProbArray[i] = ((Double) sentProbs.get(i)).doubleValue();
    }
    return sentProbArray;
  }
891296
public void setUnprocessedStatistics(java.util.Collection<UnprocessedStatistics> unprocessedStatistics) {
        if (unprocessedStatistics == null) {
            this.unprocessedStatistics = null;
            return;
        }

        this.unprocessedStatistics = new java.util.ArrayList<UnprocessedStatistics>(unprocessedStatistics);
    }