2-D matrix class

2-D matrix class

x[4][4]= {3,6,89,9,1,6,7,10,23,1,2,17,13,21,20,4}, p[4][4]={21,16,2,10,2,45,3,9,12,23,8,19,25,2,6,7}

how can i use c++ class to manuplate the above matrix to:\\

a) do the transpose of X

B) Multiply x, p and the transpose of X.

want to clearly see how private, public, constructors, destructors, can be done; that is how the .h file, .cpp and the main file can be written.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You should find a publically available C++ matrix class such as one provided by www.boost.org.

For example, the matrix_expression class has a trans algorithm.

not clear. can someone else help

Clarity is not an attribute of C++ for such usage. I agree with Judith's suggestion that you use a popular class implementation, unless you are willing to drop out of C++.

Leave a Comment

Please sign in to add a comment. Not a member? Join today