/*
    Copyright (C) 2012 Bartosz Broda, Jacek Bochenek, Łukasz Biłeńkij, 
    Damian Jaworski, Wojciech Mazur, Dominik Piasecki, Maciej Piasecki, 
    Radosław Ramocki
    
    This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your option)
any later version.

    This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. 

    See the LICENSE and COPYING files for more details.
*/

#ifndef UTILS_H
#define UTILS_H

#include <boost/test/unit_test.hpp>
#include <vector>
#include "matrices_all.h"
#include "compare/FunctionFactory.h"

Matrices::SuperMatrixPtr buildSuperMatrix(std::vector<std::vector<double> > rows);

template <class C> std::vector<C> initVector(C e1, C e2, C e3, C e4, C e5, C e6, C e7, C e8, C e9);
template <class C> std::vector<C> initVector(C e1, C e2, C e3, C e4, C e5, C e6, C e7);

Matrices::SuperMatrixPtr getTestMatrix();
Matrices::SuperMatrixPtr getTestMatrixFilteredRow();
Matrices::SuperMatrixPtr getTestMatrixFilteredCol();

std::set<size_t> getTestIndices(Matrices::SuperMatrixPtr);

void matrixCompareCCS(Matrices::SuperMatrixPtr m1, Matrices::SuperMatrixPtr m2, double precision = 0.00001);
void matrixCompareCRS(Matrices::SuperMatrixPtr m1, Matrices::SuperMatrixPtr m2, double precision = 0.00001);

std::vector<double> initWithZeros(size_t len);

std::string* getTupleLines();

#endif // UTILS_H
