CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
Loading...
Searching...
No Matches
ex01k_dense_vector_algebra_dot.cpp
#include <iostream>
#include <cla3p/dense.hpp>
#include <cla3p/algebra.hpp>
int main()
{
x = 3.;
y = 2.;
std::cout << "x:\n" << x;
std::cout << "y:\n" << y << "\n";
/*
* Perform the operation (x' * y) using operators and the dot function respectively
*/
cla3p::real_t d1 = x.transpose() * y;
std::cout << "d1: " << d1 << std::endl;
std::cout << "d2: " << d2 << std::endl;
return 0;
}
VirtualRowvec< T_Scalar > transpose() const
Transpose the vector.
double real_t
Double precision real.
Definition scalar.hpp:44
T_Scalar dot(const dns::XxVector< T_Scalar > &x, const dns::XxVector< T_Scalar > &y)
Calculate vector dot product.
XxVector< real_t > RdVector
Double precision real vector.
Definition dense.hpp:31