uBlas - matrix comparison A == B -> how-to guide ...
5 May
2003
5 May
'03
1:03 p.m.
Sharing my effort in working with ublas ... Forgive me if this is described already somewhere - I could not find it immediately in the doc so I looked around in the code ; ) Matrix comparison is implemented using the equals() method defined in matrix_assign.hpp: bool equals (const matrix_expression<E1> &e1, const matrix_expression<E2> &e2) Code snippet: ublas::matrix<double> A(5,5), B(5,5); // Initialise A somehow init_matrix(A); B = A; // This does not compile ... bool equal = ( A == B ); // But this does (and it works ...) bool equal = ublas::equals ( A, B );
7876
Age (days ago)
7876
Last active (days ago)
0 comments
1 participants
participants (1)
-
geert_ceuppens