Set the number of significant figures used in the calculation of the bucket widths.

@param significantFigures the number of significant figures for the bucket widths
@return this histogram, useful for method-chaining
@see #DEFAULT_SIGNIFICANT_FIGURES
348246
public Histogram<T> setSignificantFigures( int significantFigures ) {
        if (significantFigures != this.significantFigures) {
            this.significantFigures = significantFigures;
            this.bucketWidth = null;
            this.buckets.clear();
        }
        return this;
    }
16517
public AbstractChart<T, S> addSerie(Serie serie) {
		Collection<Serie> series = getSeries();
		if (series == null) {
			series = new ArrayList<Serie>();
		}
		series.add(serie);
		return this;
	}
963671
public static float pixelsFromSpResource(Context context, @DimenRes int sizeRes) {
        final Resources res = context.getResources();
        return res.getDimension(sizeRes) / res.getDisplayMetrics().density;
    }
8107
@Override
	public double[][] getHistogram(int numberOfPoints, double standardDeviations) {
		double[] intervalPoints = new double[numberOfPoints];
		double[] anchorPoints	= new double[numberOfPoints+1];
		double center	= getAverage();
		double radius	= standardDeviations * getStandardDeviation();
		double stepSize	= (numberOfPoints-1) / 2.0;
		for(int i=0; i<numberOfPoints;i++) {
			double alpha = (-(double)(numberOfPoints-1) / 2.0 + i) / stepSize;
			intervalPoints[i]	= center + alpha * radius;
			anchorPoints[i]		= center + alpha * radius - radius / (2 * stepSize);
		}
		anchorPoints[numberOfPoints] = center + 1 * radius + radius / (2 * stepSize);

		double[][] result = new double[2][];
		result[0] = anchorPoints;
		result[1] = getHistogram(intervalPoints);

		return result;
	}
315117
private Dimension layoutSize(Container target, boolean preferred)
	{
	synchronized (target.getTreeLock())
	{
		//  Each row must fit with the width allocated to the containter.
		//  When the container width = 0, the preferred width of the container
		//  has not yet been calculated so lets ask for the maximum.

		int targetWidth = target.getSize().width;
		Container container = target;

		while (container.getSize().width == 0 && container.getParent() != null)
		{
			container = container.getParent();
		}

		targetWidth = container.getSize().width;

		if (targetWidth == 0)
			targetWidth = Integer.MAX_VALUE;

		int hgap = getHgap();
		int vgap = getVgap();
		Insets insets = target.getInsets();
		int horizontalInsetsAndGap = insets.left + insets.right + (hgap * 2);
		int maxWidth = targetWidth - horizontalInsetsAndGap;

		//  Fit components into the allowed width

		Dimension dim = new Dimension(0, 0);
		int rowWidth = 0;
		int rowHeight = 0;

		int nmembers = target.getComponentCount();

		for (int i = 0; i < nmembers; i++)
		{
			Component m = target.getComponent(i);

			if (m.isVisible())
			{
				Dimension d = preferred ? m.getPreferredSize() : m.getMinimumSize();

				//  Can't add the component to current row. Start a new row.

				if (rowWidth + d.width > maxWidth)
				{
					addRow(dim, rowWidth, rowHeight);
					rowWidth = 0;
					rowHeight = 0;
				}

				//  Add a horizontal gap for all components after the first

				if (rowWidth != 0)
				{
					rowWidth += hgap;
				}

				rowWidth += d.width;
				rowHeight = Math.max(rowHeight, d.height);
			}
		}

		addRow(dim, rowWidth, rowHeight);

		dim.width += horizontalInsetsAndGap;
		dim.height += insets.top + insets.bottom + vgap * 2;

		//	When using a scroll pane or the DecoratedLookAndFeel we need to
		//  make sure the preferred size is less than the size of the
		//  target containter so shrinking the container size works
		//  correctly. Removing the horizontal gap is an easy way to do this.

		Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target);

		if (scrollPane != null && target.isValid())
		{
			dim.width -= (hgap + 1);
		}

		return dim;
	}
	}
1116098
public void setScaleFactors( int ...scaleFactors ) {
		for( int i = 1; i < scaleFactors.length; i++ ){
			if( scaleFactors[i] % scaleFactors[i-1] != 0 ) {
				throw new IllegalArgumentException("Layer "+i+" is not evenly divisible by its lower layer.");
			}
		}

		// set width/height to zero to force the image to be redeclared
		bottomWidth = bottomHeight = 0;
		this.scale = scaleFactors.clone();
		checkScales();
	}
680773
public void setVisibleRowCount(int visibleRowCount) {
        sourceList.setVisibleRowCount(visibleRowCount);
        chosenList.setVisibleRowCount(visibleRowCount);
        helperList.setVisibleRowCount(visibleRowCount);

        // Ok, since we've haven't set a preferred size on the helper scroller,
        // we can use it's current preferred size for our two control lists.
        Dimension d = helperScroller.getPreferredSize();
        chosenPanel.setPreferredSize(d);
        sourcePanel.setPreferredSize(d);

    }
1068572
public DimensionKeyDescription withDimensions(java.util.Map<String, String> dimensions) {
        setDimensions(dimensions);
        return this;
    }
892309
public GBC insets(int top, int left, int bottom, int right)
    {
        this.insets = new Insets(top, left, bottom, right);

        return this;
    }
850633
public final void setPresetSize(int sizeType) {
        switch (sizeType) {
            case SMALL:
            case NORMAL:
            case LARGE:
            case CUSTOM:
                this.presetSizeType = sizeType;
                break;

            default:
                throw new IllegalArgumentException("Must use a predefined preset size");
        }

        requestLayout();
    }
869258
public function setFigures($figures)
    {
        if (is_int($figures) || (gettype($figures) === 'string' && Format::isVariableRef($figures))) {
            $this->figures = $figures;
        } else {
            $msg = "The figures argument must be an integer or a variable reference, '" . $figures . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
253829
public boolean setWidths(float widths[]) {
		if (widths.length != cells.length)
			return false;
		System.arraycopy(widths, 0, this.widths, 0, cells.length);
		float total = 0;
		calculated = false;
		for (int k = 0; k < widths.length; ++k) {
			PdfPCell cell = cells[k];
			
			if (cell == null) {
				total += widths[k];
				continue;
			}
			
			cell.setLeft(total);
			int last = k + cell.getColspan();
			for (; k < last; ++k)
				total += widths[k];
			--k;
			cell.setRight(total);
			cell.setTop(0);
		}
		return true;
	}
685804
public static LongMoments of(final LongMomentStatistics statistics) {
		return new LongMoments(
			statistics.getCount(),
			statistics.getMin(),
			statistics.getMax(),
			statistics.getSum(),
			statistics.getMean(),
			statistics.getVariance(),
			statistics.getSkewness(),
			statistics.getKurtosis()
		);
	}
461494
public Histogram toHistogram(final float[] breaks)
  {
    final double[] approximateBins = new double[breaks.length - 1];

    double prev = sum(breaks[0]);
    for (int i = 1; i < breaks.length; ++i) {
      double s = sum(breaks[i]);
      approximateBins[i - 1] = (float) (s - prev);
      prev = s;
    }

    return new Histogram(breaks, approximateBins);
  }
1353851
protected void setColumnsFinalWidth() {
        log.debug("Setting columns final width.");
        float factor;
        int printableArea = report.getOptions().getColumnWidth();

        //Create a list with only the visible columns.
        List visibleColums = getVisibleColumns();


        if (report.getOptions().isUseFullPageWidth()) {
            int columnsWidth = 0;
            int notRezisableWidth = 0;

            //Store in a variable the total with of all visible columns
            for (Object visibleColum : visibleColums) {
                AbstractColumn col = (AbstractColumn) visibleColum;
                columnsWidth += col.getWidth();
                if (col.isFixedWidth())
                    notRezisableWidth += col.getWidth();
            }


            factor = (float) (printableArea - notRezisableWidth) / (float) (columnsWidth - notRezisableWidth);

            log.debug("printableArea = " + printableArea
                    + ", columnsWidth = " + columnsWidth
                    + ", columnsWidth = " + columnsWidth
                    + ", notRezisableWidth = " + notRezisableWidth
                    + ", factor = " + factor);

            int acumulated = 0;
            int colFinalWidth;

            //Select the non-resizable columns
            Collection resizableColumns = CollectionUtils.select(visibleColums, new Predicate() {
                public boolean evaluate(Object arg0) {
                    return !((AbstractColumn) arg0).isFixedWidth();
                }

            });

            //Finally, set the new width to the resizable columns
            for (Iterator iter = resizableColumns.iterator(); iter.hasNext(); ) {
                AbstractColumn col = (AbstractColumn) iter.next();

                if (!iter.hasNext()) {
                    col.setWidth(printableArea - notRezisableWidth - acumulated);
                } else {
                    colFinalWidth = (new Float(col.getWidth() * factor)).intValue();
                    acumulated += colFinalWidth;
                    col.setWidth(colFinalWidth);
                }
            }
        }

        // If the columns width changed, the X position must be setted again.
        int posx = 0;
        for (Object visibleColum : visibleColums) {
            AbstractColumn col = (AbstractColumn) visibleColum;
            col.setPosX(posx);
            posx += col.getWidth();
        }
    }
521550
@SuppressWarnings("unused")
    public void setIndicatorWidth(int indicatorWidth) {
        mIndicatorWidth = indicatorWidth;
        mIndicatorRectangle.set(getPaddingLeft(), getPaddingTop(), getPaddingLeft() + mIndicatorWidth, getMeasuredHeight() - getPaddingBottom());
        requestLayout();
    }
1168048
public FindingStatistics withCountBySeverity(java.util.Map<String, Integer> countBySeverity) {
        setCountBySeverity(countBySeverity);
        return this;
    }