Commit 1f041016 by xiaotong

overload of +

parent 78a228b7
...@@ -460,7 +460,7 @@ XTensor XTensor::operator+ (const XTensor& tensor) ...@@ -460,7 +460,7 @@ XTensor XTensor::operator+ (const XTensor& tensor)
} }
/* overloading of the plus-sign */ /* overloading of the plus-sign */
XTensor XTensor::operator+ (const DTYPE shift) XTensor XTensor::operator+ (const DTYPE shift) const
{ {
return ScaleAndShift(*this, 1, shift); return ScaleAndShift(*this, 1, shift);
} }
......
...@@ -225,7 +225,7 @@ public: ...@@ -225,7 +225,7 @@ public:
XTensor operator+ (const XTensor &tensor); XTensor operator+ (const XTensor &tensor);
/* overloading of the plus-sign */ /* overloading of the plus-sign */
XTensor operator+ (const DTYPE shift); XTensor operator+ (const DTYPE shift) const;
/* overloading of the multiply-sign */ /* overloading of the multiply-sign */
XTensor operator* (const XTensor &tensor); XTensor operator* (const XTensor &tensor);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论