#ifndef FLUXMAT_H
#define FLUXMAT_H

#include <iostream>
#include <vector>
#include <algorithm>

#include "misc.h"

//double Random();

/* Last check: 23/07/15
 * Everything seems fine.
 * Maybe the reciver/donnor thing could be clarified.
 * Draw might be optimized to save allocation (only test & measur can tell).
 * Long term: full time frames support from changing flux over time.
 */

using namespace std;

class fluxMat
{
    public:
        fluxMat(); //OK
        fluxMat(vector<vector<double>> m_matrix, int m_time); //Ok
        virtual ~fluxMat();
        // Returns copy of a line of the matrix
        vector<double> get_donnors(int reciever); //OK
        int get_time();
        // Draw a population based on flux matrix * weights probability
        int draw(int reciever, vector<double> &weights, vector<int> ageClasses); //Ok

    protected:


    private:
        int time;
        vector<vector<double>> matrix;

};

#endif // FLUXMAT_H
