Initializes the ranges using all instances of the dataset.
Sets m_Ranges.

@return 		the ranges
333482
public double[][] initializeRanges() {
    if (m_Data == null) {
      m_Ranges = null;
      return m_Ranges;
    }
    
    int numAtt = m_Data.numAttributes();
    double[][] ranges = new double [numAtt][3];
    
    if (m_Data.numInstances() <= 0) {
      initializeRangesEmpty(numAtt, ranges);
      m_Ranges = ranges;
      return m_Ranges;
    }
    else {
      // initialize ranges using the first instance
      updateRangesFirst(m_Data.instance(0), numAtt, ranges);
    }
    
    // update ranges, starting from the second
    for (int i = 1; i < m_Data.numInstances(); i++)
      updateRanges(m_Data.instance(i), numAtt, ranges);

    m_Ranges = ranges;
    
    return m_Ranges;
  }
293919
protected function define_ranges() {

        $nparts = $this->get_number_parts();

        $rangeduration = ($this->analysable->get_end() - $this->analysable->get_start()) / $nparts;

        if ($rangeduration < $nparts) {
            // It is interesting to avoid having a single timestamp belonging to multiple time ranges
            // because of things like community of inquiry indicators, where activities have a due date
            // that, ideally, would fall only into 1 time range. If the analysable duration is very short
            // it is because the model doesn't contain indicators that depend so heavily on time and therefore
            // we don't need to worry about timestamps being present in multiple time ranges.
            $allowmultipleranges = true;
        }

        $ranges = array();
        for ($i = 0; $i < $nparts; $i++) {
            $start = $this->analysable->get_start() + intval($rangeduration * $i);
            $end = $this->analysable->get_start() + intval($rangeduration * ($i + 1));

            if (empty($allowmultipleranges) && $i > 0 && $start === $ranges[$i - 1]['end']) {
                // We add 1 second so each timestamp only belongs to 1 range.
                $start = $start + 1;
            }

            if ($i === ($nparts - 1)) {
                // Better to use the end for the last one as we are using floor above.
                $end = $this->analysable->get_end();
            }
            $ranges[$i] = array(
                'start' => $start,
                'end' => $end,
                'time' => $end
            );
        }

        return $ranges;
    }
1258598
public List<String> range(int start,int end){
        try {    		
        	return new ArrayList<>(getJedisCommands(groupName).zrange(key, start, end));
    	} finally{
			getJedisProvider(groupName).release();
		}
	}
171563
public List<ScanRange> unwrapped() {
        if (compare(_from, _to) < 0) {
            return ImmutableList.of(this);
        }
        ImmutableList.Builder<ScanRange> ranges = ImmutableList.builder();
        if (compare(_from, MAX_VALUE) < 0) {
            ranges.add(new ScanRange(_from, MAX_VALUE));
        }
        if (compare(_to, MIN_VALUE) > 0) {
            ranges.add(new ScanRange(MIN_VALUE, _to));
        }
        return ranges.build();
    }
785589
private function set_ranges()
    {
        $this->args['range'] = (int) $this->args['range'] - 1;
        $this->args['ceil'] = absint(\ceil($this->args['range'] / 2));
    }
1200919
protected void compactRanges() {
		boolean DEBUG = false;
		if (this.ranges == null || this.ranges.length <= 2)
			return;
		if (this.isCompacted())
			return;
		int base = 0; // Index of writing point
		int target = 0; // Index of processing point

		while (target < this.ranges.length) {
			if (base != target) {
				this.ranges[base] = this.ranges[target++];
				this.ranges[base + 1] = this.ranges[target++];
			} else
				target += 2;
			int baseend = this.ranges[base + 1];
			while (target < this.ranges.length) {
				if (baseend + 1 < this.ranges[target])
					break;
				if (baseend + 1 == this.ranges[target]) {
					if (DEBUG)
						System.err
								.println("Token#compactRanges(): Compaction: ["
										+ this.ranges[base] + ", "
										+ this.ranges[base + 1] + "], ["
										+ this.ranges[target] + ", "
										+ this.ranges[target + 1] + "] -> ["
										+ this.ranges[base] + ", "
										+ this.ranges[target + 1] + "]");
					this.ranges[base + 1] = this.ranges[target + 1];
					baseend = this.ranges[base + 1];
					target += 2;
				} else if (baseend >= this.ranges[target + 1]) {
					if (DEBUG)
						System.err
								.println("Token#compactRanges(): Compaction: ["
										+ this.ranges[base] + ", "
										+ this.ranges[base + 1] + "], ["
										+ this.ranges[target] + ", "
										+ this.ranges[target + 1] + "] -> ["
										+ this.ranges[base] + ", "
										+ this.ranges[base + 1] + "]");
					target += 2;
				} else if (baseend < this.ranges[target + 1]) {
					if (DEBUG)
						System.err
								.println("Token#compactRanges(): Compaction: ["
										+ this.ranges[base] + ", "
										+ this.ranges[base + 1] + "], ["
										+ this.ranges[target] + ", "
										+ this.ranges[target + 1] + "] -> ["
										+ this.ranges[base] + ", "
										+ this.ranges[target + 1] + "]");
					this.ranges[base + 1] = this.ranges[target + 1];
					baseend = this.ranges[base + 1];
					target += 2;
				} else {
					throw new RuntimeException(
							"Token#compactRanges(): Internel Error: ["
									+ this.ranges[base] + ","
									+ this.ranges[base + 1] + "] ["
									+ this.ranges[target] + ","
									+ this.ranges[target + 1] + "]");
				}
			} // while
			base += 2;
		}

		if (base != this.ranges.length) {
			int[] result = new int[base];
			System.arraycopy(this.ranges, 0, result, 0, base);
			this.ranges = result;
		}
		this.setCompacted();
	}
57595
private ArrayList<String> calculateRangeFromParameters(){
        ArrayList<String>allTheValues = new ArrayList<String>();
        int minSampleSizeInteger = Integer.parseInt(minSampleSize);
        int maxSampleSizeInteger = Integer.parseInt(maxSampleSize);
        int incrementInteger = Integer.parseInt(increment);
        for(int i=minSampleSizeInteger; i<maxSampleSizeInteger; i=i+incrementInteger){
            String value = Integer.toString(i) + " - " + Integer.toString(i+incrementInteger);
            allTheValues.add(value);
        }
        return allTheValues;
    }
1018892
public void setInitialClusters(List<? extends Cluster<? extends MeanModel>> initialMeans) {
    double[][] vecs = new double[initialMeans.size()][];
    for(int i = 0; i < vecs.length; i++) {
      vecs[i] = initialMeans.get(i).getModel().getMean();
    }
    this.initialMeans = vecs;
  }
23446
public java.util.List<Range> getProvisionedIops() {
        if (provisionedIops == null) {
            provisionedIops = new com.amazonaws.internal.SdkInternalList<Range>();
        }
        return provisionedIops;
    }
171707
RangeSet getConditions()
    {
        RangeSet is = new RangeSet();
        for (CharRange ic : transitions.keySet())
        {
            if (ic != null)
            {
                is.add(ic);
            }
        }
        return is;
    }
269069
public List<RowRange> getTransientRanges() {
    List<RowRange> ranges = new ArrayList<>();
    Iterator<String> keys = appConfig.getKeys(PREFIX.substring(0, PREFIX.length() - 1));
    while (keys.hasNext()) {
      String key = keys.next();
      String val = appConfig.getString(key);
      String[] sa = val.split(":");
      RowRange rowRange = new RowRange(Bytes.of(DatatypeConverter.parseHexBinary(sa[0])),
          Bytes.of(DatatypeConverter.parseHexBinary(sa[1])));
      ranges.add(rowRange);
    }
    return ranges;
  }
959214
function() {

      var ranges, i, sel, len;

      if (window.getSelection) {
        sel = window.getSelection();
        if (sel.getRangeAt && sel.rangeCount) {
          ranges = [];
          len = sel.rangeCount;
          for (i = 0; i < len; i += 1) {
            ranges.push(sel.getRangeAt(i));
          }
          return ranges;
        }
      } else if (document.selection && document.selection.createRange) {
        return document.selection.createRange();
      }
      return null;
    }
437416
public Set<Range> getRangeSet() {
        if (rangeSet != null) {
            return EnumSet.copyOf(rangeSet);
        }
        return Range.maskToRangeSet(mask);
    }
86689
private void setMeanDistancesToCentroids() {
        meanDistancesToCentroids = new HashMap<>();
        for (int i = 0; i < clusterCentroids.numInstances(); i++) {    //For each centroid
            int countAssignedInstances = 0;
            double sumDistancesToCentroid = 0.0;
            Instance centroidInstance = clusterCentroids.instance(i);
            for (int j = 0; j < trainingData.numInstances(); j++) {       //For each data point
                 if (i == centroidAssignments[j]) {
                     Instance valueInstance = trainingData.instance(j);
                     double distanceToCentroid = Math.abs(valueInstance.value(0) -
                                                    centroidInstance.value(0));
                     sumDistancesToCentroid += distanceToCentroid;
                     countAssignedInstances++;
                 }
            }
            double meanDistanceToCentroid = sumDistancesToCentroid / countAssignedInstances;
            meanDistancesToCentroids.put(centroidInstance, meanDistanceToCentroid);
        }
    }
22865
def ranges_to_set(lst):
    
    return set(itertools.chain(*(range(x[0], x[1]+1) for x in lst)))
1011244
public java.util.List<DBInstance> getDBInstances() {
        if (dBInstances == null) {
            dBInstances = new com.amazonaws.internal.SdkInternalList<DBInstance>();
        }
        return dBInstances;
    }
677361
public Map<String, Set<DataPoint>> getSeries() {
        return new HashMap<String, Set<DataPoint>>(store);
    }