|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectNPTLab.DTNHostWrapper
public class DTNHostWrapper
Class that Wraps DTNHost and add the method and the objects needed by the ProfileCast routing algorithm.
Field Summary | |
---|---|
java.util.Map<core.Message,java.lang.Double> |
similarityMap
|
Constructor Summary | |
---|---|
DTNHostWrapper(DTNHost h)
map containing all the similarities beetween this node and the messages he encountered |
Method Summary | |
---|---|
void |
add(core.Coord c,
int day,
double time)
Method that adds to the set of coordinates for the host, the new coord element, the day and the time spent at the given location |
void |
add(core.Message m,
double similarity)
Adds to the message with its similarity to this DTNHostWrapper to its map of similarities. |
void |
createTrace(int simulationDays)
Creates the Trace for a specific host and adds the host and its new trace to the GLobal Map of Traces |
double |
getSimilarity(core.Message m)
Returns the similarity for the passed Message |
java.util.Map<core.Message,java.lang.Double> |
returnSimilarityMap()
Returns the similarity map of this DTNHostWrapper |
Trace |
returnTrace()
Returns the trace for the specific DTNHostWrapper |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.Map<core.Message,java.lang.Double> similarityMap
Constructor Detail |
---|
public DTNHostWrapper(DTNHost h)
Method Detail |
---|
public void add(core.Coord c, int day, double time)
c
- Coord the locationday
- Int, the day in wich the location was visitedtime
- Double the time spent at the given locationpublic void createTrace(int simulationDays)
simulationDays
- int the number of days in which were saved location and time spentpublic Trace returnTrace()
public void add(core.Message m, double similarity)
m
- Message the message to be addessimilarity
- double the computed similarity with the trace of the message.public double getSimilarity(core.Message m)
m
- the message in which similarity we are interested
public java.util.Map<core.Message,java.lang.Double> returnSimilarityMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |