Ejemplo n.º 1
0
 def __getter_s(self) -> List[Tuple[int, ...]]:
     vs = cptr_to_list(self.cobj().s, self.triangles)
     return [tuple(int(x) for x in carray_to_tuple(v)) for v in vs]
Ejemplo n.º 2
0
 def __getter_v(self) -> Tuple[float, ...]:
     return tuple(cptr_to_list(self.cobj().v, self.dim))
Ejemplo n.º 3
0
 def __getter_x(self) -> List[Tuple[float, ...]]:
     vs = cptr_to_list(self.cobj().x, self.vertices)
     return [tuple(float(x) for x in carray_to_tuple(v)) for v in vs]
Ejemplo n.º 4
0
 def enumerate(self) -> List['H2Matrix']:
     ptr = libh2matrix.enumerate_h2matrix(self)
     lst = cptr_to_list(ptr, self.desc)
     return [try_wrap(cs, H2Matrix) for cs in lst]
Ejemplo n.º 5
0
 def enumerate(self) -> List['Cluster']:
     ptr = libcluster.enumerate_cluster(self)
     lst = cptr_to_list(ptr, self.desc)
     return [try_wrap(c, Cluster) for c in lst]
Ejemplo n.º 6
0
 def __getter_son(self) -> List['ClusterOperator']:
     lst = cptr_to_list(self.cobj().son, self.sons)
     return [try_wrap(co, ClusterOperator) for co in lst]
Ejemplo n.º 7
0
 def __getter_a(self) -> List[List[float]]:
     last_coeff = (self.rows - 1) + (self.cols - 1) * self.ld
     coeffs = cptr_to_list(self.cobj().a, last_coeff + 1)
     return [[coeffs[i + j * self.ld] for i in range(self.rows)]
             for j in range(self.cols)]
Ejemplo n.º 8
0
 def __getter_n(self) -> List[Tuple[float, ...]]:
     vs = cptr_to_list(self.cobj().n, self.triangles)
     return [tuple(float(x) for x in carray_to_tuple(v)) for v in vs]
Ejemplo n.º 9
0
 def enumerate(self, t: 'misc.Cluster') -> List['ClusterOperator']:
     ptr = libclusteroperator.enumerate_clusteroperator(self)
     lst = cptr_to_list(ptr, t.desc)
     return [try_wrap(co, ClusterOperator) for co in lst]
Ejemplo n.º 10
0
 def enumerate(self, t: 'misc.Cluster') -> List['ClusterBasis']:
     ptr = libclusterbasis.enumerate_clusterbasis(t, self)
     lst = cptr_to_list(ptr, t.desc)
     return [try_wrap(c, ClusterBasis) for c in lst]
Ejemplo n.º 11
0
 def __getter_coeff(self) -> List[float]:
     return cptr_to_list(self.cobj().coeff, self.nz)
Ejemplo n.º 12
0
 def enumerate_level(self) -> List[int]:
     ptr = libblock.enumerate_level_block(self)
     return cptr_to_list(ptr, self.desc)
Ejemplo n.º 13
0
 def enumerate(self) -> List['Block']:
     ptr = libblock.enumerate_block(self)
     lst = cptr_to_list(ptr, self.desc)
     return [try_wrap(b, Block) for b in lst]
Ejemplo n.º 14
0
 def enumerate(self, b: 'misc.Block') -> List['mat.HMatrix']:
     ptr = libhmatrix.enumerate_hmatrix(b, self)
     lst = cptr_to_list(ptr, b.desc)
     return [try_wrap(cs, HMatrix) for cs in lst]