19 #ifndef HPP_RBPRM_STATE_HH
20 #define HPP_RBPRM_STATE_HH
23 #include <hpp/pinocchio/device.hh>
31 typedef std::vector<State>
T_State;
33 typedef std::pair<pinocchio::value_type, rbprm::State>
StateFrame;
41 State() : nbContacts(0), stable(false) {}
51 bool RemoveContact(
const std::string& contactId);
58 std::string RemoveFirstContact();
64 std::vector<std::string> contactVariations(
const State& previous)
const;
70 std::vector<std::string> freeVariations(
71 const State& previous,
72 const std::vector<std::string>& allEffectors)
const;
79 std::vector<std::string> allVariations(
80 const State& previous,
81 const std::vector<std::string>& allEffectors)
const;
87 std::vector<std::string> fixedContacts(
const State& previous)
const;
93 void contactCreations(
const State& previous,
94 std::vector<std::string>& outList)
const;
100 std::vector<std::string> contactCreations(
const State& previous)
const;
106 std::vector<std::string> contactBreaks(
const State& previous)
const;
112 void contactBreaks(
const State& previous,
113 std::vector<std::string>& outList)
const;
116 void print(std::stringstream& ss)
const;
117 void print(std::stringstream& ss,
const State& previous)
const;
118 void printInternal(std::stringstream& ss)
const;
140 template <
typename Iter>
142 Iter start, Iter end) {
143 std::vector<std::string> res;
144 for (Iter it = start; it != end; ++it) {
145 const std::string& eff = *it;
146 std::map<std::string, bool>::const_iterator cit = state.
contacts_.find(eff);
147 if (cit == state.
contacts_.end() || !cit->second) {
156 #endif // HPP_RBPRM_STATE_HH