Boost logo

Boost Users :

From: geert_ceuppens (gceuppens_at_[hidden])
Date: 2003-05-05 08:03:14


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 );


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net