function OUTPUT= OD_MULTIPLICATIVE(INPUT,OPTIONS)

%% initializing
% local variables from input
V=INPUT.V;
nodes=INPUT.nodes;
weights=INPUT.weights;
OUTPUT.W=weights;
% local variables to be setted
gradflow_iteration=0;
gradient_res=OPTIONS.gradient_res_toll+1;
ind_positive_weights=ones(size(weights));
I=1:length(weights);
total_iterations=0; % counter of solutions of linear systems
% dimensions
N=size(INPUT.V,2);
M=size(INPUT.nodes,1);
M0=M;
% DECLARE OPTIMIZER OUTPUT
OUTPUT=OD_result;
% output variables that change size
OUTPUT.kkt_res=[];
% PRE-PROCESSING (ONLY IF OPTIONS.PREMULT>0)
% INITIAL GUESS BY MULTIPLICATIVE ALGORITHM
k=0;
kkt_res=OPTIONS.gradient_res_toll+1;
while and(k< OPTIONS.total_max_iterations , kkt_res>OPTIONS.gradient_res_toll)
    [~,B,~] = ONB(INPUT.V,weights.^(1/2));
    ind_posweights=weights>=OPTIONS.kkt_toll;
    ind_zeroweights=weights<OPTIONS.kkt_toll;
    if sum(ind_zeroweights)>0
        kkt_res=max(abs(min(min(1-B(ind_zeroweights)/N),0)),...
        max(abs(1-B(ind_posweights)/N)));
    else
        kkt_res=max(abs(1-B(ind_posweights)/N));
    end
    weights=weights.*B/N;
    OUTPUT.W=[OUTPUT.W,weights];
    OUTPUT.kkt_res=[OUTPUT.kkt_res,kkt_res];
    fprintf('MULT it %d\t kkt residual %g\n',...
        [k,kkt_res])
        
    k=k+1;
end