HalfEdge
Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.
HalfEdge
HalfEdge()A half-edge in a graph that connects to one vertex, consisting of a direction (or None if undirected) and edge data.
Methods
| Name | Description |
|---|---|
__new__ |
Create a new half-edge |
data |
Get the data of the half-edge. |
direction |
Get the direction of the half-edge |
flip |
Return a new half-edge with the direction flipped (if it has a direction). |
__new__
HalfEdge.__new__(data: Expression | int, direction: bool | None = None)Create a new half-edge. The data can be any expression, and the direction can be True (outgoing), False (incoming) or None (undirected).
Parameters
data(Expression | int) The data to associate with the object.direction(bool | None) The direction of the edge or half-edge.
data
HalfEdge.data() -> ExpressionGet the data of the half-edge.
direction
HalfEdge.direction() -> bool | NoneGet the direction of the half-edge. True means outgoing, False means incoming, and None means undirected.
flip
HalfEdge.flip() -> HalfEdgeReturn a new half-edge with the direction flipped (if it has a direction).