octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Deprecate is_duplicate_entry?


From: Rik
Subject: Deprecate is_duplicate_entry?
Date: Wed, 02 Mar 2011 12:43:26 -0800

3/2/11

John,

Can we deprecate this function?  It is a logical test of whether there are
any duplicates in a vector, but it only works on numeric vectors.  The
function unique.m is more versatile operating on vectors, cellstrs, and
with more options such as 'rows'.  Moreover, if is_duplicate_entry returns
true then one still has to go to the work of finding out what those
duplicates are which basically involves calling unique.m.  It seems like
the following code snippet would be more useful if anyone needs to test for
duplicates.

a = [big long vector];
b = unique (a);
is_duplicate_entry = numels (a) == numels (b);

Currently we are not using the function anywhere else in the codebase.

Cheers,
Rik


reply via email to

[Prev in Thread] Current Thread [Next in Thread]