So I added a docstring to construct_upper_mapping() that hopefully 
explains the "final goal" of all this witchcraft.

It's possible that there's a more elegant way to do all this stuff, but 
it's not obvious to me at the moment...

On 01/19/2013 11:58 AM, Robert McGibbon wrote:
>
> In src/python/MSMLib.py:
>
> > +        self.partial_counts.eliminate_zeros()
> > +        self.partial_i, self.partial_j = self.partial_counts.nonzero()
> > +        self.partial_diag_indices = np.where(self.partial_i == self.partial_j)[0]
> > +
> > +        self.construct_upper_mapping()
> > +
> > +        self.stencil = self.partial_counts.copy()
> > +        self.stencil.data[:] = 1.
> > +
> > +        self.full_diag_indices = np.where(self.full_i == self.full_j)[0]
> > +
> > +    def construct_upper_mapping(self):
> > +        partial_ij_to_data = {}
> > +        for k, i in enumerate(self.partial_i):
> > +            j = self.partial_j[k]
> > +            partial_ij_to_data[i, j] = k
>
> this is a little tricky? what exactly is the mapping here to?
>
> is |(i,j)| in 2D counts matrix to the index in |self.partial_counts|?
>
> is this sort of like a DOK sparse matrix then?
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/SimTk/msmbuilder/pull/119/files#r2705878>.
>