3.1 Slicing

Slicing means to fix a particular member of one or several of the dimensions (we call them “fixed” dimensions) by discarding all tuples containing any of the other members of the fixed dimensions. Then we remove the particular (fixed) members from all tuples. The result is a datacube with fewer dimensions.

PIC
Figure 2: Slicing a Cube

Figure 2 shows a 3-dimensional cube. The left part selects a slice – the grey part – of a 2-dimensional cube by fixing the member 3 of dimension 1. The right part selects a slice of 1-dimensional cube by fixing the member 3 of dimension 1 and the member 1 of dimension 3. In both cases, the dimension is reduced and the result is another datacube of lower dimension.

In fact, the operation “slicing on more than one dimensions” can be reduced to a sequence of “slicing on a single dimension”. The operation is commutative and associative on the dimensions, meaning that the order which it is applied to the “fixed” dimensions does not matter. “Slicing on a single dimension” reduced the dimension by one. Hence, applying this sliding operation to an n-dimensional cube, generates a (n - 1)-dimensional cube. One can apply this operation at most n times successively to get a 0-dimensional cube, say a single cell of the original datacube.

In the mathematical notation, slicing is to generate a sub-cube as follows. As an example, let’s start with a 3-dimensional cube ai,j,k with i I,j J,k K and I = {i1,i2,,im}, J = {j1,j2,,jn}, and K = {k1,k2,,kp}. Let’s fix the member k2 K. The result is a cube of dimension 2, say bi,j.

bi,j ← ai,j,k2

means that for each (i,j) I × J tuple in the cube ai,j,k, the value of the cell is copied (or mapped) to the corresponding cell in bi,j. It is in fact a matrix-assignment. Fixing two members in the different dimensions I and K generates a 1-dimensional cube, say cj:

c ←  a        forall j ∈ J
 j    i3,j,k2

The operation means that for each (i,j)-combination in the cube a, the value of the cell is copied to the corresponding cell in b. It is in fact matrix-assignment.