9#ifndef __POINT_WITH_ID_H_INCLUDED__
10#define __POINT_WITH_ID_H_INCLUDED__
24 auto it = std::find(vect.begin(), vect.end(), p);
25 assert(it != vect.end());
26 return std::distance(vect.begin(), it);
44 PointWithId(std::vector<Point>
const &vect,
size_t index) : m_vector{vect}, m_index{index}
63 return m_vector[m_index];
87 return !(*
this == other);
91 std::vector<Point>
const &m_vector;
Class to associate an indexing semantics to a collection of points.
Definition PointWithId.hpp:37
bool operator==(PointWithId const &other) const
Comparator.
Definition PointWithId.hpp:77
size_t getId() const
Getter.
Definition PointWithId.hpp:69
PointWithId(std::vector< Point > const &vect, size_t index)
Constructor.
Definition PointWithId.hpp:44
bool operator!=(PointWithId const &other) const
Comparator.
Definition PointWithId.hpp:85
Point getPoint() const
Getter.
Definition PointWithId.hpp:61
PointWithId(std::vector< Point > const &vect, Point const &p)
Constructor.
Definition PointWithId.hpp:53
size_t getIndexOfPointInVector(Point const &p, std::vector< Point > const &vect)
Find the index of a point in a vector.
Definition PointWithId.hpp:22
Simulation of coalescence-based models of molecular evolution.
Definition coalescence.hpp:21