de.cesr.more.measures.node.supply
Class MCompNetInfoSupplier

java.lang.Object
  extended by de.cesr.more.measures.MAbstractMeasureSupplier
      extended by de.cesr.more.measures.node.supply.MCompNetInfoSupplier
All Implemented Interfaces:
MoreMeasureSupplier

public class MCompNetInfoSupplier
extends MAbstractMeasureSupplier

Date:
19.01.2010

Field Summary
 
Fields inherited from class de.cesr.more.measures.MAbstractMeasureSupplier
categories, measures, suppliers
 
Constructor Summary
MCompNetInfoSupplier()
           
 
Method Summary
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.
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.
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.
 
Methods inherited from class de.cesr.more.measures.MAbstractMeasureSupplier
addMeasureSupplier, equals, findMeasure, getCategories, getMeasureDescriptions, hashCode, removeMeasureSupplier
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCompNetInfoSupplier

public MCompNetInfoSupplier()
Method Detail

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 type
E - 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: