bool htd::Graph::isEdge(const htd::ConstCollection<htd::vertex_t> & elements) const { bool ret = false; if (elements.size() == 2) { ret = base_->isEdge(elements); } return ret; }
htd::ConstCollection<htd::id_t> htd::Graph::associatedEdgeIds(const htd::ConstCollection<htd::vertex_t> & elements) const { htd::VectorAdapter<htd::id_t> ret; if (elements.size() == 2) { auto & result = ret.container(); for (const htd::Hyperedge & edge : hyperedges()) { if (std::equal(edge.begin(), edge.end(), elements.begin())) { result.push_back(edge.id()); } } } return htd::ConstCollection<htd::id_t>::getInstance(ret); }
inline bool operator==(const htd::ConstCollection<T> & rhs) const { return size() == rhs.size() && std::equal(begin(), end(), rhs.begin()); }