input: an index (pos) and a value changes the specified component (pos) with the 'value'
(self, pos: int, value: float)
| 143 | raise Exception("index out of range") |
| 144 | |
| 145 | def change_component(self, pos: int, value: float) -> None: |
| 146 | """ |
| 147 | input: an index (pos) and a value |
| 148 | changes the specified component (pos) with the |
| 149 | 'value' |
| 150 | """ |
| 151 | # precondition |
| 152 | assert -len(self.__components) <= pos < len(self.__components) |
| 153 | self.__components[pos] = value |
| 154 | |
| 155 | def euclidean_length(self) -> float: |
| 156 | """ |
no outgoing calls