objects.logic.entity.entityStatistics.entityStatistics Class Reference

The Entity Statistics class will contain various useful statistics built from either a series of decoded packets or list of entities. More...

List of all members.

Public Member Functions

def __init__
 coordinate based dictionary.

Public Attributes

 coordinateDitc


Detailed Description

The Entity Statistics class will contain various useful statistics built from either a series of decoded packets or list of entities.

This class is really just a stub at this point. Nothing much is implemented.

Definition at line 22 of file entityStatistics.py.


Member Function Documentation

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 """
"""


Member Data Documentation

Definition at line 41 of file entityStatistics.py.


The documentation for this class was generated from the following file:

Generated on Mon Mar 30 00:26:41 2009 for EyeSpy by  doxygen 1.5.8