1 #ifndef PMPL_ROBOT_GROUP_H_
2 #define PMPL_ROBOT_GROUP_H_
7 #include <unordered_map>
24 typedef std::vector<Robot*>::iterator
iterator;
36 const std::vector<Robot*>& _robots);
49 std::string
GetLabel() const noexcept;
68 size_t Size() const noexcept;
94 std::vector<
Robot*> m_robots;
95 std::unordered_map<
Robot*,
size_t> m_indexes;
103 std::ostream& operator<<(std::ostream&, const
RobotGroup&);
Definition: MPProblem.h:34
A group of one or more robots.
Definition: RobotGroup.h:17
size_t GetGroupIndex(Robot *const _robot) const noexcept
Definition: RobotGroup.cpp:108
std::vector< Robot * >::iterator iterator
Definition: RobotGroup.h:24
std::string GetLabel() const noexcept
Get the group label.
Definition: RobotGroup.cpp:70
Robot * GetRobot(const size_t _index) const noexcept
Get a robot by index.
Definition: RobotGroup.cpp:77
size_t Size() const noexcept
Get the number of robots in the group.
Definition: RobotGroup.cpp:128
bool VerifyRobotInGroup(Robot *const _robot) const noexcept
Check whether the robot is in the group or not.
Definition: RobotGroup.cpp:121
iterator end() noexcept
Definition: RobotGroup.cpp:154
iterator begin() noexcept
Definition: RobotGroup.cpp:147
RobotGroup(MPProblem *const _problem, const std::string &_label, const std::vector< Robot * > &_robots)
Definition: RobotGroup.cpp:16
std::vector< Robot * >::const_iterator const_iterator
Definition: RobotGroup.h:25
size_t TotalDofs() const noexcept
Get the number of DOFs accumulated over all robots.
Definition: RobotGroup.cpp:135
const std::vector< Robot * > & GetRobots() const noexcept
Get all robots.
Definition: RobotGroup.cpp:101