CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
Loading...
Searching...
No Matches
ex04b_guard_const_matrix.cpp
#include <iostream>
#include <cla3p/dense.hpp>
int main()
{
/*
* Create a constant matrix
*/
/*
* Get a shallow copy of a block of A using the Guard class
*/
/*
* Get an immutable reference of the block
*/
const cla3p::dns::RdMatrix& A22 = Agrd22.get();
/*
* Get info of A22
*/
std::cout << A22.info("A22") << std::endl;
return 0;
}
Immutable object wrapper.
Definition guard.hpp:37
const T_Object & get() const
Retrieves the guarded object.
Definition guard.hpp:96
std::string info(const std::string &header="") const
Get information about the matrix.
XxMatrix< T_Scalar > rblock(int_t ibgn, int_t jbgn, int_t ni, int_t nj)
Extract a reference block.
static XxMatrix< real_t > random(int_t nr, int_t nc, const Property &pr=Property::General(), T_RScalar lo=T_RScalar(0), T_RScalar hi=T_RScalar(1))
XxMatrix< real_t > RdMatrix
Double precision real matrix.
Definition dense.hpp:55