public class PointsOfInterestGenerator extends BaseGenerator
Modifier and Type | Class and Description |
---|---|
protected class |
PointsOfInterestGenerator.Addict
Defines data of a node.
|
protected static class |
PointsOfInterestGenerator.AddictNeighbor |
static class |
PointsOfInterestGenerator.Parameter |
protected class |
PointsOfInterestGenerator.PointOfInterest
Defines a point of interest.
|
SourceBase.ElementType
Modifier and Type | Field and Description |
---|---|
protected LinkedList<PointsOfInterestGenerator.Addict> |
addicts
List of addicts.
|
protected float |
addPeopleProbability
Probability to add a node during a step.
|
protected float |
addPointOfInterestProbability
Probability to add a new point-of-interest.
|
protected float |
averagePointsOfInterestCount
Average points of interest by addict.
|
private long |
currentId |
private long |
currentStep |
protected float |
delPeopleProbability
Probability to remove a node during a step.
|
protected float |
delPointOfInterestProbability
Probability to remove a point-of-interest.
|
protected float |
haveInterestProbability
Probability that a node becomes interested in a point-of-interest it was
not already interested.
|
protected int |
initialPeopleCount
Initial count of nodes.
|
protected int |
initialPointOfInterestCount
Initial count of point-of-interest.
|
protected float |
linkProbability |
protected int |
linksNeededToCreateEdge |
protected float |
lostInterestProbability
Probability that a node looses its interest for a point-of-interest.
|
protected LinkedList<PointsOfInterestGenerator.PointOfInterest> |
pointsOfInterest
List of point-of-interest.
|
addEdgeLabels, addNodeLabels, directed, edgeAttributeRange, edgeAttributes, internalGraph, nodeAttributeRange, nodeAttributes, random, randomlyDirected
attrSinks, eltsSinks, eventProcessing, eventQueue, sourceId, sourceTime
Constructor and Description |
---|
PointsOfInterestGenerator() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAddict() |
protected void |
addPointOfInterest() |
void |
begin()
Add initial count of points of interest, and initial count of people.
|
void |
end()
End the graph generation by finalizing it.
|
protected static String |
getEdgeId(String nodeA,
String nodeB) |
protected void |
killAddict(PointsOfInterestGenerator.Addict a) |
protected void |
killSomeone() |
static void |
main(String... args) |
boolean |
nextEvents()
Step of the generator.
|
protected void |
removePointOfInterest(PointsOfInterestGenerator.PointOfInterest poi) |
protected void |
removeRandomPointOfInterest() |
void |
setParameter(PointsOfInterestGenerator.Parameter p,
Object value) |
addEdge, addEdgeAttribute, addEdgeLabels, addNode, addNode, addNodeAttribute, addNodeLabels, clearKeptData, delEdge, delNode, isUsingInternalGraph, removeEdgeAttribute, removeNodeAttribute, setDirectedEdges, setEdgeAttributesRange, setNodeAttributesRange, setRandomSeed, setUseInternalGraph
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, manageEvents, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeAttributeAdded, sendEdgeAttributeAdded, sendEdgeAttributeChanged, sendEdgeAttributeChanged, sendEdgeAttributeRemoved, sendEdgeAttributeRemoved, sendEdgeRemoved, sendEdgeRemoved, sendGraphAttributeAdded, sendGraphAttributeAdded, sendGraphAttributeChanged, sendGraphAttributeChanged, sendGraphAttributeRemoved, sendGraphAttributeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeAttributeAdded, sendNodeAttributeAdded, sendNodeAttributeChanged, sendNodeAttributeChanged, sendNodeAttributeRemoved, sendNodeAttributeRemoved, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBegins
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSink
protected int initialPeopleCount
protected float addPeopleProbability
protected float delPeopleProbability
protected float haveInterestProbability
protected float lostInterestProbability
protected int initialPointOfInterestCount
protected float addPointOfInterestProbability
protected float delPointOfInterestProbability
protected float averagePointsOfInterestCount
protected int linksNeededToCreateEdge
protected float linkProbability
protected LinkedList<PointsOfInterestGenerator.Addict> addicts
protected LinkedList<PointsOfInterestGenerator.PointOfInterest> pointsOfInterest
private long currentId
private long currentStep
public PointsOfInterestGenerator()
public void setParameter(PointsOfInterestGenerator.Parameter p, Object value)
public void begin()
Generator.begin()
public boolean nextEvents()
delPeopleProbability
. Try to add a node according to the
addPeopleProbability
. Try to remove a point of interest
according to the delPointOfInterestProbability
. Try to add a
point of interest according to the addPointOfInterestProbability
. Then, step of addicts.PointsOfInterestGenerator.Addict.step()
,
Generator.nextEvents()
public void end()
BaseGenerator
Generator.nextEvents()
method returned false (or even if you stop before), this method must be
called to finish the graph.
In addition, BaseGenerator adds a "clear" operations that removes all the
kept edges and nodes identifiers and the associated data.end
in interface Generator
end
in class BaseGenerator
protected void addPointOfInterest()
protected void removePointOfInterest(PointsOfInterestGenerator.PointOfInterest poi)
protected void removeRandomPointOfInterest()
protected void addAddict()
protected void killAddict(PointsOfInterestGenerator.Addict a)
protected void killSomeone()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses