|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
AgentType - the common type (of agents) that is contained as nodes in the networkEdgeType - the edge typepublic interface MoreNetwork<AgentType,EdgeType extends MoreEdge<? super AgentType>>
Specifies demands on network implementations.
| Method Summary | |
|---|---|
void |
addNode(AgentType node)
Add a node to the network. |
EdgeType |
connect(AgentType source,
AgentType target)
If there is already a connection object between these nodes it is removed and the given one added. |
void |
connect(EdgeType edge)
Adds an edge to this network. |
boolean |
containsNode(AgentType node)
Return true if the given node is contained within this network |
EdgeType |
disconnect(AgentType source,
AgentType target)
|
Iterable<AgentType> |
getAdjacent(AgentType ego)
|
int |
getDegree(AgentType ego)
|
EdgeType |
getEdge(AgentType source,
AgentType target)
|
Collection<EdgeType> |
getEdgesCollection()
|
MoreNetwork<AgentType,EdgeType> |
getGraphFilteredInstance(Graph<AgentType,EdgeType> graph,
String new_name)
The method is used to obtain a new Sub-MoreNetwork. |
int |
getInDegree(AgentType ego)
|
Graph<AgentType,EdgeType> |
getJungGraph()
Return a JUNG Graph object of this network. |
String |
getName()
|
Class<? extends MoreNetworkBuilder<?,?>> |
getNetworkBuilderClass()
|
String |
getNetworkInfo()
Provides some basic oinformation on the network: - number of links - number of edges - directedness |
Iterable<AgentType> |
getNodes()
|
int |
getOutDegree(AgentType ego)
|
Iterable<AgentType> |
getPredecessors(AgentType ego)
|
AgentType |
getRandomPredecessor(AgentType ego)
Return a random neighbour. |
AgentType |
getRandomSuccessor(AgentType ego)
Return a random neighbour. |
Iterable<AgentType> |
getSuccessors(AgentType ego)
|
double |
getWeight(AgentType source,
AgentType target)
|
boolean |
isAdjacent(AgentType ego,
AgentType alter)
|
boolean |
isDirected()
|
boolean |
isSuccessor(AgentType alter,
AgentType ego)
Checks whether there is a link from ego to alter. |
void |
normalizeWeights()
Normalises the edges' weights by dividing by the largest weight. |
int |
numEdges()
|
int |
numNodes()
|
void |
removeNode(AgentType node)
Removes a node and all its edges from the network. |
void |
reverseNetwork()
Returns a reversed network, i.e. for all edges source and target vertices are exchanged. |
void |
setEdgeFactory(MoreEdgeFactory<AgentType,EdgeType> edgeFac)
Sets the MoreEdgeFactory that is used to connect agents. |
void |
setNetworkBuilderClass(Class<? extends MoreNetworkBuilder<?,?>> builderClass)
|
void |
setWeight(AgentType source,
AgentType target,
double weight)
|
| Method Detail |
|---|
void addNode(AgentType node)
node - void removeNode(AgentType node)
node - boolean containsNode(AgentType node)
node -
MoreNetwork<AgentType,EdgeType> getGraphFilteredInstance(Graph<AgentType,EdgeType> graph,
String new_name)
Graph instance that contains subsets of
vertices and edges in the original MoreNetwork this method is applied to. For instance, such graphs may be a result
of a VertexPredicateFilter. The given graph needs to be of corresponding directedness! This (the original)
instance of MoreNetwork is not altered!
MoreNetwork containing only vertices and edges contained in given graph object
NoSuchElementException - when the given graph contains a vertex or an edge this network does not contain.
EdgeType connect(AgentType source,
AgentType target)
source - target -
void connect(EdgeType edge)
edge - to add to the network
EdgeType disconnect(AgentType source,
AgentType target)
source - target -
void setWeight(AgentType source,
AgentType target,
double weight)
source - target - weight - void normalizeWeights()
double getWeight(AgentType source,
AgentType target)
source - target -
Iterable<AgentType> getAdjacent(AgentType ego)
ego -
AgentType getRandomSuccessor(AgentType ego)
ego -
AgentType getRandomPredecessor(AgentType ego)
ego -
Iterable<AgentType> getPredecessors(AgentType ego)
ego -
Iterable<AgentType> getSuccessors(AgentType ego)
ego -
boolean isAdjacent(AgentType ego,
AgentType alter)
ego - alter -
boolean isSuccessor(AgentType alter,
AgentType ego)
ego - alter -
boolean isDirected()
int getDegree(AgentType ego)
ego -
int getInDegree(AgentType ego)
ego -
int getOutDegree(AgentType ego)
ego -
String getName()
Iterable<AgentType> getNodes()
int numEdges()
EdgeType getEdge(AgentType source,
AgentType target)
source - target -
Collection<EdgeType> getEdgesCollection()
int numNodes()
Graph<AgentType,EdgeType> getJungGraph()
void reverseNetwork()
Class<? extends MoreNetworkBuilder<?,?>> getNetworkBuilderClass()
void setNetworkBuilderClass(Class<? extends MoreNetworkBuilder<?,?>> builderClass)
void setEdgeFactory(MoreEdgeFactory<AgentType,EdgeType> edgeFac)
MoreEdgeFactory that is used to connect agents.
edgeFac - String getNetworkInfo()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||