[mlpack-git] [mlpack] Adds inplace transpose method and some tests. (#408)
Glazachev Vladimir
notifications at github.com
Sat Feb 21 19:55:17 EST 2015
> +
> + mat Y = X;
> +
> + BOOST_REQUIRE(arma::inplace_transpose(X) == false);
> + BOOST_REQUIRE_EQUAL(X.n_rows, 4);
> + BOOST_REQUIRE_EQUAL(X.n_cols, 2);
> +
> + for (size_t i = 0; i < X.n_rows; ++i)
> + for (size_t j = 0; j < X.n_cols; ++j)
> + BOOST_REQUIRE_CLOSE(X.at(i, j), Y.at(j, i), 1e-5);
> +}
> +
> +/**
> + * Try to transpose using low-mem method.
> + */
> +BOOST_AUTO_TEST_CASE(InplaceTransposeLowMemTest)
works very long..
---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/408/files#r25127656
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150221/d0758788/attachment.html>
More information about the mlpack-git
mailing list