18 #ifndef OPERATOR_TIMES_HPP
19 #define OPERATOR_TIMES_HPP
22 if(
nullptr ==
M)
return nullptr;
25 return std::forward<unique_ptr<MetaMat<T>>>(
M);
29 if(
nullptr ==
M)
return nullptr;
31 auto N =
M->make_copy();
40 template<sp_d T>
const shared_ptr<MetaMat<T>>&
operator*=(
const shared_ptr<
MetaMat<T>>& M,
const T value) {
46 auto M = B->make_copy();
53 return std::forward<unique_ptr<MetaMat<T>>>(B);
57 A->operator+=(std::forward<unique_ptr<MetaMat<T>>>(B));
58 return std::forward<unique_ptr<MetaMat<T>>>(
A);
67 M->operator+=(std::forward<unique_ptr<MetaMat<T>>>(
A));
const shared_ptr< MetaMat< T > > & operator*=(const shared_ptr< MetaMat< T >> &M, const T value)
Definition: operator_times.hpp:40
unique_ptr< MetaMat< T > > operator+(const shared_ptr< MetaMat< T >> &A, const shared_ptr< MetaMat< T >> &B)
Definition: operator_times.hpp:45
unique_ptr< MetaMat< T > > operator*(const T value, unique_ptr< MetaMat< T >> &&M)
Definition: operator_times.hpp:21
const shared_ptr< MetaMat< T > > & operator+=(const shared_ptr< MetaMat< T >> &M, const shared_ptr< MetaMat< T >> &A)
Definition: operator_times.hpp:61