⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gridvector.tcc

📁 Flens库-一个在C++的矩阵运算库
💻 TCC
字号:
namespace flens {//== GridVector1D ==============================================================template <typename RHS>GridVector1D &GridVector1D::operator=(const Vector<RHS> &rhs){    copy(rhs.impl(), *this);    return *this;}template <typename RHS>GridVector1D &GridVector1D::operator+=(const Vector<RHS> &rhs){    axpy(1., rhs.impl(), *this);    return *this;}//== GridVector2D ==============================================================template <typename RHS>GridVector2D &GridVector2D::operator=(const Vector<RHS> &rhs){    copy(rhs.impl(), *this);    return *this;}template <typename RHS>GridVector2D &GridVector2D::operator+=(const Vector<RHS> &rhs){    axpy(1., rhs.impl(), *this);    return *this;}template <typename RHS>GridVector2D &GridVector2D::operator-=(const Vector<RHS> &rhs){    axpy(-1., rhs.impl(), *this);    return *this;}//== StaggeredGridVector2D =====================================================template <bool DirectionX, bool DirectionY>StaggeredGridVector2D<DirectionX, DirectionY>::StaggeredGridVector2D()    : rh(0){}template <bool DirectionX, bool DirectionY>StaggeredGridVector2D<DirectionX, DirectionY>::StaggeredGridVector2D(int _rh)    : rh(_rh), grid(_((DirectionX) ? -1: 0, rh),                    _((DirectionY) ? -1: 0, rh)){}template <bool DirectionX, bool DirectionY>StaggeredGridVector2D<DirectionX, DirectionY> &StaggeredGridVector2D<DirectionX, DirectionY>::operator=(double value){    grid = value;    return *this;}template <bool DirectionX, bool DirectionY>template <typename RHS>StaggeredGridVector2D<DirectionX, DirectionY> &StaggeredGridVector2D<DirectionX, DirectionY>::operator=(const Vector<RHS> &rhs){    copy(rhs.impl(), *this);    return *this;}template <bool DirectionX, bool DirectionY>template <typename RHS>StaggeredGridVector2D<DirectionX, DirectionY> &StaggeredGridVector2D<DirectionX, DirectionY>::operator+=(const Vector<RHS> &rhs){    axpy(1., rhs.impl(), *this);    return *this;}//------------------------------------------------------------------------------template <bool DirectionX, bool DirectionY>std::ostream &operator<<(std::ostream &out,           const StaggeredGridVector2D<DirectionX, DirectionY> &v){    out << v.grid;    return out;}} // namespace flens

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -