 template <typename MemorySpace>
 void TestFitCandidates(void)
 {
+    typedef typename cusp::precond::amg_container<int,float,MemorySpace>::type AMGMatrix;
+
     // 2 aggregates with 2 nodes each
     {
         cusp::array1d<int,MemorySpace> aggregates(4);

        B[2] = 3.0f;
        B[3] = 4.0f;

        cusp::coo_matrix<int,float,MemorySpace> Q;
        cusp::array1d<float,MemorySpace> R(2);

        cusp::precond::detail::fit_candidates(aggregates, B, Q, R);

template <class MemorySpace>
void TestSmoothProlongator(void)
{
    typedef typename cusp::precond::amg_container<int,float,MemorySpace>::type AMGMatrix;

    // simple example with diagonal S
    {
	cusp::coo_matrix<int,float,MemorySpace> _S(4,4,4);
        _S.row_indices[0] = 0; _S.column_indices[0] = 0; _S.values[0] = 1;
        _S.row_indices[1] = 1; _S.column_indices[1] = 1; _S.values[1] = 2;
        _S.row_indices[2] = 2; _S.column_indices[2] = 2; _S.values[2] = 3;
        _S.row_indices[3] = 3; _S.column_indices[3] = 3; _S.values[3] = 4;
        AMGMatrix S(_S);

	cusp::coo_matrix<int,float,MemorySpace> _T(4,2,4);
        _T.row_indices[0] = 0; _T.column_indices[0] = 0; _T.values[0] = 0.5;
        _T.row_indices[1] = 1; _T.column_indices[1] = 0; _T.values[1] = 0.5;
        _T.row_indices[2] = 2; _T.column_indices[2] = 1; _T.values[2] = 0.5;
        _T.row_indices[3] = 3; _T.column_indices[3] = 1; _T.values[3] = 0.5;
        AMGMatrix T(_T);

        AMGMatrix _P;

        cusp::precond::detail::smooth_prolongator(S, T, _P, 4.0f, 2.0f); 

	cusp::coo_matrix<int,float,MemorySpace> P(_P);

        ASSERT_EQUAL(P.num_rows,    4);
        ASSERT_EQUAL(P.num_cols,    2);
