commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jelle Herold <>
Subject [math] matrix identity, matrix as transformation
Date Mon, 02 Mar 2009 12:06:50 GMT
Hi there,

A question on extending commons-math.

I'm missing a couple of (basic) functions on the RealMatrix class;
for example,

  void identity();	// set to identity matrix
  boolean isIdentity()	// check if this is an identity matrix

Also I'm using them as affine transformations, so I'd like to see  

  RealVector getTranslation()
  void translate(RealVector v);
  void setTranslation(RealVector v);

etc. (this works for arbitrary dimensions, matrix must be square though)

So wrote a helper class that works on RealMatrix objects treating them  
as transformations, but I'd prefer to have those methods directly on  
(Extending RealMatrix is not practical as methods such as multiply(..)  
don't return the derived class)

Better suggestions are welcome.

Are you interested in implementations of these methods? They might be  
out of scope?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message