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: Optimizer_PG.m
    path of file: ./repos/Swan/Topology Optimization/Optimizers/OptimizerUnconstrained
    
    the code of the file until where you have to start completion: classdef Optimizer_PG < Optimizer_Unconstrained
    
    properties  (GetAccess = public, SetAccess = private)
        optimality_tol
    end
    
    properties (GetAccess = public
    
function compute(obj)
            x_n      = obj.designVariable.value;
            gradient = obj.objectiveFunction.gradient;
            x_new = x_n-obj.lineSearch.value*gradient;
            ub = obj.upperBound*ones(length(x_n(:,1)),1);
            x2 = reshape(x_n,[],2); norm(x2(:,1)-x2(:,2))
            lb = obj.lowerBound*ones(length(x_n(:,1)),1);
            x_new = max(min(x_new,ub),lb);
            obj.designVariable.update(x_new);
            l2Norm = obj.designVariable.computeL2normIncrement();
            obj.optimalityCond = sqrt(l2Norm);
        end