void test(Vector& v, const char* name) { using mtl::size; using mtl::num_rows; using mtl::num_cols; cout << "\n" << name << "\n"; cout << "size(v) = " << size(v) << "\n"; // Value is less critical main purpose of the test is to check compilibilit MTL_THROW_IF(size(v) != 3, mtl::runtime_error("Vector size should be 3")); cout << "num_rows(v) = " << num_rows(v) << "\n"; // Value is less critical main purpose of the test is to check compilibilit MTL_THROW_IF(num_rows(v) != 3, mtl::runtime_error("Vector number of rows should be 3")); cout << "num_cols(v) = " << num_cols(v) << "\n"; // Value is less critical main purpose of the test is to check compilibilit MTL_THROW_IF(num_cols(v) != 1, mtl::runtime_error("Vector number of columns should be 1")); }
type lower_bound(Matrix const& c, size_type position) const { using mtl::num_cols; return type(std::min(num_cols(c), position), c); }
type lower_bound(Cursor const& c, size_type position) const { using mtl::num_cols; return type(c.ref, *c, std::min(num_cols(c.ref), position)); }
type end(Matrix const& c) const { using mtl::num_cols; return type(num_cols(c), c); // return type(c.end_col(), c); }
type end(Cursor const& c) const { using mtl::num_cols; return type(c.ref, *c, num_cols(c.ref)); }