1# ifndef _RHEO_TINY_MATVEC_H
2# define _RHEO_TINY_MATVEC_H
30#include "rheolef/compiler.h"
76 void fill(
const T& val);
114#ifdef _RHEOLEF_PARANO
115 std::fill (t_, t_+
tiny_size_max, std::numeric_limits<T>::max());
121 : nrow_(nr), ncol_(nc), i0_(0), j0_(0)
124#ifdef _RHEOLEF_PARANO
127 t_[i][j] = std::numeric_limits<T>::max();
139#ifdef _RHEOLEF_PARANO
142 t_[i][j] = std::numeric_limits<T>::max();
150 for (
size_type i = i0_; i < i0_ + nrow_; i++)
151 for (
size_type j = j0_; j < j0_ + ncol_; j++)
159 b.resize (
a.ncol(),
a.nrow());
168 check_macro(
a.ncol()==
b.nrow(),
"Error in matrices sizes for multiplication, "
169 <<
a.nrow()<<
"x"<<
a.ncol() <<
" and "<<
b.nrow()<<
"x"<<
b.ncol());
176 c(i,j)+=
a(i,k)*
b(k,j);
183 check_macro(
a.ncol()==
u.size(),
"Error in matrice-vector sizes for multiplication, "
184 <<
a.nrow()<<
"x"<<
a.ncol() <<
" and "<<
u.size());
field::size_type size_type
size_type get_col_origin() const
tiny_matrix(size_type nr=0, size_type nc=0)
T & operator()(size_type i, size_type j)
void resize(size_type nr, size_type nc)
void set_origin(size_type i, size_type j)
size_type get_row_origin() const
tiny_vector< T >::size_type size_type
tiny_vector(size_type n=0)
const T & operator()(size_type i) const
void set_origin(size_type i)
size_type get_origin() const
const T & operator[](size_type i) const
std::vector< int >::size_type size_type
const unsigned int tiny_size_max
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
This file is part of Rheolef.
csr< T, sequential > trans(const csr< T, sequential > &a)
trans(a): see the form page for the full documentation
csr< T, sequential > operator*(const T &lambda, const csr< T, sequential > &a)