Best and simple data structure
        Posted  
        
            by anshu
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by anshu
        
        
        
        Published on 2010-03-15T17:53:59Z
        Indexed on 
            2010/03/15
            17:59 UTC
        
        
        Read the original article
        Hit count: 594
        
vb.net
I am trying to create the below matrix in my vb.net so during processing I can get the match scores for the alphabets, for example: What is the match for A and N?, I will look into my inbuilt matrix and return -2 Similarly, What is the match for P and L?, I will look into my inbuilt matrix and return -3
Please suggest me how to go about it, I was trying to use nested dictionary like this:
Dim myNestedDictionary As New Dictionary(Of String, Dictionary(Of String, Integer))()
Dim lTempDict As New Dictionary(Of String, Integer)
lTempDict.Add("A", 4)
myNestedDictionary.Add("A", lTempDict)
The other way could be is to read the Matrix from a text based file and then fill the two dimensional array.
Thanks.

© Stack Overflow or respective owner