drepr/old_code/prototype/drepr/services/index_iterator.py
def next(self) -> Optional[List[int]]:
        """Get the next index by move current index back one step and return it"""
        if self.no_more_val:
            return None

        for dim_pivot in self.unfrozen_dimensions:
            self.curr_index[dim_pivot] -= self.step_sizes[dim_pivot]
            if self.curr_index[dim_pivot] < self.lower_bound_index[dim_pivot]:
                self.curr_index[
                    dim_pivot] = self.upper_bound_index[dim_pivot] - self.step_sizes[dim_pivot]
            else:
                return self.curr_index
        else:
            self.no_more_val = True
            if len(self.unfrozen_dimensions) == 0:
                return self.curr_index
            else:
                return None
Get the next index by move current index back one step and return it
Get the next index by move current index back one step and return it
Get the next index by move current index back one step and return it
def next(self) -> Optional[List[int]]:
        if self.no_more_val:
            return None
        for dim_pivot in self.unfrozen_dimensions:
            self.curr_index[dim_pivot] -= self.step_sizes[dim_pivot]
            if self.curr_index[dim_pivot] < self.lower_bound_index[dim_pivot]:
                self.curr_index[
                    dim_pivot] = self.upper_bound_index[dim_pivot] - self.step_sizes[dim_pivot]
            else:
                return self.curr_index
        else:
            self.no_more_val = True
            if len(self.unfrozen_dimensions) == 0:
                return self.curr_index
            else:
                return None
def next ( self ) -> Optional [ List [ int ] ] : if self . no_more_val : return None for dim_pivot in self . unfrozen_dimensions : self . curr_index [ dim_pivot ] -= self . step_sizes [ dim_pivot ] if self . curr_index [ dim_pivot ] < self . lower_bound_index [ dim_pivot ] : self . curr_index [ dim_pivot ] = self . upper_bound_index [ dim_pivot ] - self . step_sizes [ dim_pivot ] else : return self . curr_index else : self . no_more_val = True if len ( self . unfrozen_dimensions ) == 0 : return self . curr_index else : return None
Get the next index by move current index back one step and return it
Get the next index by move current index back one step and return it
"""Get the next index by move current index back one step and return it"""
self