CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
Loading...
Searching...
No Matches
ex04a_guard_const_vector.cpp
#include <iostream>
#include <cla3p/dense.hpp>
int main()
{
/*
* Create a constant vector
*/
/*
* Get a shallow copy of the constant vector using the Guard class
*/
/*
* Get an immutable reference of the copied vector
*/
const cla3p::dns::RdVector& y = y_grd.get();
/*
* Get info of the two vectors
*/
std::cout << x.info("x") << y.info("y") << 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 vector.
XiVector< T_Scalar > rcopy()
Create a reference copy (shallow copy) of the vector.
static XxVector< real_t > random(int_t n, T_RScalar lo=T_RScalar(0), T_RScalar hi=T_RScalar(1))
XxVector< real_t > RdVector
Double precision real vector.
Definition dense.hpp:31