private void Merge(ObservableArray tab, int left, int center, int right) {
        Double[] temp = new Double[(right - left) + 1];
        int leftIndex = left;
        int rightIndex = center + 1;

        int i = 0;

        while (leftIndex <= center && rightIndex <= right) {
            if (tab.Less(leftIndex, rightIndex)) {
                temp[i] = tab.Tab[leftIndex++];
            } else {
                temp[i] = tab.Tab[rightIndex++];
            }
            i++;
        }

        while (leftIndex <= center) {
            temp[i] = tab.Tab[leftIndex++];
            i++;
        }

        while (rightIndex <= right) {
            temp[i] = tab.Tab[rightIndex++];
            i++;
        }

        for (i = 0; i < temp.length; i++) {
            tab.place(left + i, temp[i]);
        }
    }