function [B,elapse] = ITQ_compress(A, model)
%   This is a wrapper function of ITQ testing.
%
%	Usage:
%	[B,elapse] = ITQ_compress(A, model)
%
%	      A: Rows of vectors of data points. Each row is sample point
%     model: The model generated by ITQ_learn.
%
%	      B: The binary code of the input data A. Each row is sample point
%    elapse: The coding time (testing time).
%
%
%
%   version 2.0 --Nov/2016 
%   version 1.0 --Jan/2013 
%
%   Written by  Yue Lin (linyue29@gmail.com)
%               Deng Cai (dengcai AT gmail DOT com) 
%                                             

tmp_T = tic;

Ym = A * model.pc;
Ym = Ym * model.R;
B = (Ym > 0);

elapse = toc(tmp_T);
end
