Solved

# matrix class

Posted on 2003-11-30
541 Views
looking for a matrix class address

0
Question by:hermesc
• 7
• 4

LVL 30

Expert Comment

ID: 9845328
What do you mean by class address?
0

LVL 30

Expert Comment

ID: 9845330
// Here's a 2 dynamic matrix class

template < class T>
class dynamic_2d_array
{
public:
dynamic_2d_array(int row, int col):m_row(row),m_col(col), m_data((row!=0&&col!=0)?new T[row*col]:NULL){}
~dynamic_2d_array(){if(m_data) delete []m_data;}
inline T* operator[](int i) {return (m_data + (m_col*i));}
inline T const*const operator[](int i) const {return (m_data + (m_col*i));}
private:
const int m_row;
const int m_col;
T* m_data;
};
0

Author Comment

ID: 9845497

i need a matrix class
0

LVL 30

Expert Comment

ID: 9845518
Also check out the following links for matrix class:

Matrix class implemented using valarrays:
http://www.hep.ucl.ac.uk/atlas/atlfast/Doxygen/5.1.0/AtlfastUtils-00-00-10/Matrix_8h-source.html

blitz++:
http://www.oonumerics.org/blitz/

newmat:
http://www.robertnz.net/nm_intro.htm

Matrix Template Library (MTL):
http://www.osl.iu.edu/research/mtl/

boost libray multi-array class:
http://www.boost.org/libs/multi_array/doc/user.html
0

LVL 30

Expert Comment

ID: 9845534
>>i need a matrix class

Do you just need a class that can hold web address?

If so, you can use vector<string> object to hold a matrix of web address.

//Access item in array via following method.

0

LVL 30

Expert Comment

ID: 9845543
If that's not what you need, please provide much more details.

Spell out exactly what you need.
Tell us what is your requirement, and how you intend to use this matrix, so that we can have a better understanding of what you're looking for.
0

Author Comment

ID: 9845917
I need a website a web adress ( world wide web ) which there is a class ( or it may be a FTP!!!!! )!!!! ( a class which its purpuse is matrix! )
( matrix : not the matrix which keanu plays the matrix which we use in maths )

I hope it is clear now
0

Author Comment

ID: 9845930
I need a website a web adress ( world wide web ) which there is a class ( or it may be a FTP!!!!! )!!!! ( a class which its purpuse is matrix! )
( matrix : not the matrix which keanu plays the matrix which we use in maths )

I hope it is clear now

this class should be able to these operations

*,+,-, inverse , other basic matrix operations not the complex orthogonal or nonlinear ones ( or whatever you may think which is advanced )
0

LVL 30

Expert Comment

ID: 9845940
>>I hope it is clear now

I'm sorry, but you're still missing information.

When you say it's purpuse is matrix, what is the matrix suppose to do, and what is it suppose to store?

>>I need a website a web adress ( world wide web ) which there is a class

Which there is what class?
What is the class suppose to do?  What exactly is it's function.

Explain the what and how.
It might help if you give an example.
0

LVL 30

Accepted Solution

Axter earned 100 total points
ID: 9845956
>>*,+,-, inverse , other basic matrix operations not the complex orthogonal or nonlinear ones ( or whatever you may think which is advanced )

OK, now we're getting somewhere.

The STL valarray class is suppose to serve this purpose, but I wouldn't recommend it.
If you want to use the valarray class, see the following link:
http://www.hep.ucl.ac.uk/atlas/atlfast/Doxygen/5.1.0/AtlfastUtils-00-00-10/Matrix_8h-source.html

Otherwise try looking at the previous links I posted for matrix class.
0

Author Comment

ID: 9850638

axter

0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question