     @checkIndexes("eq", [i, j])
     @compares++
     @animationQueuePush(type: "compare", i: i, j: j)
-    @values[i].value == @values[j].value
+    @get(i) == @get(j)
 
   neq: (i, j) =>
     @checkIndexes("neq", [i, j])
     @compares++
     @animationQueuePush(type: "compare", i: i, j: j)
-    @values[i].value != @values[j].value
+    @get(i) != @get(j)
 
   lt: (i, j) =>
     @checkIndexes("lt", [i, j])
     @compares++
     @animationQueuePush(type: "compare", i: i, j: j)
-    @values[i].value < @values[j].value
+    @get(i) < @get(j)
 
   gt: (i, j) =>
     @checkIndexes("gt", [i, j])
     @compares++
     @animationQueuePush(type: "compare", i: i, j: j)
-    @values[i].value > @values[j].value
+    @get(i) > @get(j)
 
   lte: (i, j) =>
     @checkIndexes("lte", [i, j])
     @compares++
     @animationQueuePush(type: "compare", i: i, j: j)
-    @values[i].value <= @values[j].value
+    @get(i) <= @get(j)
 
   gte: (i, j) =>
     @checkIndexes("gte", [i, j])
     @compares++
     @animationQueuePush(type: "compare", i: i, j: j)
-    @values[i].value >= @values[j].value
+    @get(i) >= @get(j)
 
   highlight: (indices) =>
     if !$.isArray indices

    for indice, i in indices
      throw new Error("#{methodName}, argument #{i+1} : #{indice} is not a valid index") if not (0 <= indice < @values.length)

  swap: (i, j) =>
    @checkIndexes("swap", [i, j])
    @swaps++
    if i == j
      return
    @animationQueuePush(type: "swap", i: i, j: j)
    [@values[i], @values[j]] = [@values[j], @values[i]]

  insert: (i, j) =>
    @checkIndexes("insert", [i, j])
    @inserts++
    @shifts += Math.abs(j - i)
    if i == j
      return
    @animationQueuePush(type: "insert", i: i, j: j)

  ###
  clearContext: ->
    @ctx.clearRect 0, 0, @pxWidth, @height

  ###
  # Redraw a part of the canvas.
  # @param {array[number]} range array of the indices to redraw. It must
