Set the tournament size and the best-player-wins probability in
tournament selection.
@param size the size of tournament pool.
@param p the best-player-wins probability.
198681
public GeneticAlgorithm<T> setTournament(int size, double p) {
        if (size < 1) {
            throw new IllegalArgumentException("Invalid tournament size: " + size);
        }
        
        if (p < 0.5 || p > 1.0) {
            throw new IllegalArgumentException("Invalid best-player-wins probability: " + p);
        }
        
        tournamentSize = size;
        tournamentProbability = p;
        return this;
    }
399059
function(size) { 
        if (this.singleTile) {
            size = this.map.getSize();
            size.h = parseInt(size.h * this.ratio, 10);
            size.w = parseInt(size.w * this.ratio, 10);
        } 
        OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this, [size]);
    }
600019
@Override
    public void setLimitOfTokenSize(int size) {
        if (0 >= size) {
            throw new IllegalArgumentException("Invalid limit on token size: " + size);
        }
        this.limitTokenSize = size;
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Limit on token size now: " + this.limitTokenSize);
        }
    }
510045
public static void size(Map<?, ?> parameter, int size, String name) throws IllegalArgumentException {
		if (parameter.size() != size) {
			throw new IllegalArgumentException(String.format("%s size is not %d.", name, size));
		}
	}
1354000
public void setInputWidth(final int inputWidth) {
		if (inputWidth > 100) {
			throw new IllegalArgumentException(
					"inputWidth (" + inputWidth + ") cannot be greater than 100 percent.");
		}
		getOrCreateComponentModel().inputWidth = Math.max(0, inputWidth);
	}
171431
public void set( Point2D_F64 p1 , Point2D_F64 p2 ) {
		this.p1.set(p1);
		this.p2.set(p2);
	}
1164500
public void setImageSize(Point size) {
		Assert.isNotNull(size);
		Assert.isTrue(size.x >= 0 && size.y >= 0);
		fSize = size;
	}
859178
public void setRegionCoverageSize(int size){
        if(size < 0){
            return;
        }
        int lg = (int)Math.ceil(Math.log(size)/Math.log(2));
        //int lg = 31 - Integer.numberOfLeadingZeros(size);
        int newRegionCoverageSize = 1 << lg;
        int newRegionCoverageMask = newRegionCoverageSize - 1;
        RegionCoverage newCoverage = new RegionCoverage(newRegionCoverageSize);

        if(coverage != null){
            for(int i = 0; i < (end-start); i++){
                newCoverage.getA()[(int)((start+i)&newRegionCoverageMask)] = coverage.getA()[(int)((start+i)&regionCoverageMask)];
            }
        }

        regionCoverageSize = newRegionCoverageSize;
        regionCoverageMask = newRegionCoverageMask;
        coverage = newCoverage;
//        System.out.println("Region Coverage Mask : " + regionCoverageMask);
    }
269032
public void setCustomTickLabelFontSize(final double SIZE) {
        if (null == customTickLabelFontSize) {
            _customTickLabelFontSize = Helper.clamp(0.0, 72.0, SIZE);
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            customTickLabelFontSize.set(SIZE);
        }
    }
467806
private int setViewSize(int mode, int size, int drawableWidth) {
        int viewSize;
        switch (mode) {
            case MeasureSpec.EXACTLY:
                viewSize = size;
                break;

            case MeasureSpec.AT_MOST:
                viewSize = Math.min(drawableWidth, size);
                break;

            case MeasureSpec.UNSPECIFIED:
                viewSize = drawableWidth;
                break;

            default:
                viewSize = size;
                break;
        }
        return viewSize;
    }
926959
private static int sizeToInt(String size) {
		int position = size.indexOf('p');
		if (position < 0) {
			return Integer.parseInt(size);
		}
		return Integer.parseInt(size.substring(0, position));
	}
166253
private void setSizeRatio(double size) {
        double width = widthHeightRatio * size;
        double height = size / widthHeightRatio;
        if (width <= size) {
            setSize(width, size);
        } else if (height <= size) {
            setSize(size, height);
        } else {
            setSize(size, size);
        }
    }
312247
public void setValues(int[] values, int size)
  {
    if (size < 0 || size > values.length) {
      throw new IAE("Size[%d] should be between 0 and %d", size, values.length);
    }
    ensureSize(size);
    System.arraycopy(values, 0, expansion, 0, size);
    this.size = size;
  }
1340113
public void setSize (int width, int height) {
    rootElement.getStyle().setWidth(width, Unit.PX);
    rootElement.getStyle().setHeight(height, Unit.PX);
    // the frame buffer may be larger (or smaller) than the logical size, depending on whether
    // we're on a HiDPI display, or how the game has configured things (maybe they're scaling down
    // from native resolution to improve performance)
    Scale fbScale = new Scale(frameBufferPixelRatio);
    canvas.setWidth(fbScale.scaledCeil(width));
    canvas.setHeight(fbScale.scaledCeil(height));
    // set the canvas's CSS size to the logical size; the browser works in logical pixels
    canvas.getStyle().setWidth(width, Style.Unit.PX);
    canvas.getStyle().setHeight(height, Style.Unit.PX);
    viewportChanged(canvas.getWidth(), canvas.getHeight());
  }
376716
public void setValue(int size, float[] newValue) {
        if ( ((newValue.length%2) == 0) && ((newValue.length/2) == size)) {
            try {
                for (int i = 0; i < size; i++) {
                    value.set(i, new SFVec2f(newValue[i*3], newValue[i*3+1]));
                }
            }
            catch (IndexOutOfBoundsException e) {
                Log.e(TAG, "X3D MFVec2f setValue(size,newValue[]) out of bounds." + e);
            }
            catch (Exception e) {
                Log.e(TAG, "X3D MFVec2f setValue(size, newValue[]) exception " + e);
            }
        }
        else {
            Log.e(TAG, "X3D MFVec2f setValue() set with newValue[] length not multiple of 2, or equal to size parameter");
        }
    }
781539
public void setInput(float x[], float y[], int size) {
		if (x.length < size || y.length < size) {
			throw new IllegalArgumentException("Arrays too small for size.");
		}
		if (size < M) {
			throw new IllegalArgumentException("Not enough data points for M");
		}

		this.x = x;
		this.y = y;
		this.size = size;
		this.dj = Math.min(1, (int) Math.pow(size, 0.25));
		ascend = x[size - 1] >= x[0];
	}
711115
@Override
    public void setMaxBatchSize(final Integer maxBatchSize) {
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "setMaxBatchSize", maxBatchSize);
        }
        _maxBatchSize = maxBatchSize;
    }