Commit b0dfeaa2 authored by Philipp  Trunschke's avatar Philipp Trunschke

implement num_components()

parent edbb9002
Pipeline #859 passed with stages
in 8 minutes and 26 seconds
......@@ -111,6 +111,9 @@ namespace xerus { namespace internal {
* @return A vector containing the current ranks.
*/
std::vector<size_t> ranks() const;
///@brief Return the number of components
size_t num_components() const;
/**
......
......@@ -99,6 +99,8 @@ namespace xerus { namespace internal {
}
return res;
}
size_t BlockTT::num_components() const { return components.size(); }
size_t BlockTT::rank(const size_t _idx) const {
REQUIRE(_idx+1 < degree(), "Illegal index " << _idx <<" in TTNetwork::component, as there are onyl " << degree() << " components.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment