Program Listing for File DataPoint.h

Return to documentation for file (necsim/DataPoint.h)

//This file is part of necsim project which is released under MIT license.
//See file **LICENSE.txt** or visit for full license details.

#include <iostream>
#include "Logging.h"
#include "Step.h"

using namespace std;
namespace necsim
    class DataPoint : virtual public MapLocation

        // the next individual in the loop of those that have the same xypos
        unsigned long next_lineage;
        // points to the position in the coalescence tree
        unsigned long reference;
        // points to the position in the SpeciesList file.
        unsigned long list_position;
        // the reference number within the linked lineage_indices of wrapped lineages
        unsigned long nwrap;
        // the max-min number
        double min_max;

        DataPoint() : next_lineage(0), reference(0), list_position(0), nwrap(0), min_max(0)


        ~DataPoint() = default;

        void setup(unsigned long x, unsigned long y, long xwrap_in, long ywrap_in, unsigned long reference_in,
                   unsigned long list_position_in, double min_max_in);

        void setup(unsigned long reference_in, unsigned long list_position_in, double min_max_in);

        void setup(const DataPoint &datin);

        void setReference(unsigned long z);

        void setNext(unsigned long x);

        void setListPosition(unsigned long l);

        void setNwrap(unsigned long n);

        void setMinmax(double d);

        unsigned long getXpos() const;

        unsigned long getYpos() const;

        long getXwrap() const;

        long getYwrap() const;

        unsigned long getReference() const;

        unsigned long getNext() const;

        unsigned long getListpos() const;

        unsigned long getNwrap() const;

        double getMinmax() const;

        void decreaseNwrap();

        template<class T> void setEndpoint(const T &location)
            x = location.x;
            y = location.y;
            xwrap = location.xwrap;
            ywrap = location.ywrap;

        friend ostream &operator<<(ostream &os, const DataPoint &d);

        friend istream &operator>>(istream &is, DataPoint &d);

#ifdef DEBUG
        void logActive(const int &level);
#endif // DEBUG
#endif // DATAPOINT_H