The Data Cube As a Typed Linear Algebra Operator