Changeset 13133


Ignore:
Timestamp:
03/16/12 09:01:52 (13 years ago)
Author:
neise
Message:
added new member Coordinator.chid2vec, which is the same as chid2coor, but contains euclid.Vector2 instead of tuples
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/pyfact/coor.py

    r13089 r13133  
    4444        coor2chid = {}
    4545        chid2coor = {}
     46        coor_vec  = {}
    4647        for vector_and_chid in vectors_and_chids:
    4748            vec = vector_and_chid[0]
     
    5657                y=0.0
    5758
     59           
    5860            coor = (int(round(x)),int(round(y)))
    59 
     61            coor_vec = Vector2(coor[0], coor[1])
     62           
    6063            if coor in coor2chid:
    6164                print 'error while filling "coor2chid":'
     
    6568            coor2chid[ coor ] = chid
    6669            chid2coor[ chid ] = coor
     70            chid2vect[ chid ] = coor_vec
    6771
    6872        # hard code the offsets to the next neighbors
     
    8387        self.chid2coor = chid2coor
    8488        self.coor2chid = coor2chid
     89        self.chid2vec  = chid2vec
    8590       
    8691#        for chid in chid2nn.keys():
Note: See TracChangeset for help on using the changeset viewer.