package nodeset

Import Path
	github.com/freeeve/gochickpeas/nodeset (on go.dev)

Dependency Relation
	imports 3 packages, and imported by 4 packages

Involved Source Files fold.go Package nodeset provides Set, the engine's node-id set: the substrate query results compose through (intersect, union, subtract). Roaring-backed behind a private representation; the Rust NodeSet's adaptive dense small-set arm can be added later without any API change, so callers must never assume the backing.
Package-Level Type Names (only one)
/* sort by: | */
Set is a set of node ids. And returns the intersection of s and other; neither operand is mutated. AndNot returns the difference s - other; neither operand is mutated. AsRange reports the set as a contiguous half-open [lo, hi) range, iff it is non-empty and gap-free (a set of n ids spanning [min, max] is gap-free exactly when max-min+1 == n, so this is O(1)). Callers must keep a correct fallback (Iter) for when ok is false. Bitmap exposes the underlying roaring bitmap for serialization and interop. Callers must not mutate it. Clone returns an independent copy. Contains reports whether id is in the set. Equals reports element-for-element equality. Insert adds id, reporting whether it was newly added. IsEmpty reports whether the set holds no ids. Iter iterates the set's ids in ascending order. The accessor is a thin inlinable closure constructor over iterYield, so a direct `for range` over it devirtualizes at the call site and the loop body compiles as straight code rather than a heap-allocated yield closure. IterChunks walks the set in ascending order one buf-sized chunk at a time, reusing buf; yield returning false stops the walk. The chunk form lets batch consumers sweep columnar predicates over many ids per dispatch instead of paying a closure per id. Len is the number of ids in the set (cardinality). Max is the largest id; ok is false for an empty set. Min is the smallest id; ok is false for an empty set. Or returns the union of s and other; neither operand is mutated. Remove deletes id, reporting whether it had been present. ToSlice returns the ids in ascending order. func FromBitmap(bm *roaring.Bitmap) *Set func New() *Set func Of(ids ...uint32) *Set func (*Set).And(other *Set) *Set func (*Set).AndNot(other *Set) *Set func (*Set).Clone() *Set func (*Set).Or(other *Set) *Set func github.com/freeeve/gochickpeas.(*FullTextField).Query(query string) *Set func github.com/freeeve/gochickpeas.(*GeoIndex).WithinBBox(minLat, minLon, maxLat, maxLon float64) *Set func github.com/freeeve/gochickpeas.(*GeoIndex).WithinRadius(lat, lon, km float64) *Set func github.com/freeeve/gochickpeas.(*Snapshot).BFS(start *Set, dir chickpeas.Direction, m chickpeas.RelMatch, nodeFilter chickpeas.NodeFilter, relFilter chickpeas.RelFilter, maxDepth int) (nodes, rels *Set) func github.com/freeeve/gochickpeas.(*Snapshot).BidirectionalBFS(source, target *Set, dir chickpeas.Direction, m chickpeas.RelMatch, nodeFilter chickpeas.NodeFilter, relFilter chickpeas.RelFilter, maxDepth int) (nodes, rels *Set) func github.com/freeeve/gochickpeas.(*Snapshot).CommonNeighbors(a, b chickpeas.NodeID, dir chickpeas.Direction, m chickpeas.RelMatch) *Set func github.com/freeeve/gochickpeas.(*Snapshot).FullTextSearch(label, key, query string) *Set func github.com/freeeve/gochickpeas.(*Snapshot).GeoWithinBBox(label, latKey, lonKey string, minLat, minLon, maxLat, maxLon float64) *Set func github.com/freeeve/gochickpeas.(*Snapshot).GeoWithinRadius(label, latKey, lonKey string, lat, lon, km float64) *Set func github.com/freeeve/gochickpeas.(*Snapshot).Neighborhood(seed chickpeas.NodeID, dir chickpeas.Direction, m chickpeas.RelMatch, loHops, hiHops uint32) *Set func github.com/freeeve/gochickpeas.(*Snapshot).NodesWithLabel(label string) (*Set, bool) func github.com/freeeve/gochickpeas.(*Snapshot).NodesWithProperty(label, key string, value any) (*Set, bool) func github.com/freeeve/gochickpeas.(*Snapshot).NodesWithValue(label, key string, v chickpeas.Value) (*Set, bool) func github.com/freeeve/gochickpeas.(*Snapshot).RelsWithType(relType string) (*Set, bool) func github.com/freeeve/gochickpeas/gql/internal/graph.Graph.FullTextSearch(label, field, query string) (*Set, bool) func github.com/freeeve/gochickpeas/gql/internal/graph.Graph.GeoWithinBBox(label, latField, lonField string, minLat, minLon, maxLat, maxLon float64) (*Set, bool) func github.com/freeeve/gochickpeas/gql/internal/graph.Graph.GeoWithinRadius(label, latField, lonField string, lat, lon, km float64) (*Set, bool) func github.com/freeeve/gochickpeas/gql/internal/graph.Graph.NodesWithLabel(label string) *Set func github.com/freeeve/gochickpeas/gql/internal/graph.Graph.NodesWithProperty(label, key string, v value.Value) *Set func github.com/freeeve/gochickpeas/gql/internal/graph.Graph.SubstringCandidates(label, field, needle string) (*Set, bool) func github.com/freeeve/gochickpeas/gql/internal/graph.(*SnapshotGraph).FullTextSearch(label, field, query string) (*Set, bool) func github.com/freeeve/gochickpeas/gql/internal/graph.(*SnapshotGraph).GeoWithinBBox(label, latField, lonField string, minLat, minLon, maxLat, maxLon float64) (*Set, bool) func github.com/freeeve/gochickpeas/gql/internal/graph.(*SnapshotGraph).GeoWithinRadius(label, latField, lonField string, lat, lon, km float64) (*Set, bool) func github.com/freeeve/gochickpeas/gql/internal/graph.(*SnapshotGraph).NodesWithLabel(label string) *Set func github.com/freeeve/gochickpeas/gql/internal/graph.(*SnapshotGraph).NodesWithProperty(label, key string, v value.Value) *Set func github.com/freeeve/gochickpeas/gql/internal/graph.(*SnapshotGraph).SubstringCandidates(label, field, needle string) (*Set, bool) func ParFold[T](s *Set, identity func() T, fold func(acc T, id uint32) T, reduce func(a, b T) T) T func (*Set).And(other *Set) *Set func (*Set).AndNot(other *Set) *Set func (*Set).Equals(other *Set) bool func (*Set).Or(other *Set) *Set func github.com/freeeve/gochickpeas.(*Snapshot).BFS(start *Set, dir chickpeas.Direction, m chickpeas.RelMatch, nodeFilter chickpeas.NodeFilter, relFilter chickpeas.RelFilter, maxDepth int) (nodes, rels *Set) func github.com/freeeve/gochickpeas.(*Snapshot).BidirectionalBFS(source, target *Set, dir chickpeas.Direction, m chickpeas.RelMatch, nodeFilter chickpeas.NodeFilter, relFilter chickpeas.RelFilter, maxDepth int) (nodes, rels *Set) func github.com/freeeve/gochickpeas.(*Snapshot).CommonNeighborCounts(sources []chickpeas.NodeID, dir chickpeas.Direction, m chickpeas.RelMatch, targets *Set) []chickpeas.CommonNeighborCount func github.com/freeeve/gochickpeas.(*Snapshot).NeighborsInSet(node chickpeas.NodeID, dir chickpeas.Direction, set *Set, relTypes ...string) iter.Seq[chickpeas.NodeID]
Package-Level Functions (total 4)
FromBitmap wraps a roaring bitmap. The set takes ownership; the caller must not mutate bm afterwards.
New returns an empty set.
Of returns a set of the given ids.
Type Parameters: T: any ParFold folds the set's ids in parallel, then merges the per-chunk results: identity seeds each chunk's accumulator, fold folds one id into an accumulator, and reduce merges two accumulators (merged in ascending chunk order, so the result is deterministic for any associative reduce). The parallelism is an implementation detail -- the signature is pure std, so callers depend on neither a parallelism package nor the storage layout. Uses the contiguous-range fast path (AsRange) when the ids are gap-free, otherwise a collected scan. For a sequential fold use Iter. A package-level generic function rather than a method: Go methods cannot have type parameters.