MCPcopy Create free account
hub / github.com/argotorg/solidity / subset

Method subset

libsolutil/DisjointSet.cpp:89–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87
88template<typename ValueType>
89std::set<typename ContiguousDisjointSet<ValueType>::value_type> ContiguousDisjointSet<ValueType>::subset(value_type const _x) const
90{
91 solAssert(_x < m_parents.size());
92 std::set<value_type> result{_x};
93 value_type neighbor = m_neighbors[_x];
94 while (neighbor != _x)
95 {
96 result.insert(neighbor);
97 neighbor = m_neighbors[neighbor];
98 }
99 return result;
100}
101
102template<typename ValueType>
103std::vector<std::set<typename ContiguousDisjointSet<ValueType>::value_type>> ContiguousDisjointSet<ValueType>::subsets() const

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 2

insertMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected