def _compute_default_order()

in theseus/optimizer/variable_ordering.py [0:0]


    def _compute_default_order(self, objective: Objective):
        assert not self._var_order and not self._var_name_to_index
        cur_idx = 0
        for variable_name, variable in objective.optim_vars.items():
            if variable_name in self._var_name_to_index:
                continue
            self._var_order.append(variable)
            self._var_name_to_index[variable_name] = cur_idx
            cur_idx += 1