In the MTBDD world, questions are seldom trivial :)
Depending on what you want to do, there are several approaches. If you
consider the matrix to range over the full state space that is spanned
by the row and column MTBDD variables (i.e., for n row/col variables you
have states 0 ... 2^n-1), you can encode the row index as an assignment
to the row variables, the column index as an assignment to the column
variables and then use Cudd_Eval to obtain the constant corresponding to
that matrix entry. See, e.g., the code in DD_PrintMatrix
If you want to consider trans to be a matrix over a subset of the state
space (i.e., only the reachable states), things get a bit more tricky.
Here, you have to be able to convert between the state index (0th
reachable state, 1st reachable state, ...) and the corresponding
assignment. For that purpose, PRISM maintains an ODD data structure that
allows to compute the state index of a row variable assignment and vice
versa. Consider the code in
which is used for this purpose (e.g., for exporting the .tra file of the
transition matrix). For convenience, an explicit (sparse) matrix is
generated here (over the reachable states, taking the ODD information
into account) and then there is iteration over the entries of that matrix.
Does this help?