Startseite › Datentypen › H-Lib-Container Hilfe zum PBXB64-Compiler

H-Lib Graph

An undirected graph with LONG node IDs. Supports node/edge insertion, removal, adjacency queries, and neighbor enumeration.

Kategorie: H-Lib-Container | Zertifizierung: [ZERTIFIZIERT GETESTET]

Beschreibung

An undirected graph with LONG node IDs. Supports node/edge insertion, removal, adjacency queries, and neighbor enumeration.

Kind: Container | Category: H-Lib Native Containers

PBXB64 Status: AVAILABLE

PBXB64 Certification: [CERTIFIED TESTED]

Description

This H-Lib container is implemented in native C support code and exposed through PBXB64 BASIC container syntax. The examples below are focused usage patterns; keep handles valid, release each container with its Final method, and check counts or return values when a method can fail.

Methods

MethodSignatureReturnsDescription
Newg.NewLNGRAPHAllocate a new empty graph.
Finalg.FinalnoneFree the graph.
Validateg.ValidateLONGNon-zero if the handle is valid.
Clearg.ClearnoneRemove all nodes and edges.
Countg.CountLONGNumber of nodes in the graph.
Emptyg.EmptyLONGNon-zero if the graph has no nodes.
AddNodeg.AddNode idnoneAdd a node with the given ID.
AddEdgeg.AddEdge u, vnoneAdd an undirected edge between two nodes.
RemoveNodeg.RemoveNode idnoneRemove a node and its incident edges.
RemoveEdgeg.RemoveEdge u, vnoneRemove an undirected edge.
HasEdgeg.HasEdge u, vLONGNon-zero if the edge exists.
Neighborsg.Neighbors idLNARRReturn a new LNARR of neighbor IDs.

Validation Evidence

Validation evidence: H-Lib container behavior is exercised by registered BASIC container validation programs and the embedded H-Lib object set used by the single-EXE validation gate.

PBXB64-Prüfung

Diese Referenzseite soll durch ein fokussiertes Compile- oder Laufzeitbeispiel belegt sein. Das Beispiel soll Eingaben, erwartete Ausgabe oder Exit-Code und erforderliche Windows-Ressourcen oder Include-Dateien nennen.

Übersichtshinweise

Allgemeine Übersichtsseiten sollten trotzdem sagen, welche Familie gemeint ist, welche konkreten Befehlsseiten die Implementierung tragen und welche Formen nur der Navigation dienen. So bleibt die Seite detailliert genug, ohne so zu tun, als wäre sie eine vollständige Befehlsreferenz.

Beispiel

LOCAL g AS LNGRAPH
g = g.New
g.AddNode 1
g.AddNode 2
g.AddEdge 1, 2
PRINT g.HasEdge(1, 2) ' non-zero
g.Final