Public Member Functions | |
| def | __init__ |
| coordinate based dictionary. | |
Public Attributes | |
| coordinateDitc | |
This class is really just a stub at this point. Nothing much is implemented.
Definition at line 22 of file entityStatistics.py.
| def objects.logic.entity.entityStatistics.entityStatistics.__init__ | ( | self | ) |
coordinate based dictionary.
Used to keep track of of multiple entities at distinct locations (which need to be displayed onto the screen differently). This list will essentially contain the same information as a filtered entity collection, but it will be keyed by location rather than its primary key.
The key of the dictionary is the longitude/latitude pair. the value is an small list of all entities at that particular location.
{(lon, lat): entityList() }
Definition at line 39 of file entityStatistics.py.
00039 : 00040 00041 self.coordinateDitc = dict() 00042 """ 00043 # it is assumed that each entity should be unique, giving the same entity over and over again 00044 # will skew the statistics 00045 def computeStatsFromEntity(self, netEnt): 00046 if netEnt == None: 00047 logger.log(__name__ + ": tried to compute statistics using a NULL networked Entity") 00048 return 00049 00050 lon = netEnt.foreignLongitude 00051 lat = netEnt.foreignLatitude 00052 00053 key = (lon, lat) 00054 00055 if not self.coordinateDitc.has_key(key): 00056 self.coordinateDitc[key] = list() 00057 00058 self.coordinateDitc[key].append(netEnt) 00059 00060 00061 def computeStatsFromDecodedPacket(self, decodedPacket): 00062 pass 00063 00064 """ """
Definition at line 41 of file entityStatistics.py.
1.5.8