/*
    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 SVDTOTALRUNNER_H
#define SVDTOTALRUNNER_H
#include "config.h"
#include "matrices_all.h"
#include <boost/algorithm/string.hpp>

class SVDTotalRunner
{
public:
	/**
	  * Global run function
	  */
	void Start();
	/**
	  * Empty constructor
	  */
	SVDTotalRunner();
private:
	/**
	  * Function performing initial weighting of input matrix using matrix weighter tool
	  */
	void baseWeighting();
	/**
	  * Function converting weighted matrix to ST format
	  */
	void convert2ST();
	/**
	  * Function running SVD on weighted matrix in ST format using SVD_runner
	  */
	void svdRunning();
	/**
	  * Function converting CRS matrix to supermatrix
	  */
	void crs2sm();
	/**
	  * Function running parallel similarity application
	  */
	void parallelRunner();
	/**
	  * Function producing value histograms from similarity results, using value_histogram application
	  */
	void histograms();
	/**
	  * Function converting textfile matrix (similarity output) to supermatrix, cutting values according to
	  * set threshold
	  */
	void txt2sm();
	/**
	  * Function allowing further filtering of matrice's values based on mean median of results
	  */
	void meanMedian();
	/**
	  * Function creating domains based on supermatrix values
	  */
	void createDomains();
};

#endif // SVDTOTALRUNNER_H
