|
From: | Pietro Terna |
Subject: | matrixes and vectors |
Date: | Sat, 19 Aug 2000 17:40:07 +0200 |
Hi All,I refer to a serie of posts of a few day ago, about the C problem of returning a vector.
To solve the problem in my applications, where I use a lot of matrixes and vectors of real numbers, I have introduced two Classes, written in Swarm stile (e.g. with createBegin the matrix is generated with malloc etc.).
I attach here: Matrix.h and Matrix.m, the basic class; Matrix2.h and Matrix2.m, inheriting from Matrix and adding some new methods.
Matrix catches the out of bound run time errors, producing an error message with a numerical code used to identify the matrix out of bound.
These classes containg general methods, plus some methods, maybe, only useful for me; for explanations, see the comments in Matrix.h.
If you create a Matrix2 instance in a probed object, you can right click on the Matrix2 label to open a probe to the matrix; going to the methods (newly right click on the label of the box) you have the 'print' method, which displays the content of the matrix on the current terminal.
I hope that my classes could be useful. Pietro
Matrix.h
Description: Text document
Matrix.m
Description: Text document
Matrix2.h
Description: Text document
Matrix2.m
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |