% Compile MEX C codes
%
% Copyright (c) 2014, Zhirong Yang (Aalto University)
% All rights reserved.

filenames = {...
    'compute_ee_obj_grad_repulsive_barneshut.c', ...
    'compute_linlog_obj_grad_repulsive_barneshut.c', ...
    'compute_mdsks_obj_grad_repulsive_barneshut.c', ...
    'compute_tsne_obj_grad_repulsive_barneshut.c', ...
    'compute_wtsne_obj_grad_repulsive_barneshut.c', ...
    'compute_ssne_obj_grad_repulsive_barneshut.c', ...
    'compute_sne_obj_grad_repulsive_barneshut.c', ...
    'compute_nerv_obj_grad_barneshut.c', ...
    };
nf = length(filenames);

for fi=1:nf
    filename = filenames{fi};
    mex('-largeArrayDims', filename, 'barnes_hut.c');
end

mex fastknn_mex.cpp

cd CMG_060211
MakeCMG;
cd ../minFunc_2012
mexAll
cd ..
