size_t height() const {
IT h = 0;
for (unsigned c=0; c < width(); ++c)
- if (cols[c].size() > 0)
+ if (!cols[c].isempty())
h = std::max(h, cols[c].back());
return h+1;
}
os << "-";
- if (col.size() != 0)
+ if (!col.isempty())
height = std::max(height, col.back());
}
for (unsigned c=0; c < mat.width(); ++c) {
std::list<IT> &col = cols.at(c);
// This column is already empty
- if (col.size() == 0)
+ if (col.isempty())
os << " ";
else if (col.front() == r) {
os << "X";
//if (c % 100 == 0)
//std::cout << "c = " << c << " (" << (100.0*float(c)/rbm.width()) << " %)" << std::endl;
// Reduce as long as we need to reduce
- while (rbm.get_column(c).size() > 0) {
+ while (!rbm.get_column(c).isempty()) {
// (r, c) is the lowest one of col
const IT r = rbm.get_column(c).back();
// This column contains its lowest one on the same row
}
// A lowest one remained, recall it
- if (rbm.get_column(c).size() > 0) {
+ if (!rbm.get_column(c).isempty()) {
const IT r = rbm.get_column(c).back();
assert(lowestones[r] == 0);
assert(r < c);
os << " boundary: " << bm.get_column(c) << std::endl;
typename boolean_colmatrix<IT>::column_type col = rbm.get_column(c);
- if (col.size() == 0) {
+ if (col.isempty()) {
os << " \033[1;32mbirth\033[0;m of a cycle: " << tm.get_column(c) << std::endl;
} else {
os << " \033[1;31mdeath\033[0;m of a cycle: " << rbm.get_column(c) << std::endl;
for (unsigned c=0; c < lowestones.size(); ++c) {
// A cycle was born
- if (rbm.get_column(c).size() == 0) {
+ if (rbm.get_column(c).isempty()) {
const int dim = order.get_simplex(c).dim;
// Create a diagram point
// or not be, tertium non datur.
for (unsigned c=0; c < lowestones.size(); ++c) {
// A class died with c
- if (rbm.get_column(c).size() != 0)
+ if (!rbm.get_column(c).isempty())
assert(c == 0 || deaths.count(c) > 0);
else
assert(births.count(c) > 0);