


HIT_REMOVE_DUPLICATES Remove duplicates of xi-points before clustering.
-------------------------------------------------------------------------
DESCRIPTION
-------------------------------------------------------------------------
[topreserve,isequalto]=hit_remove_duplicates(LDs,xi)
-------------------------------------------------------------------------
INPUT
-------------------------------------------------------------------------
LDs: structure containing information about local datasets (LDs)
and local models
LDs.X{i}: matrix of regressors belonging to the i-th local dataset
(each row is a point).
LDs.y{i}: vector of outputs belonging to the i-th local dataset.
LDs.pos{i}: vector of indexes of datapoints in the i-th local
dataset, e.g. Xid(LDs.pos{i}(1),:) is the first regressor in the i-th
LD.
LDs.weights{i} weight associated to the i-th datapoint used in
weighted LS for computing mode PVs.
LDs.meanX{i} average of regressors in the i-th local dataset.
LDs.models{i} parameters of the i-th local model.
LDs.models_var{i} INVERSE variance of the i-th local model.
LDs.X_ivar{i} INVERSE of the variance of the the regressors in the
i-th LD.Xid: matrix containing the datapoints in the regressor set.
Each row is a datapoint.
xi: structure containing information about the xi-points (they are either
FVs or LPVs).
xi.points{i}: xi-point based on the i-th LDs.
xi.IR{i}: INVERSE of the covariance of the i-th xi-point.
xi.weights{i}: scalar confidence measure of the i-th feature vector.
-------------------------------------------------------------------------
OUTPUT
-------------------------------------------------------------------------
topreserve: indexes of xi-points that must be preserved.
isequalto{i}: indexes of xi-points that are equal to the point indexed by
topreserve(i). It can be an empty vector (if a point does not have
duplicates)