MCPcopy Create free account
hub / github.com/comaps/comaps / Build

Method Build

libs/coding/sparse_vector.hpp:51–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 }
50
51 SparseVector<Value> Build()
52 {
53 // Shrink memory as a primary goal of this component.
54 if (m_values.capacity() / double(m_values.size()) > 1.4)
55 std::vector<Value>(m_values).swap(m_values);
56
57 return SparseVector<Value>(std::move(m_values), m_bitsBuilder);
58 }
59};
60
61} // namespace coding

Callers 1

UNIT_TESTFunction · 0.45

Calls 3

capacityMethod · 0.45
sizeMethod · 0.45
swapMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.36