SwappedItems
struct SwappedItems
Structure defining the operation when sorting an Int array. There are two kinds of operations. You can either swap the values, indicated by the indexes first and second. Or you can move the value in first variable to the index specified by the second index value. currentIndex1 and currentIndex2 are indexes to the array the sorting method is currently “keeping focus on”. These are drawn as small circles in the centerline of the numbers.
-
The swap operations
See moreDeclaration
Swift
enum Operation
-
The operation to perform, default is swap.
Declaration
Swift
var operation: Operation
-
The index to swap or move values from. Value less than zero means that no move should be performed.
Declaration
Swift
var first: Int
-
The index to swap or move values to. Value less than zero means that no move should be performed.
Declaration
Swift
var second: Int
-
The first “current” index method is referring to. Shown in animation view.
Declaration
Swift
var currentIndex1: Int
-
The second “current” index method is referring to. Shown in animation view.
Declaration
Swift
var currentIndex2: Int