neuralqx.graph.single_vertex module¶
- class SingleVertexGraph(valence, orientation=None, *, plot=False, non_planar=False, random_embedding=False, random_embedding_mean=0.0, random_embedding_std=5.0, random_embedding_seed=123)¶
Bases:
GraphStar graph with one central vertex and prescribed edge orientations.
This graph has a distinguished central vertex labelled
0andvalenceexternal vertices labelled1,2,\dots,valence. For each external vertex \(i\), there is exactly one edge connecting \(0\) and \(i\). The orientation of each edge is controlled by an integer direction \(d_i\in\{+1,-1\}\):\(d_i=+1\) gives an edge \(0\to i\),
\(d_i=-1\) gives an edge \(i\to 0\).
If
orientationis not provided, all edges are oriented outwards (all \(d_i=+1\)).If
non_planar=True, vertices are relabelled to fixed-length 3-tuples and may be given a random spatial embedding.- Parameters:
valence (
int) – Number of edges incident at the central vertex.orientation (
Optional[list]) – Optional list of lengthvalencewith entries in{+1, -1}.plot (
bool) – If True, produce a visualisation via the base graph machinery.non_planar (
bool) – If True, relabel vertices to 3-tuples to trigger the non-planar pipeline.random_embedding (
bool) – If True, assign a random 3D embedding to vertices (non-planar only).random_embedding_mean (
float) – Mean of the Gaussian used for the random embedding.random_embedding_std (
float) – Standard deviation of the Gaussian used for the random embedding.random_embedding_seed (
int) – Seed controlling the random embedding.
- Raises:
OrientationValenceMismatchError – If
orientationis provided with the wrong length.
- property orientation¶