Click to See Complete Forum and Search --> : [C++] Matrix Class
Darkwraith
Jun 13th, 2004, 03:47 PM
I have posted a beta version of my Matrix class.
This is a class that simulates Linear Algebra matrix operations. Please tell me of what could be done to make this class better.
[edit] This is version 1.0. A more recent version can be found toward the end of this thread.
Darkwraith
Jun 13th, 2004, 03:48 PM
Here is the associated .h file to this class.
CornedBee
Jun 21st, 2004, 03:07 AM
Looks fine. In Inverse and Reduce you hide one local variable called lhs with another, which is not that good an idea. You could also maybe make it more efficient by having only one lhs instead of repeatedly creating and destroying them.
parksie
Jul 8th, 2004, 09:29 AM
Just a couple of nitpicks:
You use unsigned a lot in your code, perhaps qualifying this with a sized type for readability? (Most likely long, this seems to be 4 bytes on both 32-bit and 64-bit systems).
Potentially, replacing assert() with something that will throw an exception could be useful; checking speed impact may be necessary.
CornedBee
Jul 12th, 2004, 03:41 PM
Most likely long, this seems to be 4 bytes on both 32-bit and 64-bit systems)
I think gcc makes long 64 bit on 64-bit systems.
Darkwraith
Aug 19th, 2004, 01:54 PM
Thanks for the input. I am thinking of templating the class.
Once I have the project to which this belongs to done, I'll post the updated code. This way, the class should be throughly tested.
Darkwraith
Aug 29th, 2004, 10:33 AM
I have the my most recent version of the Matrix class.
Header:
Darkwraith
Aug 29th, 2004, 10:36 AM
Here is the Implementation File for the Matrix class. Please tell me of any improvements you wish to suggest.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.