OptimalSamplingSingleShellCNLOΒΆ

% update gradients from an initial gradient set, such that the updated gradients are evenly distributed.
%
% INPUT
%   gradInitial       :  N x 3 gradient matrix, where each row is a point in sphere.
%   param.cartesian   :  true: use cartesian coordinate (with unit equality constraint);
%                        false: use spherical coordinate (no unit equality constraint)
%
%
% OUTPUT
%   grad              :  updated N x 3 gradient matrix.
%
% Copyright (c) 2014, Jian Cheng <jian.cheng.1983@gmail.com>