def __init__(self, path="./libsimilarity/libsimilarity.so"):
super(SIMILARITYNative, self).__init__(True)
self._u = cdll.LoadLibrary( path )
self._u.compress.restype = c_uint
self._u.ncd.restype = c_int
self._u.ncs.restype = c_int
self._u.cmid.restype = c_int
self._u.entropy.restype = c_double
self._u.levenshtein.restype = c_uint
self._u.kolmogorov.restype = c_uint
self._u.bennett.restype = c_double
self._u.RDTSC.restype = c_double
self.__libsim_t = LIBSIMILARITY_T()
self.set_compress_type( ZLIB_COMPRESS )
评论列表
文章目录