Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Smart_Lubobya
Beginner
84 Views

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.

0 Kudos
3 Replies
Judith_W_Intel
Employee
84 Views

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.

Smart_Lubobya
Beginner
84 Views

not clear. can someone else help
TimP
Black Belt
84 Views

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++.
Reply