|
| lib = ctypes.cdll.LoadLibrary(base_file) |
|
| in_path = in_path |
|
str | sampling_mode = sampling_mode |
|
| type_constrain = type_constrain |
|
| relTotal = self.lib.getRelationTotal() |
|
| entTotal = self.lib.getEntityTotal() |
|
| testTotal = self.lib.getTestTotal() |
|
| test_h = np.zeros(self.entTotal, dtype=np.int64) |
|
| test_t = np.zeros(self.entTotal, dtype=np.int64) |
|
| test_r = np.zeros(self.entTotal, dtype=np.int64) |
|
| test_h_addr = self.test_h.__array_interface__["data"][0] |
|
| test_t_addr = self.test_t.__array_interface__["data"][0] |
|
| test_r_addr = self.test_r.__array_interface__["data"][0] |
|
| test_pos_h = np.zeros(self.testTotal, dtype=np.int64) |
|
| test_pos_t = np.zeros(self.testTotal, dtype=np.int64) |
|
| test_pos_r = np.zeros(self.testTotal, dtype=np.int64) |
|
| test_pos_h_addr = self.test_pos_h.__array_interface__["data"][0] |
|
| test_pos_t_addr = self.test_pos_t.__array_interface__["data"][0] |
|
| test_pos_r_addr = self.test_pos_r.__array_interface__["data"][0] |
|
| test_neg_h = np.zeros(self.testTotal, dtype=np.int64) |
|
| test_neg_t = np.zeros(self.testTotal, dtype=np.int64) |
|
| test_neg_r = np.zeros(self.testTotal, dtype=np.int64) |
|
| test_neg_h_addr = self.test_neg_h.__array_interface__["data"][0] |
|
| test_neg_t_addr = self.test_neg_t.__array_interface__["data"][0] |
|
| test_neg_r_addr = self.test_neg_r.__array_interface__["data"][0] |
|
| sampling_lp |
|
| sampling_tc |
|