Random graph generator
From WandoraWiki
(Difference between revisions)
Line 5: | Line 5: | ||
## Select two random topics | ## Select two random topics | ||
## Create association between selected topics | ## Create association between selected topics | ||
+ | |||
+ | Here '''n''' and '''m''' are integers given by the user. Second algrithm relies on association probability and is | ||
+ | |||
+ | # Create '''n''' topics | ||
+ | # For each topic combination ('''n''' * '''n''') | ||
+ | ## Get random number | ||
+ | ## if random number is bigger than given limit '''p''' then create association between the topic combination | ||
+ | |||
+ | Here '''n''' and '''p''' are user given. '''n''' is integer while '''p''' is a float between 0 and 1. |
Revision as of 20:16, 8 June 2007
Random graph generator creates a topic map with random number of topics and associations between. New topics and associations are created to current layer. Random graph generator has two different association creation algorithms. First algorithm is
- Create n topics
- Loop m times
- Select two random topics
- Create association between selected topics
Here n and m are integers given by the user. Second algrithm relies on association probability and is
- Create n topics
- For each topic combination (n * n)
- Get random number
- if random number is bigger than given limit p then create association between the topic combination
Here n and p are user given. n is integer while p is a float between 0 and 1.