Exemplo n.º 1
0
	def merge(self,other):
		self.num+=other.num
		DictUtil.merge(self.pages,other.pages)
		DictUtil.merge(self.sonNums,other.sonNums)
		for item in other.sons:
			if item not in self.sons:
				self.sons[item]=[0,0,0]
			self.sons[item][0]+=other.sons[item][0]
			self.sons[item][1]+=other.sons[item][1]
			self.sons[item][2]+=other.sons[item][2]
Exemplo n.º 2
0
 def merge(self, other):
     self.num += other.num
     DictUtil.merge(self.pages, other.pages)
     DictUtil.merge(self.sonNums, other.sonNums)
     for item in other.sons:
         if item not in self.sons:
             self.sons[item] = [0, 0, 0]
         self.sons[item][0] += other.sons[item][0]
         self.sons[item][1] += other.sons[item][1]
         self.sons[item][2] += other.sons[item][2]
Exemplo n.º 3
0
 def merge(self, other):
     self.num += other.num
     DictUtil.merge(self.pages, other.pages)
     DictUtil.merge(self.sons, other.sons)
     DictUtil.merge2(self.sonTypes, other.sonTypes)
     DictUtil.merge(self.gsons, other.gsons)
     DictUtil.merge2(self.gsonTypes, other.gsonTypes)
     DictUtil.merge(self.wrongs, other.wrongs)
Exemplo n.º 4
0
def getSonTypes(id, actions):
    wrong = 0
    ts = {}
    for sid in actions[id].sons:
        if sid >= len(actions):
            wrong += 1
            continue
        DictUtil.addOne(ts, hitItemName.getName(actions[sid]))
    for pid in actions[id].pull:
        if pid >= len(actions):
            wrong += 1
            continue
        (pts, pwr) = getSonTypes(pid, actions)
        DictUtil.merge(ts, pts)
        wrong += pwr
    return (ts, wrong)
Exemplo n.º 5
0
	def merge(self,cc):
		self.posShow=DictUtil.merge(self.posShow,cc.posShow)
		self.posHit=DictUtil.merge(self.posHit,cc.posHit)
		self.keywordHit=DictUtil.merge(self.keywordHit,cc.keywordHit)
		self.keywordShow=DictUtil.merge(self.keywordShow,cc.keywordShow)
		self.ridShow=DictUtil.merge(self.ridShow,cc.ridShow)
		self.ridHit=DictUtil.merge(self.ridHit,cc.ridHit)
Exemplo n.º 6
0
	def merge(self,dr):
		self.userNum+=dr.userNum
		DictUtil.merge(self.channels,dr.channels)
		DictUtil.merge(self.hits,dr.hits)
		DictUtil.merge(self.firstDivs,dr.firstDivs)
		DictUtil.merge(self.lastDivs,dr.lastDivs)
		DictUtil.merge(self.mc,dr.mc)
		DictUtil.merge(self.mu,dr.mu)
		DictUtil.merge(self.tu,dr.tu)
Exemplo n.º 7
0
 def merge(self, dr):
     self.userNum += dr.userNum
     DictUtil.merge(self.channels, dr.channels)
     DictUtil.merge(self.hits, dr.hits)
     DictUtil.merge(self.firstDivs, dr.firstDivs)
     DictUtil.merge(self.lastDivs, dr.lastDivs)
     DictUtil.merge(self.mc, dr.mc)
     DictUtil.merge(self.mu, dr.mu)
     DictUtil.merge(self.tu, dr.tu)
Exemplo n.º 8
0
	def merge(self,ck):
		self.search+=ck.search
		self.hasHit+=ck.hasHit
		self.weitShow=DictUtil.merge(self.weitShow,ck.weitShow)
		self.posHit=DictUtil.merge(self.posHit,ck.posHit)
		self.hit=DictUtil.merge(self.hit,ck.hit)
		self.show=DictUtil.merge(self.show,ck.show)
		self.posShow=DictUtil.merge(self.posShow,ck.posShow)
		self.albumShow=DictUtil.merge(self.albumShow,ck.albumShow)
		self.albumHit=DictUtil.merge(self.albumHit,ck.albumHit)
		self.topicShow=DictUtil.merge(self.topicShow,ck.topicShow)
		self.topicHit=DictUtil.merge(self.topicHit,ck.topicHit)
		self.foodShow=DictUtil.merge(self.foodShow,ck.foodShow)
		self.foodHit=DictUtil.merge(self.foodHit,ck.foodHit)
		self.hitCount=DictUtil.merge(self.hitCount,ck.hitCount)
		self.hitTitleShow=DictUtil.merge(self.hitTitleShow,ck.hitTitleShow)
		self.hitTitleHit=DictUtil.merge(self.hitTitleHit,ck.hitTitleHit)
		if self.ms == None:
			self.ms=ck.ms
		else:
			self.ms.merge(ck.ms)