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: DGEA.m
    path of file: ./repos/PlatEMO/PlatEMO/Algorithms/Multi-objective optimization/DGEA
    
    the code of the file until where you have to start completion: classdef DGEA < ALGORITHM
% <multi/many> <real/integer> <large/none>
% Direction guided evolutionary algorithm
% operation ---   1 --- Operation of the environmental selection
% RefNo     ---  10 --- Number of reference vectors for offspring generation

%------------------------------- Reference --------------------------------
% C. He, R. Cheng, and D. Yazdan
    
function is written by Cheng He

    methods
        function main(Algorithm,Problem)
            %% Generate random population
            [operation, RefNo]= Algorithm.ParameterSet(1, 10);
            [V,Problem.N] = UniformPoint(Problem.N,Problem.M);
            Population    = Problem.Initialization();
            Offspring     = Problem.Initialization();
            Arc           = Population;

            %% Optimization
            while Algorithm.NotTerminated(Arc)
                [Population,FrontNo] = PreSelection([Population,Offspring],V,(Problem.FE/Problem.maxFE)^2,RefNo);
                Offspring = DirectionReproduction(Problem,Population,FrontNo,RefNo);
                switch operation
                    case 1 
                        Arc = subRVEA([Arc,Offspring],V,(Problem.FE/Problem.maxFE)^2);
                    case 2
                        Arc = subNSGAII([Arc,Offspring],Problem.N);
                    case 3 
                        Arc = subIBEA([Arc,Offspring],Problem.N,0.05);
                    case 4 
                        Arc = subSPEA2([Arc,Offspring],Problem.N);
                    otherwise
                        Arc = [Population,Offspring];	% Without selection
                end