Class: NoSE::Random::BarbasiAlbertNetwork
- Defined in:
- lib/nose/random/barbasi_albert.rb
Overview
Generates a random graph using the Barbasi-Albert model
Instance Attribute Summary
Attributes inherited from Network
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ BarbasiAlbertNetwork
constructor
A new instance of BarbasiAlbertNetwork.
Methods inherited from Network
Constructor Details
#initialize(params = {}) ⇒ BarbasiAlbertNetwork
Returns a new instance of BarbasiAlbertNetwork.
7 8 9 10 11 12 13 14 |
# File 'lib/nose/random/barbasi_albert.rb', line 7 def initialize(params = {}) super params # We assume for now that m0 = m = 2 create_entities add_foreign_keys end |