コード例 #1
0
 def int_list_to_pmt(self, items):
     if len(items) == 0:
         return pmt.pmt_from_bool(pmt.PMT_F)
     else:
         pmtl = pmt.pmt_list1(pmt.pmt_from_long(items[0]))
         for i in range(len(items)-1):
             pmtl = pmt.pmt_list_add(pmtl, pmt.pmt_from_long(items[i+1]))
         return pmtl
コード例 #2
0
 def rs_pos_to_pmt(self, rs_poss):
     pmt_rs = pmt.pmt_list1(self.int_list_to_pmt(rs_poss[0]))
     for i in range(len(rs_poss)-1):
         pmt_rs = pmt.pmt_list_add(pmt_rs, self.int_list_to_pmt(rs_poss[i+1]))
     return pmt_rs
コード例 #3
0
 def rs_val_to_pmt(self, rs_vals):
     pmt_vals = pmt.pmt_list1(self.complex_list_to_pmt(rs_vals[0]))
     for i in range(len(rs_vals)-1):
         pmt_vals = pmt.pmt_list_add(pmt_vals, self.complex_list_to_pmt(rs_vals[i+1]))
     return pmt_vals