class

AtomSpace::Atom

Inherits Reference < Object

Atom base class - fundamental unit of OpenCog knowledge representation

Constructors

new(type : AtomType, truth_value : TruthValue = TruthValue::DEFAULT_TV)
Source

Class methods

next_handle

Generate next unique handle

Source

Instance methods

==(other : Atom) : Bool

Check equality based on type and content

Source
arity
Source
attention_value
Source
attention_value=(attention_value : AttentionValue | Nil)
Source
clone
Source
concept_node?

Atom type checking predicates

Source
content_equals?(other : Atom) : Bool

Content equality check (implemented by subclasses)

Source
handle
Source
incoming

Get all atoms in the incoming set (atoms that reference this one)

Source
inspect(io : IO) : Nil

Get string representation for logging/debugging

Source
name

Abstract methods to be implemented by subclasses

Source
node?

Check if this is a node

Source
outgoing
Source
predicate_node?
Source
satisfies?(pattern : Atom) : Bool

Hash function for use in collections Check if atom satisfies a pattern

Source
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>
Source
truth_value
Source
truth_value=(truth_value : TruthValue)
Source
type
Source
variable_node?
Source