<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add(self, datapoint):
 """ Adds the datapoint to the tensor if room is available. """

        if not self.is_full:
            self.set_datapoint(self.cur_index, datapoint)
            self.cur_index += 1