org.ejml.alg.dense.misc
Class TransposeAlgs

java.lang.Object
  extended by org.ejml.alg.dense.misc.TransposeAlgs

public class TransposeAlgs
extends Object

Low level transpose algorithms. No sanity checks are performed.

Author:
Peter Abeles

Constructor Summary
TransposeAlgs()
           
 
Method Summary
static void block(RowD1Matrix64F A, RowD1Matrix64F A_tran, int blockLength)
          Performs a transpose across block sub-matrices.
static void square(RowD1Matrix64F mat)
          In-place transpose for a square matrix.
static void standard(RowD1Matrix64F A, RowD1Matrix64F A_tran)
          A straight forward transpose.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransposeAlgs

public TransposeAlgs()
Method Detail

square

public static void square(RowD1Matrix64F mat)
In-place transpose for a square matrix. The most efficient algorithm but can only be used on square matrices.

Parameters:
mat - The matrix that is transposed in-place. Modified.

block

public static void block(RowD1Matrix64F A,
                         RowD1Matrix64F A_tran,
                         int blockLength)
Performs a transpose across block sub-matrices. Reduces the number of cache misses on larger matrices. *NOTE* If this is beneficial is highly dependent on the computer it is run on. e.g: - Q6600 Almost twice as fast as standard. - Pentium-M Same speed and some times a bit slower than standard.

Parameters:
A - Original matrix. Not modified.
A_tran - Transposed matrix. Modified.
blockLength - Length of a block.

standard

public static void standard(RowD1Matrix64F A,
                            RowD1Matrix64F A_tran)
A straight forward transpose. Good for small non-square matrices.

Parameters:
A - Original matrix. Not modified.
A_tran - Transposed matrix. Modified.


Copyright © 2012. All Rights Reserved.