![]() ![]() RationalComplexMatrix operator+(RationalComplexMatrix &ob) const RationalComplexMatrix &operator=(RationalComplexMatrix &ob) ![]() RationalComplex &operator()( int RowNumber, int ColumnNumber) įriend std::ostream &operator >(std::istream &,īool operator=( const RationalComplexMatrix &ob) const īool operator!=(RationalComplexMatrix &ob) const RationalComplexMatrix( const RationalComplexMatrix &ob) RationalComplexMatrix( int m_NumberOfRow, Parameters Constructor to build // mxn matrix with memory allocation constructor default creat objects with 0 cols, 0 // rows and no memory allocation of pointers reversing the order of rows in matrix, // and then the order of cols void SwapMatrix(RationalComplexMatrix *MyParalalmatrix) Įlse it returns 0*/ bool DoIHaveAllZeroLine() const return 1 if the row in the index he got is all // zero equal numbers else returns 0 bool AmIAllZeros( short CurrentRow) const works with RemoveEqual(int rowtodelete) function. He will remove the row he got and not the copy he found*/ void RemoveEqual( short rowtodelete, It take int value if it is negative regular job. * this nice one searches for copys of lines and delete them The more zeros you have, go lower*/ void vMoveZerosDown(RationalComplexMatrix *Myparalelmatrix) * sort the matrix lines by the number of zeros from the left, ![]() this one receive the current row // and use it to null the other lines void vCutDownRow( short CurrentRow, short CurrentCol, dividing every number in the matrix in his leading number void vBreakDownRow(RationalComplexMatrix *MyParalalmatrix) gets two cols and swap them void SwapMatrixCols( short ColA, short ColB) swapping two given rows void SwapMatrixRows( short RowA, short RowB, IT MAKES ALL THE WORK ALOT FASTER BUT CURENTLY DISABLED*/ void PivotNullity(RationalComplexMatrix *MyParalalMatrix) ********************************************** // MATRIX RANKING PRIVATE FUNCTIONS // REMEMBER THAT ALMOST ALL THE FUNCTION // GET A POINTER TO ANOTHER // MATRIX OBJECT THIS IS FOR THE ABILITY TO // RANK THE POINTED MATRIX WITH OUR MATRIX // ********************************************** /* this one gets line number and give true if theĮlse returns false*/ bool vAmIPivot( short CurrantRow,īelow and above their leading number(pivot). RationalComplex Vmulmatrix(RationalComplexMatrix leftmatrix , Pointer to array of pointers that points on arrays of // complex numbers that makes the matrix rows // This one is part of the *operator overloading A pointer to unique name for the matrix, // that doesn't created by default // it's not transfered with the '=' operator // nor does it make any different // in then the '=' operator is called Therefor it is equal to number of the rows in the matrix Therefor it is equal to number of cols in the matrix You might like to take a good look at the header of the RationalComplexMatrix class: For further information, read the documentations included. The Mint class works just like the regular int object (32 bits) only it has 337 bits!!!. The accuracy at the expanded version of the RationalComplexMatrix is gained thanks to another class, named Mint (multi-integer). Accuracy cannot be promised when using large scale matrixes (6 x 6. The expanded version can not deal with complex numbers, but it can deal with large scale matrixes. In addition, I have put in an expanded version of the RationalComplexMatrix. For your convenience, I've also included a "clean" directory of the RationalComplexMatrix class without the RationalComplexMatrix Calculator files. If you're using VC++ 6, make sure you have the service pack 5 and later (a bug when using friend functions). Simply open the source code zip file, compile, and link. It is a most useful class and the RationalComplexMatrix merely shows its abilities and usages. Using the codeĪs written above, the main class is RationalComplexMatrix. And what about 300 equations with 400 variables. That might seems useless in our case but try to solve a set of 5 equations with 4 variables without ranking the matrix (it can take a while). All we care about are the variable vectors, but the ordinary rows and cols actions will work on them too due to the fact that they are part of the row. For example, if I'll do now r2+r1 into r1, not only will I null nothing (not needed action in its own), I will also destroy the zero I have in the first row second column and replace it with 1.Īs you can see, we are ignoring the solution vector. But one may ask when to stop ranking (that's how this process is called), the answer ý16:02 ý28/ý04/ý2004 is: one should stop ranking when every Gauss's action, he can do that to null a number, will cause adding a new number. As you can see, we ignored the solution col(vector).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |