returns a zero-vector of size 'dimension'
(dimension)
| 196 | |
| 197 | |
| 198 | def zeroVector(dimension): |
| 199 | """ |
| 200 | returns a zero-vector of size 'dimension' |
| 201 | """ |
| 202 | # precondition |
| 203 | assert isinstance(dimension, int) |
| 204 | ans = [] |
| 205 | for i in range(dimension): |
| 206 | ans.append(0) |
| 207 | return Vector(ans) |
| 208 | |
| 209 | |
| 210 | def unitBasisVector(dimension, pos): |