LinTrans Linear transformation on a vector space


Linear transformations in R^N or C^N. Wraps the functionality of Matrix to be able to easitly multiply matrixes with vectors (classes inheriting from AbstractVector). A LinTrans holds a matrix that represents the linear transformation.


Some Important Issues Regarding LinTrans (optional)


Explanation of the issues. For more information see Nil and [some other help files].


Creation / Class Methods


*new (matrix)

Short prose description of method.

matrix - Explanation of matrix. Default value is nil. Other information.

g = LinTrans(Matrix.with([[1,2],[2,3]]));


*rotation2D (theta)

2D rotation linear transformation for angle theta.

a = LinTrans.rotation2D(pi/2);

a.value(RealVector[1,0])


Accessing Instance and Class Variables

matrix_(arg1)

matrix

the matrix that represents the transformation.

*

Linear transformation and scalar multiplication.

a = LinTrans(Matrix.with([[1,2],[3,4]]));

b = LinTrans(Matrix.with([[3,4],[5,6]]));


(a*b).value(RealVector[5,6])

a = LinTrans.rotation2D(pi/2);

b = LinTrans.rotation2D(pi/2);


(a*b).value(RealVector[1,0]) //rotate vector by pi

+

addition between linear transformations.

a = LinTrans(Matrix.with([[1,2],[3,4]]));

b = LinTrans(Matrix.with([[3,4],[5,6]]));


(a+b).value(RealVector[5,6])

-

subtraciton between linear transformations.

a = LinTrans(Matrix.with([[1,2],[3,4]]));

b = LinTrans(Matrix.with([[3,4],[5,6]]));


(a-b).value(RealVector[5,6])

det

determinant of the transformation.

LinTrans(Matrix.with([[1,2],[2,3]])).det



inverse

inverse transformation.

a = LinTrans(Matrix.with([[1,2],[2,3]]));

b = a.inverse;

(a*b).value(RealVector[1,2]) //a*b is identity