C++ boost::ublas::matrix














































C++ boost::ublas::matrix



MATRIX The templated class matrix<T, F, A> is the base container adaptor for dense matrices.
For a (k x l)-dimensional matrix and 0 <= k < m, 0 <= l < n every element
mat[k],[l] is mapped to the (k x n + l)-th element of the container
for row major orientation or the (k + l x m)-th element
of the container for column major orientation. #include <boost/numeric/ublas/io.hpp> #include <boost/numeric/ublas/matrix.hpp> using namespace std; int main () { using namespace boost::numeric::ublas; matrix<double> mat (2, 2);//creating a 2x2 matrix for (unsigned k = 0; k < mat.size1 (); ++ k) for (unsigned j = 0; l < mat.size2 (); ++ l) mat (k, l) = 2 * k + l; cout << mat <<endl;//printing a 2x2 matrix }

More Articles of Shikhar Vashistha:

Name Views Likes
Header File to find maximum of given three numbers 54 49
C++ boost::ublas::matrix::triangular matrix 338 4
C++ boost::ublas::matrix::scalar matrix 266 4
C++ boost ::ublas::matrix::zero matrix 440 9
C++ boost::ublas::matrix::identity matrix 326 4
C++ boost::ublas::matrix 346 1
C++ boost::ublas::binary operator 226 4
C++ boost::ublas::unary operator 246 2
C++ boost::ublas::vector_proxies::vector_slice 236 9
C++ boost::ublas::vector_proxies::vector_range 228 3
C++ boost::ublas::cordinate vector 229 5
C++ boost::ublas::compressed vector 282 2
C++ boost::ublas::mapped vector 240 7
C++ boost::ublas::scalar vector 339 68
C++ boost::ublas::zero vector 320 6
C++ boost::ublas::vector::unit vector 310 8
C++ boost::GIL::view transformation functions 319 8
tu 171 9
C++ boost::uBLAS::uBLAS vs Eigen 723 5
C++ boost::GIL::Image_parameter_resolutions 207 49
C++ boost::uBLAS::mapped_matrix 207 2
C++ boost::GIL::How to interpret errors easily 207 9
C++ boost::GIL::x_luminosity using a dynamic image 194 25
C++ boost::GIL::specific time enumerations 225 33
C++ boost::uBLAS::Why ublas 240 39
C++ boost::GIL::advantages and disadvantages of run time views 218 60
C++ boost::Ublas::Indexed two way iterator 216 6
C++ boost::uBLAS 214 93
C++ boost::GIL::Transpose image on disk 282 7
C++ Image Processing 248 6
C++ boost::GIL::gradient over even pixels of the image. 276 96
C++ boost::GIL::gradient over blue channel of RGB image 224 8
C++ boost::GIL::Y_Gradient 237 43
C++ boost ::GIL::luminosity_gradient 246 3
C++ boost::GIL::x_gradient(over any channel ordering) 273 2
Cpp program to convert a tree to forest of even nodes 249 14

Comments