www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@cset_lhs/checkPreview.m

    function ret = checkPreview(obj)
%CHECKPREVIEW Check whether a preview should be automatically generated.
%
%   RET = CHECKPREVIEW(OBJ) returns true if the cset_lhs defines a set of
%   points that can be chosen quickly enough that it is a good idea to show
%   a preview by default.
%
%   Note: in all cases the user will be able to override the default
%   preview setting, so this flag cannot be used to completely remove the
%   preview for a candidateset class.

%   Copyright 2007-2015 The MathWorks, Inc.

switch obj.alg
    case {'maximin', 'minimax'}
        Nmax = 1000;
    case 'discrepancy'
        Nmax = 500;
    case {'cdfvariance', 'cdfmaximum'}
        Nmax = 2500;
    otherwise
        Nmax = 500;
end
ret = (obj.N<=Nmax);