You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: StateSpaceSubdivisionFilter.m
    path of file: ./repos/libDirectional/lib/filters
    
    the code of the file until where you have to start completion: classdef StateSpaceSubdivisionFilter < AbstractHypercylindricalFilter
    properties
        apd StateSpaceSubdivisionGaussianDistribution = StateSpaceSubdivisionGaussianDistribution.empty
        % Initialize empty and let user overwrite it with setState
    end
    
    methods
        function setState(this, apd_)
            arguments
                this (1,1) StateSpaceSubdivisionFilter
                apd_ (1,1) StateSpaceSubdivisionGaussianDistribution
            end
            if ~isempty(this.apd)&&~isequal(numel(this.apd.gaussians),numel(apd_.gaussians))
                warning('LinPeriodic:NoComponentsDiffer','Number of components differ.');
            end
            this.apd = apd_;
        end
        
        function predictLinear(this, transitionDensity, covarianceMatrices, systemMatrices, linearInputVectors)
            arguments
                this (1,1) StateSpaceSubdivisionFilter
                transitionDensity % Transition density empty: Assume dirac (weights form identity matrix). (Do not check class allow it to stay empty.)
                covarianceMatrices (:,:,:,:) double = NaN(0,0,0,0) % If empty: Assume dirac, no covariance added
                systemMatrices (:,:,:,:) double = NaN(0,0,0,0) % If empty: Assume identity matrix
                linearInputVectors (:,1,
    
function update(this, likelihoodPeriodicGrid, likelihoodsLinear)
            arguments
                this (1,1) StateSpaceSubdivisionFilter
                % If likelihoodPeriodicGrid is empty: assume uniform
                % distribution on the bounded domain (i.e., measurement
                % does not contain any information about it)
                likelihoodPeriodicGrid
                % If likelihoodsLinear is empty: assume uniform
                % distribution on the bounded domain (i.e., measurement
                % does not contain any information about it)
                likelihoodsLinear (:,1) GaussianDistribution = GaussianDistribution.empty
            end
            if isa(likelihoodPeriodicGrid,'AbstractDistribution')
                likelihoodPeriodicGrid = likelihoodPeriodicGrid.pdf(this.apd.gd.getGrid())';
            end
            % Either have no grid values or as many as we have grid points
            assert(isempty(likelihoodPeriodicGrid) || isequal(size(likelihoodPeriodicGrid),size(this.apd.gd.gridValues)));
            assert(isempty(likelihoodsLinear) || all([likelihoodsLinear.dim]==this.apd.linD));
            % Either have zero linear distributions (assume uniform), or
            % have 1 (assume same for all regions) or as many as we have
            % regions
            assert(numel(likelihoodsLinear)<=1 || numel(likelihoodsLinear) == size(this.apd.gd.gridValues,1));
            if isempty(likelihoodPeriodicGrid) && isempty(likelihoodsLinear)
                warning('StateSpaceSubdivisionFilter:NoParamsForUpdate','Nothing to do for this update step.');
                return
            end