'Saves the values of the optimal primal/dual variables.
Parameters
results_vec : array_like
A vector containing the variable values.
objects : list
The variables or constraints where the values will be stored.
offset_map : dict
A map of object id to offset in the results vector.'

def _save_values(self, result_vec, objects, offset_map):

    if (len(result_vec) > 0):
        result_vec = intf.DEFAULT_INTF.const_to_matrix(result_vec)
    for obj in objects:
        (rows, cols) = obj.size
        if (obj.id in offset_map):
            offset = offset_map[obj.id]
            if ((rows, cols) == (1, 1)):
                value = intf.index(result_vec, (offset, 0))
            else:
                value = intf.DEFAULT_INTF.zeros(rows, cols)
                intf.DEFAULT_INTF.block_add(value, result_vec[offset:(offset + (rows * cols))], 0, 0, rows, cols)
            offset += (rows * cols)
        else:
            value = intf.DEFAULT_INTF.zeros(rows, cols)
        obj.save_value(value)
