classdef CopulaParameterSpace < stats.internal.QuasiRandomParameterSpace
    %COPULAPARAMETERSPACE 
    %

    % Copyright 2022 The MathWorks, Inc.

    properties(Dependent = true)
        Options
    end

    properties(Access = protected)
        Options_ stats.internal.CopulaOptions = stats.internal.CopulaOptions
    end

    methods
        function obj = CopulaParameterSpace(varargin)
            %COPULAPARAMETERSPACE 
            %

            if ~license('test','Statistics_Toolbox') || isempty(ver('stats'))
                error(message('stats:sensitivity:general:errSample_CopulaStatsNoLicense'))
            end 

            obj = obj@stats.internal.QuasiRandomParameterSpace(varargin{:});
        end
        function value = get.Options(obj)
            value = obj.Options_;
        end
        function obj = set.Options(obj,newValue)
            obj.Options_ = newValue;
        end
        function obj = syncOptions(obj,newOptions)
            arguments
                obj stats.internal.CopulaParameterSpace
                newOptions stats.internal.CopulaOptions
            end
            opts = obj.Options; %To avoid setting obj.Options repeatedly
            opts.Family = newOptions.Family;
            opts.Type = newOptions.Type;
            opts.DOF = newOptions.DOF;
            obj.Options = opts;
        end
    end

    methods(Access = protected)
        function sampler = createSampler_(obj)
            sampler = stats.internal.sampler.CopulaParameterSpace(obj);
        end
    end
end
