|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.uci.ics.jung.random.generators.BarabasiAlbertGenerator
Simple evolving scale-free random graph generator. At each time step t, a new vertex is created and m new edges are created and wired to pre-existing edges according the principle of "preferential attachment" whereby vertices with more existing edges have a higher probability of being selected for attachment at the current time step. The precise algorithm used here is a variant of the LCD model in that parallel edges are not allowed.
| Constructor Summary | |
BarabasiAlbertGenerator(int numEdgesToAttach)
Constructs a new instance of the generator |
|
BarabasiAlbertGenerator(int numEdgesToAttach,
int seed)
Constructs a new instance of the generator |
|
| Method Summary | |
void |
evolveGraph(int numTimeSteps)
Instructs the algorithm to evolve the graph N time steps and return the most current evolved state of the graph |
ArchetypeGraph |
generateGraph()
Returns a copy of the evolved graph in its current state |
int |
getNumElapsedTimeSteps()
Retrieves the total number of time steps elapsed |
void |
reset()
Resets the random graph to have zero vertices and zero edges and resets the elapsed time to 0. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BarabasiAlbertGenerator(int numEdgesToAttach,
int seed)
numEdgesToAttach - the number of edges that should be attached from the
new vertex to pre-existing vertices at each time stepseed - random number seedpublic BarabasiAlbertGenerator(int numEdgesToAttach)
numEdgesToAttach - the number of edges that should be attached from the
new vertex to pre-existing vertices at each time step| Method Detail |
public void evolveGraph(int numTimeSteps)
EvolvingGraphGenerator
evolveGraph in interface EvolvingGraphGeneratornumTimeSteps - number of time steps to simulate from its
current statepublic int getNumElapsedTimeSteps()
EvolvingGraphGenerator
getNumElapsedTimeSteps in interface EvolvingGraphGeneratorpublic ArchetypeGraph generateGraph()
EvolvingGraphGenerator
generateGraph in interface EvolvingGraphGeneratorpublic void reset()
EvolvingGraphGenerator
reset in interface EvolvingGraphGenerator
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||