|
Ublas : |
Subject: [ublas] Distinct rows in a matrix
From: Pawe³ Szlendak (ogee_at_[hidden])
Date: 2008-10-30 11:24:48
Greetings!
I've been recently wondering how to check how many unique rows a matrix
is made of?
To be more specific, having a matrix
A = [1 2 3; 4 5 6; 1 2 3]
I want to evaluate how many distinct rows it contains. In this simple
example the answer should be:
2 distinct rows -> [1 2 3], [4 5 6]
Is there some simple way to achieve this with ublas? I would like to
avoid having to iterate over each row and compare its contents with all
other rows. Is there some
built-in row comparison facility?
Any ideas?
Thanks,
Pawe³