classdef (Abstract) FeatureTransform < classreg.learning.internal.DisallowVectorOps
%

%   Copyright 2016 The MathWorks, Inc.
    
    properties(Hidden)
        %Impl - Implementation object.
        %   The Impl property is of type FeatureTransformImpl that
        %   implements this feature transform method. In particular, it
        %   provides the implementation of the abstract methods listed in
        %   this class.
        Impl;
    end
    
    properties(GetAccess=public,SetAccess=protected,Dependent,Hidden)
        %ModelParams - Model parameters object.
        %   The ModelParams property is of type FeatureTransformParams that
        %   holds parameters used for training this model.
        ModelParams;
    end
    
    properties(GetAccess=public,SetAccess=protected,Dependent)
        %ModelParameters - Model parameters.
        %   The ModelParameters property is a structure that holds
        %   parameters used for training this model. You can access the
        %   properties of ModelParameters using the dot notation.
        %
        %   See also sparsefilt, rica.
        ModelParameters;
    end
    
    methods
        function mp = get.ModelParameters(this)
            mp = toStruct(this.Impl.ModelParams);
        end
        
        function mp = get.ModelParams(this)
            mp = this.Impl.ModelParams;
        end
    end
    
    methods(Abstract)
        transform(this,X,varargin);
    end
    
    methods(Hidden)
        function disp(this)
            % 1. Display class name.
            internal.stats.displayClassName(this);
            % 2. Display body.
            s = propsForDisp(this,[]);
            disp(s);
            % 3. Display links to methods and properties.
            internal.stats.displayMethodsProperties(this);
        end
        
        function s = propsForDisp(this,s)
        %propsForDisp - Create a structure with properties for display.
        %   s = propsForDisp(this,s) takes an object this of type
        %   FeatureTransform, and an optional struct s and adds fields to s
        %   for display purposes. s can be empty.
            
            % 1. Create empty struct if needed.
            if ( nargin < 2 || isempty(s) )
                s = struct;
            end
            
            % 2. Add common properties of feature transform objects to s.
            s.ModelParameters = this.ModelParameters;
        end
    end
    
end