         cusp::coo_matrix<IndexType,ValueType,MemorySpace> T;
         cusp::array1d<ValueType,MemorySpace>              B_coarse;
         fit_candidates(aggregates, B, T, B_coarse);
+        
+        //cusp::io::write_matrix_market_file(T, "/home/nathan/Desktop/AMG/T0.mtx");
 
         // compute prolongation operator
         cusp::coo_matrix<IndexType,ValueType,MemorySpace> P;

    cusp::array1d<ValueType,MemorySpace> x = unittest::random_samples<ValueType>(A.num_rows);

    smoothed_aggregation_solver<IndexType,ValueType,MemorySpace> M(A);
//    M.solve(b,x);

    // set stopping criteria (iteration_limit = 100, relative_tolerance = 1e-6)
    //cusp::verbose_monitor<ValueType> monitor(b, 100, 1e-6);

                      temp.values.begin(),
                      thrust::multiplies<ValueType>());
    thrust::transform(temp.values.begin(), temp.values.begin() + S.num_entries,
                      thrust::constant_iterator<ValueType>(-lambda),
                      temp.values.begin(),
                      thrust::multiplies<ValueType>());
    // temp <- D^-1
