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(Cursor const& c, size_type position) const { using mtl::num_rows; return type(c.ref, std::min(num_rows(c.ref), position), *c); }
type lower_bound(Matrix const& c, size_type position) const { using mtl::num_rows; return type(std::min(num_rows(c), position), c); }
type end(Cursor const& c) const { using mtl::num_rows; return type(c.ref, num_rows(c.ref), *c); }
type end(Matrix const& c) const { using mtl::num_rows; using mtl::matrix::num_rows; return type(num_rows(c), c); //return type(c.end_row(), c); }