bool is_symmetric(const MATRIX &n) { unsigned int x, y; for (y = 0; y < n.GetHeight(); ++y) { for (x = 0; x < n.GetWidth(); ++x) { if (*n.Get(y, x) != *n.Get(x, y)) { return false; } } } return true; }
bool is_number_of_neighbours_equal(const MATRIX &n) { real ns_old, ns_new; ns_old = get_number_of_neighbours(n, 0); for (unsigned int i = 1; i < n.GetWidth(); ++i) { ns_new = get_number_of_neighbours(n, i); if (ns_old != ns_new) { return false; } } return true; }