--- /media/var_scratch/kroeker/M2branch/BUILD/FastLinearAlgebra/libraries/fflas_ffpack/tmp/fflas-ffpack-1.4.2.169/utils/debug.h	2011-05-24 18:16:40.000000000 +0200
+++ fflas-ffpack-1.4.2.169/utils/debug.h	2011-10-21 11:30:05.000000000 +0200
@@ -38,53 +38,79 @@
 
 
 #ifdef __FFLAFLAS_HAVE_STDINT_H
+#ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS
+#endif
 #include <stdint.h>
 
 #ifndef INT64_MAX
-#warning "somebody nasty previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#ifndef __STDC_LIMIT_MACROS_WARNING
+#define __STDC_LIMIT_MACROS_WARNING
+#warning "somebody previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#endif
 #include <limits>
 #define INT64_MAX std::numeric_limits<int64_t>::max()
 #endif
 
 #ifndef UINT64_MAX
-#warning "somebody nasty previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#ifndef __STDC_LIMIT_MACROS_WARNING
+#define __STDC_LIMIT_MACROS_WARNING
+#warning "somebody previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#endif
 #include <limits>
 #define UINT64_MAX std::numeric_limits<uint64_t>::max()
 #endif
 
 #ifndef INT32_MAX
-#warning "somebody nasty previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#ifndef __STDC_LIMIT_MACROS_WARNING
+#define __STDC_LIMIT_MACROS_WARNING
+#warning "somebody previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#endif
 #include <limits>
 #define INT32_MAX std::numeric_limits<int32_t>::max()
 #endif
 
 #ifndef UINT32_MAX
-#warning "somebody nasty previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#ifndef __STDC_LIMIT_MACROS_WARNING
+#define __STDC_LIMIT_MACROS_WARNING
+#warning "somebody previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#endif
 #include <limits>
 #define UINT32_MAX std::numeric_limits<uint32_t>::max()
 #endif
 
 #ifndef INT16_MAX
-#warning "somebody nasty previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#ifndef __STDC_LIMIT_MACROS_WARNING
+#define __STDC_LIMIT_MACROS_WARNING
+#warning "somebody previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#endif
 #include <limits>
 #define INT16_MAX std::numeric_limits<int16_t>::max()
 #endif
 
 #ifndef UINT16_MAX
-#warning "somebody nasty previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#ifndef __STDC_LIMIT_MACROS_WARNING
+#define __STDC_LIMIT_MACROS_WARNING
+#warning "somebody previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#endif
 #include <limits>
 #define UINT16_MAX std::numeric_limits<uint16_t>::max()
 #endif
 
 #ifndef INT8_MAX
-#warning "somebody nasty previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#ifndef __STDC_LIMIT_MACROS_WARNING
+#define __STDC_LIMIT_MACROS_WARNING
+#warning "somebody previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#endif
 #include <limits>
 #define INT8_MAX std::numeric_limits<int8_t>::max()
 #endif
 
 #ifndef UINT8_MAX
-#warning "somebody nasty previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#ifndef __STDC_LIMIT_MACROS_WARNING
+#define __STDC_LIMIT_MACROS_WARNING
+#warning "somebody previously included <stdint.h> without __STDC_LIMIT_MACROS :)"
+#endif
 #include <limits>
 #define UINT8_MAX std::numeric_limits<uint8_t>::max()
 #endif
@@ -105,7 +131,7 @@ throw FFPACK::Failure (__func__, __FILE_
 
 namespace FFPACK {
 
-
+namespace {
 	/*!  A precondtion failed.
 	 * @ingroup util
 	 * The \c throw mechanism is usually used here as in
@@ -117,7 +143,7 @@ namespace FFPACK {
 	 */
 	class Failure {//: public LinboxError BB: otherwise,  error.h:39 segfaults
 	protected:
-		static std::ostream *_errorStream;
+		 static std::ostream *_errorStream;
 
 	public:
 		/*! @internal
@@ -210,7 +236,9 @@ namespace FFPACK {
 
 #endif
 
-	std::ostream *Failure::_errorStream;
+	 std::ostream *Failure::_errorStream;
+	}
+	
 } // FFPACK
 
 #endif // __FFLAFLAS_util_debug_H
--- config-blas.h	2011-05-24 18:16:40.000000000 +0200
+++ fflas-ffpack-1.4.2.169/fflas-ffpack/config-blas.h	2012-03-08 02:27:28.000000000 +0100
@@ -111,32 +111,32 @@ extern "C" {
 
 	// level 1 routines
 
-	void cblas_daxpy(const int N, const double alpha, const double *X, const int incX, double *Y, const int incY)
+	inline void cblas_daxpy(const int N, const double alpha, const double *X, const int incX, double *Y, const int incY)
 	{
 		daxpy_ (&N,&alpha, X, &incX, Y, &incY);
 	}
 
-	double cblas_ddot(const int N, const double *X, const int incX, const double *Y, const int incY)
+	inline double cblas_ddot(const int N, const double *X, const int incX, const double *Y, const int incY)
 	{
 		return ddot_ (&N, X, &incX, Y, &incY);
 	}
 
-	double cblas_dasum(const int N, const double *X, const int incX){
+	inline double cblas_dasum(const int N, const double *X, const int incX){
 		return dasum_ (&N, X, &incX);
 	}
 
-	int cblas_idamax(const int N, const double *X, const int incX){
+	inline int cblas_idamax(const int N, const double *X, const int incX){
 		return idamax_ (&N, X, &incX);
 	}
 
-	double cblas_dnrm2(const int N, const double *X, const int incX){
+	inline double cblas_dnrm2(const int N, const double *X, const int incX){
 		return dnrm2_(&N, X, &incX);
 	}
 
 
 	// level 2 routines
 
-	void cblas_dgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const double alpha,
+	inline void cblas_dgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const double alpha,
 			 const double *A, const int lda, const double *X, const int incX, const double beta, double *Y, const int incY)
 	{
 		if (Order == CblasRowMajor)
@@ -144,7 +144,7 @@ extern "C" {
 		else
 			dgemv_ ( EXT_BLAS_TRANSPOSE(TransA), &M, &N, &alpha, A, &lda, X, &incX, &beta, Y, &incY);
 	}
-	void cblas_sgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const float alpha,
+	inline void cblas_sgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const float alpha,
 			 const float *A, const int lda, const float *X, const int incX, const float beta, float *Y, const int incY)
 	{
 		if (Order == CblasRowMajor)
@@ -153,7 +153,7 @@ extern "C" {
 			sgemv_ ( EXT_BLAS_TRANSPOSE(TransA), &M, &N, &alpha, A, &lda, X, &incX, &beta, Y, &incY);
 	}
 
-	void cblas_dger(const enum CBLAS_ORDER Order, const int M, const int N, const double alpha, const double *X, const int incX,
+	inline void cblas_dger(const enum CBLAS_ORDER Order, const int M, const int N, const double alpha, const double *X, const int incX,
 			const double *Y, const int incY, double *A, const int lda)
 	{
 		if (Order == CblasRowMajor)
@@ -166,7 +166,7 @@ extern "C" {
 
 	// level 3 routines
 
-	void cblas_dtrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+	inline void cblas_dtrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
 			 const enum CBLAS_DIAG Diag, const int M, const int N, const double alpha, const double *A, const int lda,
 			 double *B, const int ldb)
 	{
@@ -175,7 +175,7 @@ extern "C" {
 		else
 			dtrsm_ ( EXT_BLAS_SIDE(Side), EXT_BLAS_UPLO(Uplo), EXT_BLAS_TRANSPOSE(TransA), EXT_BLAS_DIAG(Diag), &M, &N, &alpha, A, &lda, B, &ldb);
 	}
-	void cblas_strsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+	inline void cblas_strsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
 			 const enum CBLAS_DIAG Diag, const int M, const int N, const float alpha, const float *A, const int lda,
 			 float *B, const int ldb)
 	{
@@ -185,7 +185,7 @@ extern "C" {
 			strsm_ ( EXT_BLAS_SIDE(Side), EXT_BLAS_UPLO(Uplo), EXT_BLAS_TRANSPOSE(TransA), EXT_BLAS_DIAG(Diag), &M, &N, &alpha, A, &lda, B, &ldb);
 	}
 
-	void cblas_dtrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+	inline void cblas_dtrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
 			 const enum CBLAS_DIAG Diag, const int M, const int N, const double alpha, const double *A, const int lda,
 			 double *B, const int ldb)
 	{
@@ -194,7 +194,7 @@ extern "C" {
 		else
 			dtrmm_ ( EXT_BLAS_SIDE(Side), EXT_BLAS_UPLO(Uplo), EXT_BLAS_TRANSPOSE(TransA), EXT_BLAS_DIAG(Diag), &M, &N, &alpha, A, &lda, B, &ldb);
 	}
-	void cblas_strmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+	inline void cblas_strmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
 			 const enum CBLAS_DIAG Diag, const int M, const int N, const float alpha, const float *A, const int lda,
 			 float *B, const int ldb)
 	{
@@ -204,7 +204,7 @@ extern "C" {
 			strmm_ ( EXT_BLAS_SIDE(Side), EXT_BLAS_UPLO(Uplo), EXT_BLAS_TRANSPOSE(TransA), EXT_BLAS_DIAG(Diag), &M, &N, &alpha, A, &lda, B, &ldb);
 	}
 
-	void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
+	inline void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
 			 const int K, const double alpha, const double *A, const int lda, const double *B, const int ldb,
 			 const double beta, double *C, const int ldc)
 	{
@@ -213,7 +213,7 @@ extern "C" {
 		else
 			dgemm_ ( EXT_BLAS_TRANSPOSE(TransA), EXT_BLAS_TRANSPOSE(TransB), &M, &N, &K, &alpha, A, &lda, B, &ldb, &beta, C, &ldc);
 	}
-	void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
+	inline void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
 			 const int K, const float alpha, const float *A, const int lda, const float *B, const int ldb,
 			 const float beta, float *C, const int ldc)
 	{
@@ -229,7 +229,7 @@ extern "C" {
 
 	// return A=P.L.U (L unitary) with ColMajor
 	// return A=L.U.P (U unitary) with RowMajor
-	int clapack_dgetrf(const enum CBLAS_ORDER Order, const int M, const int N,
+	inline int clapack_dgetrf(const enum CBLAS_ORDER Order, const int M, const int N,
 			   double *A, const int lda, int *ipiv)
         {
             int info;
@@ -239,7 +239,7 @@ extern "C" {
 #endif
 
 #ifdef  __FFLAFLAS_HAVE_DGETRI
-	int clapack_dgetri(const enum CBLAS_ORDER Order, const int N, double *A,
+	inline int clapack_dgetri(const enum CBLAS_ORDER Order, const int N, double *A,
 			   const int lda, const int *ipiv)
 	{
 		int info;
@@ -284,7 +284,7 @@ extern "C" {
 
 #ifdef  __FFLAFLAS_HAVE_DTRTRI
 
-	int clapack_dtrtri(const enum CBLAS_ORDER Order,const enum CBLAS_UPLO Uplo,
+	inline int clapack_dtrtri(const enum CBLAS_ORDER Order,const enum CBLAS_UPLO Uplo,
 			   const enum CBLAS_DIAG Diag,const int N, double *A, const int lda)
 	{
 		int info;
--- ffpack.h	2011-05-24 18:16:40.000000000 +0200
+++ fflas-ffpack-1.4.2.169/fflas-ffpack/ffpack/ffpack.h	2012-05-17 16:34:59.000000000 +0200
@@ -1494,7 +1494,7 @@ namespace FFPACK  {
 	}
 
 	template <class Field, class Polynomial>
-	static std::list<Polynomial>&
+	static Polynomial &
 	CharPoly( const Field& F, Polynomial& charp, const size_t N,
 		  typename Field::Element * A, const size_t lda,
 		  const FFPACK_CHARPOLY_TAG CharpTag= FfpackArithProg)
@@ -1508,7 +1508,8 @@ namespace FFPACK  {
 		charp.resize(N+1);
 
 		Polynomial P = *(it++);
-		while( it!=factor_list.end() ){
+		charp = P; 		
+		while( it!=factor_list.end() ){		   
 			mulpoly (F,charp, P, *it);
 			P = charp;
 
--- ffpack.h	2012-10-04 18:10:05.091435000 +0200
+++ fflas-ffpack-1.4.2.169/fflas-ffpack/ffpack/ffpack.h	2012-10-04 20:06:38.910297000 +0200
@@ -80,6 +80,211 @@ namespace FFPACK  {
 		FfpackKGF=2
 	};
 
+	/**
+	 * Compute the LQUP factorization of the given matrix using
+	 * a block agorithm and return its rank.
+	 * The permutations P and Q are represented
+	 * using LAPACK's convention.
+	 * @param Diag  precise whether U should have a unit diagonal or not
+	 * @param trans
+	 * @param M matrix row dimension
+	 * @param N matrix column dimension
+	 * @param A input matrix
+	 * @param lda leading dimension of A
+	 * @param P the column permutation
+	 * @param Qt the transpose of the row permutation Q
+	 * @param LuTag flag for setting the earling termination if the matrix
+	 * is singular
+	 * @param cutoff
+	 */
+	/// LQUP factorization.
+	template <class Field>
+	static size_t
+	LUdivine (const Field& F, const FFLAS::FFLAS_DIAG Diag,  const FFLAS::FFLAS_TRANSPOSE trans,
+		  const size_t M, const size_t N,
+		  typename Field::Element * A, const size_t lda,
+		  size_t* P, size_t* Qt
+		  , const FFPACK_LUDIVINE_TAG LuTag=FfpackLQUP
+		  , const size_t cutoff=__FFPACK_LUDIVINE_CUTOFF
+		  );
+
+	/** Apply a permutation submatrix of P (between ibeg and iend) to a matrix
+	 * to (iend-ibeg) vectors of size M stored in A (as column for NoTrans
+	 * and rows for Trans).
+	 * Side==FFLAS::FflasLeft for row permutation Side==FFLAS::FflasRight for a column
+	 * permutation
+	 * Trans==FFLAS::FflasTrans for the inverse permutation of P
+	 * @param F
+	 * @param Side
+	 * @param Trans
+	 * @param M
+	 * @param ibeg
+	 * @param iend
+	 * @param A
+	 * @param lda
+	 * @param P
+	 * @warning not sure the submatrix is still a permutation and the one we expect in all cases... examples for iend=2, ibeg=1 and P=[2,2,2]
+	 */
+	template<class Field>
+	static void
+	applyP( const Field& F,
+		const FFLAS::FFLAS_SIDE Side,
+		const FFLAS::FFLAS_TRANSPOSE Trans,
+		const size_t M, const int ibeg, const int iend,
+		typename Field::Element * A, const size_t lda, const size_t * P )
+	{
+
+		if ( Side == FFLAS::FflasRight )
+			if ( Trans == FFLAS::FflasTrans )
+				for (size_t j = 0 ; j < M ; ++j){
+					for ( size_t i=ibeg; i<(size_t) iend; ++i)
+						if ( P[i]> i )
+							std::swap(A[j*lda+P[i]],A[j*lda+i]);
+					//FFLAS::fswap( F, M, A + P[i]*1, lda, A + i*1, lda );
+				}
+			else // Trans == FFLAS::FflasNoTrans
+				for (size_t j = 0 ; j < M ; ++j){
+					for (int i=iend; i-->ibeg; )
+						if ( P[i]>(size_t)i )
+							std::swap(A[j*lda+P[i]],A[j*lda+i]);
+					//FFLAS::fswap( F, M, A + P[i]*1, lda, A + i*1, lda );
+				}
+		else // Side == FFLAS::FflasLeft
+			if ( Trans == FFLAS::FflasNoTrans )
+				for (size_t i=ibeg; i<(size_t)iend; ++i){
+					if ( P[i]> (size_t) i )
+						FFLAS::fswap( F, M,
+							      A + P[i]*lda, 1,
+							      A + i*lda, 1 );
+				}
+			else // Trans == FFLAS::FflasTrans
+				for (int i=iend; i-->ibeg; ){
+					if ( P[i]> (size_t) i ){
+						FFLAS::fswap( F, M,
+							      A + P[i]*lda, 1,
+							      A + i*lda, 1 );
+					}
+				}
+
+	}
+
+	// Solve L X = B in place
+	// L is M*M or N*N, B is M*N.
+	// Only the R non trivial column of L are stored in the M*R matrix L
+	template<class Field>
+	static void
+	solveLB2( const Field& F, const FFLAS::FFLAS_SIDE Side,
+		  const size_t M, const size_t N, const size_t R,
+		  typename Field::Element * L, const size_t ldl,
+		  const size_t * Q,
+		  typename Field::Element * B, const size_t ldb )
+	{
+
+
+
+		typename Field::Element Mone, one;
+		F.init( Mone, -1.0 );
+		F.init( one, 1.0 );
+		typename Field::Element * Lcurr,* Rcurr,* Bcurr;
+		size_t ib,  Ldim;
+		int k;
+		if ( Side == FFLAS::FflasLeft ){
+			size_t j = 0;
+			while ( j<R ) {
+				 ib = Q[j];
+				k = (int)ib ;
+				while ((j<R) && ( (int) Q[j] == k)  ) {k++;j++;}
+				Ldim = k-ib;
+				Lcurr = L + j-Ldim + ib*ldl;
+				Bcurr = B + ib*ldb;
+				Rcurr = Lcurr + Ldim*ldl;
+
+				ftrsm( F, Side, FFLAS::FflasLower, FFLAS::FflasNoTrans, FFLAS::FflasUnit, Ldim, N, one,
+				       Lcurr, ldl , Bcurr, ldb );
+
+				fgemm( F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, M-k, N, Ldim, Mone,
+				       Rcurr , ldl, Bcurr, ldb, one, Bcurr+Ldim*ldb, ldb);
+			}
+		}
+		else{ // Side == FFLAS::FflasRight
+			int j=(int)R-1;
+			while ( j >= 0 ) {
+				ib = Q[j];
+				k = (int) ib;
+				while ( (j >= 0) &&  ( (int)Q[j] == k)  ) {--k;--j;}
+				Ldim = ib-k;
+				Lcurr = L + j+1 + (k+1)*ldl;
+				Bcurr = B + ib+1;
+				Rcurr = Lcurr + Ldim*ldl;
+
+				fgemm (F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, M,  Ldim, N-ib-1, Mone,
+				       Bcurr, ldb, Rcurr, ldl,  one, Bcurr-Ldim, ldb);
+
+				ftrsm (F, Side, FFLAS::FflasLower, FFLAS::FflasNoTrans, FFLAS::FflasUnit, M, Ldim, one,
+				       Lcurr, ldl , Bcurr-Ldim, ldb );
+			}
+		}
+	}
+
+
+	template<class Field>
+	static void trinv_left( const Field& F, const size_t N, const typename Field::Element * L, const size_t ldl,
+				typename Field::Element * X, const size_t ldx )
+	{
+		for (size_t i=0; i<N; ++i)
+			FFLAS::fcopy (F, N, X+i*ldx, 1, L+i*ldl, 1);
+		ftrtri (F, FFLAS::FflasLower, FFLAS::FflasUnit, N, X, ldx);
+		//invL(F,N,L,ldl,X,ldx);
+	}
+
+	template <class Field>
+	static size_t KrylovElim( const Field& F, const size_t M, const size_t N,
+				  typename Field::Element * A, const size_t lda, size_t*P,
+				  size_t *Q, const size_t deg, size_t *iterates, size_t * inviterates, const size_t maxit,size_t virt);
+
+	template <class Field>
+	static size_t  SpecRankProfile (const Field& F, const size_t M, const size_t N,
+					typename Field::Element * A, const size_t lda, const size_t deg, size_t *rankProfile);
+	template <class Field, class Polynomial>
+	static std::list<Polynomial>&
+	CharpolyArithProg (const Field& F, std::list<Polynomial>& frobeniusForm,
+			   const size_t N, typename Field::Element * A, const size_t lda, const size_t c);
+
+	template <class Field>
+	static void CompressRows (Field& F, const size_t M,
+				  typename Field::Element * A, const size_t lda,
+				  typename Field::Element * tmp, const size_t ldtmp,
+				  const size_t * d, const size_t nb_blocs);
+
+	template <class Field>
+	static void CompressRowsQK (Field& F, const size_t M,
+				    typename Field::Element * A, const size_t lda,
+				    typename Field::Element * tmp, const size_t ldtmp,
+				    const size_t * d,const size_t deg, const size_t nb_blocs);
+
+	template <class Field>
+	static void DeCompressRows (Field& F, const size_t M, const size_t N,
+				    typename Field::Element * A, const size_t lda,
+				    typename Field::Element * tmp, const size_t ldtmp,
+				    const size_t * d, const size_t nb_blocs);
+	template <class Field>
+	static void DeCompressRowsQK (Field& F, const size_t M, const size_t N,
+				      typename Field::Element * A, const size_t lda,
+				      typename Field::Element * tmp, const size_t ldtmp,
+				      const size_t * d, const size_t deg, const size_t nb_blocs);
+
+	template <class Field>
+	static void CompressRowsQA (Field& F, const size_t M,
+				    typename Field::Element * A, const size_t lda,
+				    typename Field::Element * tmp, const size_t ldtmp,
+				    const size_t * d, const size_t nb_blocs);
+	template <class Field>
+	static void DeCompressRowsQA (Field& F, const size_t M, const size_t N,
+				      typename Field::Element * A, const size_t lda,
+				      typename Field::Element * tmp, const size_t ldtmp,
+				      const size_t * d, const size_t nb_blocs);
+
+
 	/** Computes the rank of the given matrix using a LQUP factorization.
 	 * The input matrix is modified.
 	 * @param M row dimension of the matrix
@@ -984,33 +1189,7 @@ namespace FFPACK  {
 	TURBO (const Field& F, const size_t M, const size_t N,
 	       typename Field::Element* A, const size_t lda, size_t * P, size_t * Q, const size_t cutoff);
 
-	/**
-	 * Compute the LQUP factorization of the given matrix using
-	 * a block agorithm and return its rank.
-	 * The permutations P and Q are represented
-	 * using LAPACK's convention.
-	 * @param Diag  precise whether U should have a unit diagonal or not
-	 * @param trans
-	 * @param M matrix row dimension
-	 * @param N matrix column dimension
-	 * @param A input matrix
-	 * @param lda leading dimension of A
-	 * @param P the column permutation
-	 * @param Qt the transpose of the row permutation Q
-	 * @param LuTag flag for setting the earling termination if the matrix
-	 * is singular
-	 * @param cutoff
-	 */
-	/// LQUP factorization.
-	template <class Field>
-	static size_t
-	LUdivine (const Field& F, const FFLAS::FFLAS_DIAG Diag,  const FFLAS::FFLAS_TRANSPOSE trans,
-		  const size_t M, const size_t N,
-		  typename Field::Element * A, const size_t lda,
-		  size_t* P, size_t* Qt
-		  , const FFPACK_LUDIVINE_TAG LuTag=FfpackLQUP
-		  , const size_t cutoff=__FFPACK_LUDIVINE_CUTOFF
-		  );
+	
 
 
 	template<class Element>
@@ -1033,65 +1212,7 @@ namespace FFPACK  {
 			const FFPACK_LUDIVINE_TAG LuTag=FfpackLQUP);
 
 
-	/** Apply a permutation submatrix of P (between ibeg and iend) to a matrix
-	 * to (iend-ibeg) vectors of size M stored in A (as column for NoTrans
-	 * and rows for Trans).
-	 * Side==FFLAS::FflasLeft for row permutation Side==FFLAS::FflasRight for a column
-	 * permutation
-	 * Trans==FFLAS::FflasTrans for the inverse permutation of P
-	 * @param F
-	 * @param Side
-	 * @param Trans
-	 * @param M
-	 * @param ibeg
-	 * @param iend
-	 * @param A
-	 * @param lda
-	 * @param P
-	 * @warning not sure the submatrix is still a permutation and the one we expect in all cases... examples for iend=2, ibeg=1 and P=[2,2,2]
-	 */
-	template<class Field>
-	static void
-	applyP( const Field& F,
-		const FFLAS::FFLAS_SIDE Side,
-		const FFLAS::FFLAS_TRANSPOSE Trans,
-		const size_t M, const int ibeg, const int iend,
-		typename Field::Element * A, const size_t lda, const size_t * P )
-	{
-
-		if ( Side == FFLAS::FflasRight )
-			if ( Trans == FFLAS::FflasTrans )
-				for (size_t j = 0 ; j < M ; ++j){
-					for ( size_t i=ibeg; i<(size_t) iend; ++i)
-						if ( P[i]> i )
-							std::swap(A[j*lda+P[i]],A[j*lda+i]);
-					//FFLAS::fswap( F, M, A + P[i]*1, lda, A + i*1, lda );
-				}
-			else // Trans == FFLAS::FflasNoTrans
-				for (size_t j = 0 ; j < M ; ++j){
-					for (int i=iend; i-->ibeg; )
-						if ( P[i]>(size_t)i )
-							std::swap(A[j*lda+P[i]],A[j*lda+i]);
-					//FFLAS::fswap( F, M, A + P[i]*1, lda, A + i*1, lda );
-				}
-		else // Side == FFLAS::FflasLeft
-			if ( Trans == FFLAS::FflasNoTrans )
-				for (size_t i=ibeg; i<(size_t)iend; ++i){
-					if ( P[i]> (size_t) i )
-						FFLAS::fswap( F, M,
-							      A + P[i]*lda, 1,
-							      A + i*lda, 1 );
-				}
-			else // Trans == FFLAS::FflasTrans
-				for (int i=iend; i-->ibeg; ){
-					if ( P[i]> (size_t) i ){
-						FFLAS::fswap( F, M,
-							      A + P[i]*lda, 1,
-							      A + i*lda, 1 );
-					}
-				}
-
-	}
+	
 
 
 	/**
@@ -1582,121 +1703,7 @@ namespace FFPACK  {
 		}
 	}
 
-	// Solve L X = B in place
-	// L is M*M or N*N, B is M*N.
-	// Only the R non trivial column of L are stored in the M*R matrix L
-	template<class Field>
-	static void
-	solveLB2( const Field& F, const FFLAS::FFLAS_SIDE Side,
-		  const size_t M, const size_t N, const size_t R,
-		  typename Field::Element * L, const size_t ldl,
-		  const size_t * Q,
-		  typename Field::Element * B, const size_t ldb )
-	{
-
-
-
-		typename Field::Element Mone, one;
-		F.init( Mone, -1.0 );
-		F.init( one, 1.0 );
-		typename Field::Element * Lcurr,* Rcurr,* Bcurr;
-		size_t ib,  Ldim;
-		int k;
-		if ( Side == FFLAS::FflasLeft ){
-			size_t j = 0;
-			while ( j<R ) {
-				 ib = Q[j];
-				k = (int)ib ;
-				while ((j<R) && ( (int) Q[j] == k)  ) {k++;j++;}
-				Ldim = k-ib;
-				Lcurr = L + j-Ldim + ib*ldl;
-				Bcurr = B + ib*ldb;
-				Rcurr = Lcurr + Ldim*ldl;
-
-				ftrsm( F, Side, FFLAS::FflasLower, FFLAS::FflasNoTrans, FFLAS::FflasUnit, Ldim, N, one,
-				       Lcurr, ldl , Bcurr, ldb );
-
-				fgemm( F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, M-k, N, Ldim, Mone,
-				       Rcurr , ldl, Bcurr, ldb, one, Bcurr+Ldim*ldb, ldb);
-			}
-		}
-		else{ // Side == FFLAS::FflasRight
-			int j=(int)R-1;
-			while ( j >= 0 ) {
-				ib = Q[j];
-				k = (int) ib;
-				while ( (j >= 0) &&  ( (int)Q[j] == k)  ) {--k;--j;}
-				Ldim = ib-k;
-				Lcurr = L + j+1 + (k+1)*ldl;
-				Bcurr = B + ib+1;
-				Rcurr = Lcurr + Ldim*ldl;
-
-				fgemm (F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, M,  Ldim, N-ib-1, Mone,
-				       Bcurr, ldb, Rcurr, ldl,  one, Bcurr-Ldim, ldb);
-
-				ftrsm (F, Side, FFLAS::FflasLower, FFLAS::FflasNoTrans, FFLAS::FflasUnit, M, Ldim, one,
-				       Lcurr, ldl , Bcurr-Ldim, ldb );
-			}
-		}
-	}
-
-
-	template<class Field>
-	static void trinv_left( const Field& F, const size_t N, const typename Field::Element * L, const size_t ldl,
-				typename Field::Element * X, const size_t ldx )
-	{
-		for (size_t i=0; i<N; ++i)
-			FFLAS::fcopy (F, N, X+i*ldx, 1, L+i*ldl, 1);
-		ftrtri (F, FFLAS::FflasLower, FFLAS::FflasUnit, N, X, ldx);
-		//invL(F,N,L,ldl,X,ldx);
-	}
-
-	template <class Field>
-	static size_t KrylovElim( const Field& F, const size_t M, const size_t N,
-				  typename Field::Element * A, const size_t lda, size_t*P,
-				  size_t *Q, const size_t deg, size_t *iterates, size_t * inviterates, const size_t maxit,size_t virt);
-
-	template <class Field>
-	static size_t  SpecRankProfile (const Field& F, const size_t M, const size_t N,
-					typename Field::Element * A, const size_t lda, const size_t deg, size_t *rankProfile);
-	template <class Field, class Polynomial>
-	static std::list<Polynomial>&
-	CharpolyArithProg (const Field& F, std::list<Polynomial>& frobeniusForm,
-			   const size_t N, typename Field::Element * A, const size_t lda, const size_t c);
-
-	template <class Field>
-	static void CompressRows (Field& F, const size_t M,
-				  typename Field::Element * A, const size_t lda,
-				  typename Field::Element * tmp, const size_t ldtmp,
-				  const size_t * d, const size_t nb_blocs);
-
-	template <class Field>
-	static void CompressRowsQK (Field& F, const size_t M,
-				    typename Field::Element * A, const size_t lda,
-				    typename Field::Element * tmp, const size_t ldtmp,
-				    const size_t * d,const size_t deg, const size_t nb_blocs);
-
-	template <class Field>
-	static void DeCompressRows (Field& F, const size_t M, const size_t N,
-				    typename Field::Element * A, const size_t lda,
-				    typename Field::Element * tmp, const size_t ldtmp,
-				    const size_t * d, const size_t nb_blocs);
-	template <class Field>
-	static void DeCompressRowsQK (Field& F, const size_t M, const size_t N,
-				      typename Field::Element * A, const size_t lda,
-				      typename Field::Element * tmp, const size_t ldtmp,
-				      const size_t * d, const size_t deg, const size_t nb_blocs);
-
-	template <class Field>
-	static void CompressRowsQA (Field& F, const size_t M,
-				    typename Field::Element * A, const size_t lda,
-				    typename Field::Element * tmp, const size_t ldtmp,
-				    const size_t * d, const size_t nb_blocs);
-	template <class Field>
-	static void DeCompressRowsQA (Field& F, const size_t M, const size_t N,
-				      typename Field::Element * A, const size_t lda,
-				      typename Field::Element * tmp, const size_t ldtmp,
-				      const size_t * d, const size_t nb_blocs);
+	
 
 
 	namespace Protected {
