#include <iostream>
#include <cla3p/dense.hpp>
#include <cla3p/sparse.hpp>
#include <cla3p/algebra.hpp>
int main()
{
std::cout << "A:\n" << A << "\n";
x = 2.;
std::cout << "x:\n" << x << "\n";
std::cout << "y1:\n" << y1;
std::cout << "y2:\n" << y2 << "\n";
y1 += A * x;
std::cout << "y1:\n" << y1;
std::cout << "y2:\n" << y2;
return 0;
}
csc::XxMatrix< T_Int, T_Scalar > toCsc(dup_t duplicatePolicy=dup_t::Sum) const
Convert to compressed sparse column (CSC) format.
void insert(const Tuple< T_Int, T_Scalar > &tuple)
Insert a non-zero element using a tuple.
@ N
Definition enums.hpp:74
void mult(T_Scalar alpha, op_t opA, const dns::XxMatrix< T_Scalar > &A, op_t opB, const dns::XxMatrix< T_Scalar > &B, T_Scalar beta, dns::XxMatrix< T_Scalar > &C)
Updates a general matrix with a matrix-matrix product.
XxMatrix< int_t, real_t > RdMatrix
Double precision real COO (Coordinate) matrix.
Definition sparse.hpp:111
XxMatrix< int_t, real_t > RdMatrix
Double precision real CSC (Compressed Sparse Column) matrix.
Definition sparse.hpp:73
XxVector< real_t > RdVector
Double precision real vector.
Definition dense.hpp:31