function T = prune_tree_points(T,A,B,min_points)
% PRUNE_TREE_POINTS prunes the decision tree T as follows:  if any decision
%	node misclassifies less than min_points points, then this decision
%	node will be made a leaf node.
%
%	T = prune_tree_points(T,A,B,min_points)
%
%	T : matrix representing the decision tree generated by MSM-T algorithm
%	A : matrix representing the point set A
%	B : matrix representing the point set B
%	min_points: the minimum allowable number of misclassified points at
%		a decision node.
%
%	ASSUME: the root node will never be pruned.

% n is the dimension of the points in set A,B
global n;
n = size(A,2);

% prune the tree
position = [ 1 ];
T = prune_points(T,A,B,min_points,0,[position, T(n+2,1)]); % prune left
T = prune_points(T,A,B,min_points,1,[position, T(n+3,1)]); % prune right

