/******************** accessors *******************/
void sxMatrixAt(const SXMatrix & mat, int n, int m, SX & out) {
    out = SX(mat.indexed(n,m));
}