Assert that the number of strongly connected components is in [1 .. nc].
This commit is contained in:
parent
81b8a3437c
commit
4588c40a30
@ -11,6 +11,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -111,6 +112,9 @@ compute_reorder_sequence_graph(int nc,
|
|||||||
flux, ia, ja, work);
|
flux, ia, ja, work);
|
||||||
|
|
||||||
tarjan (nc, ia, ja, sequence, components, ncomponents, work);
|
tarjan (nc, ia, ja, sequence, components, ncomponents, work);
|
||||||
|
|
||||||
|
assert (0 < *ncomponents);
|
||||||
|
assert (*ncomponents <= nc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user