Skip to content

Doesn't work for a fully connected weighted graph #3

Description

@qxu1994

Thanks for the code!

I'm trying to calculate SWP for my fully connected weighted graph which contains 10 nodes. A further check shows that the program was stuck within the while loop in regular_matrix_generator( ), as B[a, z] was always 0 when z equals to 4. Maybe the approximate radius in small_world_propensity( ) should be adjusted?

Here is a preview of the 10x10 input matrix:

array([[0.        , 0.49810255, 0.23660737, ..., 0.24742661, 0.16791965, 0.41762051],
       [0.49810255, 0.        , 0.24386877, ..., 0.14405741, 0.16249932, 0.33356544],
       [0.23660737, 0.24386877, 0.        , ..., 0.18854478, 0.08817706, 0.17486422],
       ...,
       [0.24742661, 0.14405741, 0.18854478, ..., 0.        , 0.12500563, 0.30264562],
       [0.16791965, 0.16249932, 0.08817706, ..., 0.12500563, 0.        , 0.08587351],
       [0.41762051, 0.33356544, 0.17486422, ..., 0.30264562, 0.08587351, 0.        ]])
 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions