@@ -111,13 +111,13 @@ data class DoublesTensor(override val shape: Shape, val elements: DoubleArray) :
111111 }
112112 }
113113
114- override operator fun plus (tensor : Tensor ): Tensor {
115- return commutativeBinaryOperation(tensor as DoublesTensor ) { lhs, rhs -> lhs + rhs }
114+ override operator fun plus (other : Tensor ): Tensor {
115+ return commutativeBinaryOperation(other as DoublesTensor ) { lhs, rhs -> lhs + rhs }
116116 }
117117
118- override operator fun plus (scalar : Double ): Tensor {
118+ override operator fun plus (other : Double ): Tensor {
119119 return commutativeBinaryOperation(
120- DoublesTensor (Shape (1 ), scalar )
120+ DoublesTensor (Shape (1 ), other )
121121 ) { lhs, rhs -> lhs + rhs }
122122 }
123123
@@ -127,16 +127,16 @@ data class DoublesTensor(override val shape: Shape, val elements: DoubleArray) :
127127 ) { lhs, rhs -> lhs + rhs }
128128 }
129129
130- override operator fun minus (tensor : Tensor ): Tensor {
130+ override operator fun minus (other : Tensor ): Tensor {
131131 return nonCommutativeBinaryOperation(
132- tensor as DoublesTensor ,
132+ other as DoublesTensor ,
133133 { lhs, rhs -> lhs - rhs },
134134 { lhs, rhs -> rhs - lhs })
135135 }
136136
137- override operator fun minus (scalar : Double ): TypedTensor <Double > {
137+ override operator fun minus (other : Double ): TypedTensor <Double > {
138138 return nonCommutativeBinaryOperation(
139- DoublesTensor (Shape (1 ), scalar ),
139+ DoublesTensor (Shape (1 ), other ),
140140 { lhs, rhs -> lhs - rhs },
141141 { lhs, rhs -> rhs - lhs })
142142 }
0 commit comments