Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

2-D matrix class

Smart_Lubobya
Beginner
340 Views

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
340 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.

0 Kudos
Smart_Lubobya
Beginner
340 Views
not clear. can someone else help
0 Kudos
TimP
Honored Contributor III
340 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++.
0 Kudos
Reply