Stiivi/cubes — Issue #19: Cell cutting refactoring and improvement
Author: Stiivi
Created: 2012-02-17 12:32:51+00:00
State: open
Labels: change

There should be better cell cutting. Currently there are three ways for creating a cell:

* initialization from list of cuts
* slicing through one dimension point with Cell.slice(dimension, path)
* slicing with multiple cuts with Cell.multi_slice(cuts)

Issues:
* The two slicing method have similar name but different approach
* If one wants to add single cut to the cell, the only way is to use Cell.multi_slice([cut]) which is not very nice nor intuitive

Proposal:

* keep initialization with cuts
* add method for adding a single cut: slice(cut)
* add methods for slicing: slice_point(), slice_set(), slice_range() (?)

Still unsure about:

* should Cell be mutable or immutable?
* method naming/verbs: cut vs. slice. "Slice & Dice" is common in OLAP terminology, however slice is more part of the cube where "cut" is kind of point/line/boundary definition how the cell slice should be created from the cube.