MCPcopy
hub / github.com/cayleygraph/cayley / NewFixed

Function NewFixed

graph/iterator/fixed.go:40–46  ·  view source on GitHub ↗

Creates a new Fixed iterator with a custom comparator.

(vals ...graph.Ref)

Source from the content-addressed store, hash-verified

38
39// Creates a new Fixed iterator with a custom comparator.
40func NewFixed(vals ...graph.Ref) *Fixed {
41 it := &Fixed{
42 it: newFixed(vals...),
43 }
44 it.Iterator = graph.AsLegacy(it.it)
45 return it
46}
47
48// Add a value to the iterator. The array now contains this value.
49// TODO(barakmich): This ought to be a set someday, disallowing repeated values.

Callers 15

TestLoadIteratorToFunction · 0.92
LoadToDepthMethod · 0.92
loadToValueMethod · 0.92
TestRemoveQuadFunction · 0.92
BuildIteratorMethod · 0.92
QuadIteratorMethod · 0.92
NodesAllIteratorMethod · 0.92
QuadsAllIteratorMethod · 0.92
TestUniqueIteratorBasicsFunction · 0.85
TestLinksToFunction · 0.85

Calls 2

AsLegacyFunction · 0.92
newFixedFunction · 0.85

Tested by 15

TestLoadIteratorToFunction · 0.74
TestRemoveQuadFunction · 0.74
TestUniqueIteratorBasicsFunction · 0.68
TestLinksToFunction · 0.68
singleHopFunction · 0.68
TestRecursiveNextFunction · 0.68
TestRecursiveContainsFunction · 0.68
TestRecursiveNextPathFunction · 0.68
TestSkipIteratorBasicsFunction · 0.68
newTestIteratorFunction · 0.68