Ejemplo n.º 1
0
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"));

}
Ejemplo n.º 2
0
	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);
	}
Ejemplo n.º 3
0
	type lower_bound(Matrix const& c, size_type position) const
	{
		using mtl::num_rows;
	    return type(std::min(num_rows(c), position), c);
	}
Ejemplo n.º 4
0
	type end(Cursor const& c) const { using mtl::num_rows; return type(c.ref, num_rows(c.ref), *c); }
Ejemplo n.º 5
0
	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);
	}