class

AtomSpace::LazyLink

Inherits AtomSpace::Atom < Reference < Object

Lazy Link class - defers loading of outgoing atoms until accessed This reduces memory footprint for large graphs by loading target atoms on-demand

Constructors

new(type : AtomType, outgoing_handles : Array(Handle), truth_value : TruthValue = TruthValue::DEFAULT_TV, resolver : AtomResolver | Nil = nil)

Instance methods

[](index : Int32) : Atom

Get atom at specific position (may trigger load)

arity
clone
content_equals?(other : Atom) : Bool

Content equality check (implemented by subclasses)

first

Get first atom

last

Get last atom

load!

Force loading of all outgoing atoms

loaded?

Check if outgoing atoms have been loaded

name

Abstract methods to be implemented by subclasses

outgoing

Get outgoing atoms, loading if necessary

outgoing_handles

Get handles without loading atoms (for serialization)

resolver=(resolver : AtomResolver)

Set the resolver after construction (e.g., when loading from storage)

to_s(io : IO) : Nil

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>