[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

matrix class

Posted on 2003-11-30
11
Medium Priority
?
546 Views
Last Modified: 2010-04-01
looking for a matrix class address

0
Comment
Question by:hermesc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
11 Comments
 
LVL 30

Expert Comment

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

Expert Comment

by:Axter
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

by:hermesc
ID: 9845497
web address :=)

i need a matrix class
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Expert Comment

by:Axter
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

by:Axter
ID: 9845534
>>web address :=)
>>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.

std::vector<std::string>  MyWebAddressMatrix;

//Add address via following method:
MyWebAddressMatrix.push_back("www.experts-exchange.com");

//Access item in array via following method.

cout << MyWebAddressMatrix[0] << endl;

0
 
LVL 30

Expert Comment

by:Axter
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

by:hermesc
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

by:hermesc
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

by:Axter
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

by:
Axter earned 300 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

by:hermesc
ID: 9850638
thanks for your valuable helps

axter

0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question