I have data formatted like {{a,b},{c,d},{e,f}}
where each entry is an integer. I need to turn this in to a sparse array with entries {a,1}->1, {b,1}->1, {c,2}->1, ... {f,3}->1
and so on. In other words, if $x$ is an integer in the $j$th list, we need coordinate $(x,j)$ of the sparse matrix to be $1$.
How should I accomplish this?
IncidenceMatrix[]
. $\endgroup$