Exemplo n.º 1
0
	def initialSend(self):
		#print 'initial send'
		smsg1 = DecodedMsg()
		smsg1.set_crow(255)
		smsg1.set_V_coeff(self.data[(2,4,6),:])
		#only send the nonzero side information (j<A in tinyos code)?
		self.mif.sendMsg(self.source, 0xFFFF, smsg1.get_amType(), 0, smsg1)
Exemplo n.º 2
0
 def initialSend(self):
     #print 'initial send'
     smsg1 = DecodedMsg()
     smsg1.set_crow(255)
     smsg1.set_V_coeff(self.data[(2, 4, 6), :])
     #only send the nonzero side information (j<A in tinyos code)?
     self.mif.sendMsg(self.source, 0xFFFF, smsg1.get_amType(), 0, smsg1)
Exemplo n.º 3
0
    def send(self):
        smsg = DecodedMsg()
        #this line here needs to be changed to just be random coefficients.
        blah = np.random.randn(1, self.N)
        smsg.set_V_coeff(blah[0, :])

        #smsg.set_V_coeff(self.A[self.current_row])

        smsg.set_crow(self.current_row)
        smsg.set_data([1])
        self.mif.sendMsg(self.source, 0xFFFF, smsg.get_amType(), 0, smsg)
Exemplo n.º 4
0
	def send(self):
		smsg = DecodedMsg()
		#this line here needs to be changed to just be random coefficients.
		blah = np.random.randn(1,self.N)
		smsg.set_V_coeff(blah[0,:])
		
		
		#smsg.set_V_coeff(self.A[self.current_row])

		smsg.set_crow(self.current_row)
		smsg.set_data([1])
		self.mif.sendMsg(self.source, 0xFFFF, smsg.get_amType(), 0, smsg)
Exemplo n.º 5
0
	def send(self):
		smsg = DecodedMsg()
		#print 'type of A is ', type(self.A)
		print 'cr ', self.A[self.current_row]
		#print 'type of cr ', type(self.A[self.current_row])
		
		#random coefficients instead
		#rndRow = np.random.randn(1,self.N)
		#print 'random row is', rndRow[0,:]
		#print self.rndV
		#self.rndV = np.bmat([[self.rndV], [rndRow]])
		#print 'matrix of random rows is'
		#print self.rndV
		#smsg.set_V_coeff(rndRow[0,:])
		#also change data symbols
		#self.rndSym = np.dot(rndRow[0,:],self.data)
		#smsg.set_data(self.rndSym)

		smsg.set_V_coeff(self.A[self.current_row])
		smsg.set_data(self.sym[self.current_row]) #use current row each time?
		#print type(self.A[0,0])
		smsg.set_crow(self.current_row)		

		self.mif.sendMsg(self.source, 0xFFFF, smsg.get_amType(), 0, smsg)
Exemplo n.º 6
0
    def send(self):
        smsg = DecodedMsg()
        #print 'type of A is ', type(self.A)
        print 'cr ', self.A[self.current_row]
        #print 'type of cr ', type(self.A[self.current_row])

        #random coefficients instead
        #rndRow = np.random.randn(1,self.N)
        #print 'random row is', rndRow[0,:]
        #print self.rndV
        #self.rndV = np.bmat([[self.rndV], [rndRow]])
        #print 'matrix of random rows is'
        #print self.rndV
        #smsg.set_V_coeff(rndRow[0,:])
        #also change data symbols
        #self.rndSym = np.dot(rndRow[0,:],self.data)
        #smsg.set_data(self.rndSym)

        smsg.set_V_coeff(self.A[self.current_row])
        smsg.set_data(self.sym[self.current_row])  #use current row each time?
        #print type(self.A[0,0])
        smsg.set_crow(self.current_row)

        self.mif.sendMsg(self.source, 0xFFFF, smsg.get_amType(), 0, smsg)
Exemplo n.º 7
0
 def send(self):
     smsg = DecodedMsg()
     smsg.set_V_coeff(self.A[self.current_row])
     smsg.set_crow(self.current_row)
     smsg.set_data(self.sym[self.current_row])  #use current row each time?
     self.mif.sendMsg(self.source, 0xFFFF, smsg.get_amType(), 0, smsg)
Exemplo n.º 8
0
	def send(self):
		smsg = DecodedMsg()
		smsg.set_V_coeff(self.A[self.current_row])
		smsg.set_crow(self.current_row)
		smsg.set_data(self.sym[self.current_row]) #use current row each time?
		self.mif.sendMsg(self.source, 0xFFFF, smsg.get_amType(), 0, smsg)