de.cesr.more.measures.node.supply
Class MCompNetInfoSupplier
java.lang.Object
de.cesr.more.measures.MAbstractMeasureSupplier
de.cesr.more.measures.node.supply.MCompNetInfoSupplier
- All Implemented Interfaces:
- MoreMeasureSupplier
public class MCompNetInfoSupplier
- extends MAbstractMeasureSupplier
- Date:
- 19.01.2010
Method Summary |
protected static
|
getAdjacentValues(MoreNetwork<AgentType,E> network,
AgentType agent,
AgentType precessor,
String key,
int reach,
int curReach,
double weight)
Recursively sums up values of the given key of agents within the distance given by reach. |
static
|
getCompoundValue(MoreNetwork<AgentType,E> network,
AgentType agent,
MoreComboundNetworkInfo netInfo)
Calculated the compound network information as specified and writes the result as value
of the MoreComboundNetworkInfo object. |
static
|
getNumReachedNodes(MoreNetwork<A,E> network,
A center,
A predecessor,
int reach,
int curReach)
Analogue to MCompNetInfoSupplier#getAdjacentValues(LaraNetwork, LaraAgent, LaraAgent, String, int, int, double) nodes
may be considered more than once because of paths. |
MCompNetInfoSupplier
public MCompNetInfoSupplier()
getCompoundValue
public static <AgentType extends MoreValueProvidingAgent,E extends MoreEdge<? super AgentType>> MoreComboundNetworkInfo getCompoundValue(MoreNetwork<AgentType,E> network,
AgentType agent,
MoreComboundNetworkInfo netInfo)
- Calculated the compound network information as specified and writes the result as value
of the
MoreComboundNetworkInfo
object. NOTE: the passed object is altered and returned!
When the distance of node within reach to the centre is more than 1, the weights along the path
are multiplied. For weights < 1 this means a discount for distant nodes. Normalized weights are
considered.
- Type Parameters:
A
- agent typeE
- edge type- Parameters:
network
- agent
- netInfo
-
- Returns:
- MoreComboundNetworkInfo
getAdjacentValues
protected static <AgentType extends MoreValueProvidingAgent,E extends MoreEdge<? super AgentType>> double getAdjacentValues(MoreNetwork<AgentType,E> network,
AgentType agent,
AgentType precessor,
String key,
int reach,
int curReach,
double weight)
- Recursively sums up values of the given key of agents within the distance given by reach.
The average is calculated whereas the weight decreases with increasing distance to the start
agent. The value of the given agent is not considered.
If a node is connected to the centered agent via different path, both paths count since additional
paths increase the opportunity to get informed!
- Type Parameters:
AgentType
- - Parameters:
network
- agent
- precessor
- key
- reach
- curReach
- weight
-
- Returns:
getNumReachedNodes
public static <A extends MoreValueProvidingAgent,E extends MoreEdge<? super A>> int getNumReachedNodes(MoreNetwork<A,E> network,
A center,
A predecessor,
int reach,
int curReach)
- Analogue to
MCompNetInfoSupplier#getAdjacentValues(LaraNetwork, LaraAgent, LaraAgent, String, int, int, double)
nodes
may be considered more than once because of paths. However, a path by which an agent was reached is not gone
back.
- Type Parameters:
A
- E
- edge type- Parameters:
network
- center
- predecessor
- reach
- curReach
-
- Returns: