Abstract Base Classes
The module kernel_abc
defines the base class for a hyperbolic graph and a hyperbolic tiling. It may serve as the starting point for the construction of new kernels. Please note that this module is abstract and its classes are intended to be subclassed in the application. It does not provide full implementations.
Tiling Base Class
- class hypertiling.kernel_abc.Tiling(p: int, q: int, n: int, mangle: float = 0.0021547274537546575)
This is the abstract base class of a hyperbolic tiling.
- p
The first fundamental lattice parameter.
- Type:
int
- q
The second fundamental lattice parameter.
- Type:
int
- n
A parameter defining the size of the tiling.
- Type:
int
- phi
Angle of rotation that leaves the lattice invariant when cell centered.
- Type:
float
- qhi
Angle of rotation that leaves the lattice invariant when vertex centered.
- Type:
float
- r
Radius of the fundamental polygon in the Poincare disk.
- Type:
float
- h
Hyperbolic/geodesic lattice spacing, i.e., the edge length of any cell.
- Type:
float
- hr
Geodesic radius, i.e., distance between the center and any vertex of cells in a regular p,q tiling.
- Type:
float
- mangle
Magic angle required for technical reasons.
- Type:
float
- _nbrs
A placeholder for storing adjacency relations.
- Type:
None
- abstract get_angle(index: int) float
Returns the angle to the center of the polygon at index.
- Parameters:
index (int) – index of the polygon
- Returns:
center of the polygon
- Return type:
float
- abstract get_center(index: int) complex128
Returns the center of the polygon at index.
- Parameters:
index (int) – index of the polygon
- Returns:
center of the polygon
- Return type:
np.complex128
- abstract get_layer(index: int) int
Returns the layer to the center of the polygon at index.
- Parameters:
index (int) – index of the polygon
- Returns:
layer of the polygon
- Return type:
int
- get_nbrs(i, **kwargs)
Returns the indices of the neighbours of vertex i.
- Parameters:
i (int) – the cell index one is interested in.
- Returns:
of all neighbour indice
- Return type:
list
- get_nbrs_list(**kwargs)
Calculates for each vertex the neighbours a returns a list.
- Returns:
with neighbour indices
- Return type:
List of list
- abstract get_sector(index: int) int
Returns the sector, the polygon at index refers to.
- Parameters:
index (int) – index of the polygon
- Returns:
number of the sector
- Return type:
int
- abstract get_vertices(index: int) array
Returns the p vertices of the polygon at index.
- Parameters:
index (int) – index of the polygon
- Returns:
vertices of the polygon
- Return type:
np.array[np.complex128][p]
Graph Base Class
- class hypertiling.kernel_abc.Graph(p: int, q: int, n: int, mangle: float = 0.0021547274537546575)
The abstract base class of a hyperbolic graph.
- Parameters:
p (int) – The first fundamental lattice parameter.
q (int) – The second fundamental lattice parameter.
n (int) – A parameter defining the size of the graph.
mangle (float, optional) – Magic angle required for technical reasons, by default MAGICANGLE
- Raises:
AttributeError – If the combination of p and q is invalid: For hyperbolic lattices (p-2)*(q-2) > 4 must hold.
- p
The first fundamental lattice parameter.
- Type:
int
- q
The second fundamental lattice parameter.
- Type:
int
- n
A parameter defining the size of the graph.
- Type:
int
- phi
Angle of rotation that leaves the lattice invariant when cell centered.
- Type:
float
- qhi
Angle of rotation that leaves the lattice invariant when vertex centered.
- Type:
float
- r
Radius of the fundamental polygon in the Poincare disk.
- Type:
float
- h
Hyperbolic/geodesic lattice spacing, i.e., the edge length of any cell.
- Type:
float
- hr
Geodesic radius, i.e., distance between the center and any vertex of cells in a regular p,q tiling.
- Type:
float
- mangle
Magic angle required for technical reasons.
- Type:
float
- _nbrs
A placeholder for storing adjacency relations.
- Type:
None