OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
atomspace library

Namespaces

 opencog
 
 std
 

Classes

class  opencog::BindLink
 
class  opencog::DefineLink
 
class  opencog::LambdaLink
 
class  opencog::PatternLink
 
class  opencog::VariableList
 
class  opencog::FreeLink
 
class  opencog::PutLink
 
class  opencog::EvaluationLink
 
class  opencog::ExecutionOutputLink
 
class  opencog::NumberNode
 
class  opencog::ArithmeticLink
 
class  opencog::AssignLink
 
class  opencog::InsertLink
 
class  opencog::RemoveLink
 
class  opencog::DeleteLink
 
class  opencog::FoldLink
 
class  opencog::FunctionLink
 
class  opencog::PlusLink
 
class  opencog::TimesLink
 
class  opencog::TypeNode
 
class  opencog::Atom
 
class  opencog::AtomSpace
 
class  opencog::AtomTable
 
class  opencog::AttentionBank
 
class  opencog::AttentionValue
 
class  opencog::BackingStore
 
class  opencog::ClassServer
 
class  opencog::CountTruthValue
 a TruthValue that stores a mean, a confidence and the number of observations More...
 
class  opencog::FixedIntegerIndex
 
class  opencog::FuzzyTruthValue
 a TruthValue that stores a mean and the number of observations (strength and confidence) More...
 
class  opencog::HandleSeqIndex
 
class  opencog::HandleSetIndex
 
class  opencog::ImportanceIndex
 
class  opencog::IncomingIndex
 
class  opencog::IndefiniteTruthValue
 
class  opencog::Link
 
class  opencog::LinkIndex
 
class  opencog::Node
 
class  opencog::NodeIndex
 
class  opencog::NullTruthValue
 a special type of TruthValue More...
 
class  opencog::ProbabilisticTruthValue
 a TruthValue that stores a mean, a confidence and the number of observations More...
 
class  opencog::SimpleTruthValue
 a TruthValue that stores a mean and the number of observations (strength and confidence) More...
 
class  opencog::StringIndex
 
class  opencog::TypeIndex
 
class  opencog::FollowLink
 
class  opencog::PrivateUseOnlyChaseLink< T >
 
class  opencog::HandleMapIterator< T >
 
class  opencog::HandleMap< T >
 red-black tree maps Handle keys to type T elements More...
 
class  opencog::ProtocolBufferSerializer
 
class  opencog::ZMQClient
 
class  opencog::ZMQServer
 
struct  opencog::Variables
 
struct  opencog::Pattern
 

Macros

#define createBindLink   std::make_shared<BindLink>
 
#define createDefineLink   std::make_shared<DefineLink>
 
#define createLambdaLink   std::make_shared<LambdaLink>
 
#define createPatternLink   std::make_shared<PatternLink>
 
#define createVariableList   std::make_shared<VariableList>
 
#define createFreeLink   std::make_shared<FreeLink>
 
#define createPutLink   std::make_shared<PutLink>
 
#define createEvaluationLink   std::make_shared<EvaluationLink>
 
#define createExecutionOutputLink   std::make_shared<ExecutionOutputLink>
 
#define createNumberNode   std::make_shared<NumberNode>
 
#define createArithmeticLink   std::make_shared<ArithmeticLink>
 
#define createAssignLink   std::make_shared<AssignLink>
 
#define createInsertLink   std::make_shared<InsertLink>
 
#define createRemoveLink   std::make_shared<RemoveLink>
 
#define createDeleteLink   std::make_shared<DeleteLink>
 
#define createFoldLink   std::make_shared<FoldLink>
 
#define createFunctionLink   std::make_shared<FunctionLink>
 
#define createPlusLink   std::make_shared<PlusLink>
 
#define createTimesLink   std::make_shared<TimesLink>
 
#define createTypeNode   std::make_shared<TypeNode>
 
#define createAV   std::make_shared<AttentionValue>
 
#define createLink   std::make_shared<Link>
 
#define createNode   std::make_shared<Node>
 

Typedefs

typedef std::shared_ptr< BindLinkopencog::BindLinkPtr
 
typedef std::shared_ptr
< DefineLink > 
opencog::DefineLinkPtr
 
typedef std::shared_ptr
< LambdaLink
opencog::LambdaLinkPtr
 
typedef std::shared_ptr
< PatternLink
opencog::PatternLinkPtr
 
typedef std::shared_ptr
< VariableList
opencog::VariableListPtr
 
typedef std::shared_ptr< FreeLink > opencog::FreeLinkPtr
 
typedef std::shared_ptr< PutLink > opencog::PutLinkPtr
 
typedef std::shared_ptr
< EvaluationLink > 
opencog::EvaluationLinkPtr
 
typedef std::shared_ptr
< ExecutionOutputLink > 
opencog::ExecutionOutputLinkPtr
 
typedef std::shared_ptr
< NumberNode > 
opencog::NumberNodePtr
 
typedef std::shared_ptr
< ArithmeticLink > 
opencog::ArithmeticLinkPtr
 
typedef std::shared_ptr
< AssignLink > 
opencog::AssignLinkPtr
 
typedef std::shared_ptr
< InsertLink > 
opencog::InsertLinkPtr
 
typedef std::shared_ptr
< RemoveLink > 
opencog::RemoveLinkPtr
 
typedef std::shared_ptr
< DeleteLink > 
opencog::DeleteLinkPtr
 
typedef std::shared_ptr< FoldLink > opencog::FoldLinkPtr
 
typedef std::shared_ptr
< FunctionLink > 
opencog::FunctionLinkPtr
 
typedef std::shared_ptr< PlusLink > opencog::PlusLinkPtr
 
typedef std::shared_ptr
< TimesLink > 
opencog::TimesLinkPtr
 
typedef std::shared_ptr< TypeNode > opencog::TypeNodePtr
 
typedef std::shared_ptr< Link > opencog::LinkPtr
 
typedef std::vector< LinkPtr > opencog::IncomingSet
 
typedef std::weak_ptr< Link > opencog::WinkPtr
 
typedef std::set< WinkPtr,
std::owner_less< WinkPtr > > 
opencog::WincomingSet
 
typedef
boost::signals2::signal< void(AtomPtr,
LinkPtr)> 
opencog::AtomPairSignal
 
typedef std::set< AtomPtr > opencog::AtomPtrSet
 
typedef
boost::signals2::signal< void(const
Handle &)> 
opencog::AtomSignal
 
typedef
boost::signals2::signal< void(const
AtomPtr &)> 
opencog::AtomPtrSignal
 
typedef
boost::signals2::signal< void(const
Handle &, const
AttentionValuePtr &, const
AttentionValuePtr &)> 
opencog::AVCHSigl
 
typedef
boost::signals2::signal< void(const
Handle &, const TruthValuePtr
&, const TruthValuePtr &)> 
opencog::TVCHSigl
 
typedef
boost::signals2::signal< void(const
Handle &, const
AttentionValuePtr &, const
AttentionValuePtr &)> 
opencog::AFCHSigl
 
typedef std::shared_ptr
< AttentionValue > 
opencog::AttentionValuePtr
 
typedef ClassServer * opencog::ClassServerFactory (void)
 
typedef
boost::signals2::signal< void(Type)> 
opencog::TypeSignal
 
typedef std::shared_ptr
< CountTruthValue > 
opencog::CountTruthValuePtr
 
typedef std::unordered_set
< Atom * > 
opencog::UnorderedAtomSet
 
typedef std::shared_ptr
< FuzzyTruthValue > 
opencog::FuzzyTruthValuePtr
 
typedef std::shared_ptr
< IndefiniteTruthValue > 
opencog::IndefiniteTruthValuePtr
 
typedef unsigned short opencog::Arity
 arity of Links, represented as short integer (16 bits) More...
 
typedef std::shared_ptr< Node > opencog::NodePtr
 
typedef std::shared_ptr
< ProbabilisticTruthValue > 
opencog::ProbabilisticTruthValuePtr
 
typedef std::shared_ptr
< SimpleTruthValue > 
opencog::SimpleTruthValuePtr
 
typedef unsigned short opencog::Type
 type of Atoms, represented as short integer (16 bits) More...
 
typedef std::map< Handle,
const std::set< Type > > 
opencog::VariableTypeMap
 

Functions

static BindLinkPtr opencog::BindLinkCast (const Handle &h)
 
static BindLinkPtr opencog::BindLinkCast (AtomPtr a)
 
static DefineLinkPtr opencog::DefineLinkCast (const Handle &h)
 
static DefineLinkPtr opencog::DefineLinkCast (AtomPtr a)
 
static LambdaLinkPtr opencog::LambdaLinkCast (const Handle &h)
 
static LambdaLinkPtr opencog::LambdaLinkCast (AtomPtr a)
 
static PatternLinkPtr opencog::PatternLinkCast (const Handle &h)
 
static PatternLinkPtr opencog::PatternLinkCast (AtomPtr a)
 
static VariableListPtr opencog::VariableListCast (const Handle &h)
 
static VariableListPtr opencog::VariableListCast (AtomPtr a)
 
static FreeLinkPtr opencog::FreeLinkCast (const Handle &h)
 
static FreeLinkPtr opencog::FreeLinkCast (AtomPtr a)
 
static PutLinkPtr opencog::PutLinkCast (const Handle &h)
 
static PutLinkPtr opencog::PutLinkCast (AtomPtr a)
 
static EvaluationLinkPtr opencog::EvaluationLinkCast (const Handle &h)
 
static EvaluationLinkPtr opencog::EvaluationLinkCast (AtomPtr a)
 
static ExecutionOutputLinkPtr opencog::ExecutionOutputLinkCast (const Handle &h)
 
static ExecutionOutputLinkPtr opencog::ExecutionOutputLinkCast (AtomPtr a)
 
static NumberNodePtr opencog::NumberNodeCast (const Handle &h)
 
static NumberNodePtr opencog::NumberNodeCast (AtomPtr a)
 
static ArithmeticLinkPtr opencog::ArithmeticLinkCast (const Handle &h)
 
static ArithmeticLinkPtr opencog::ArithmeticLinkCast (AtomPtr a)
 
static AssignLinkPtr opencog::AssignLinkCast (const Handle &h)
 
static AssignLinkPtr opencog::AssignLinkCast (AtomPtr a)
 
static InsertLinkPtr opencog::InsertLinkCast (const Handle &h)
 
static InsertLinkPtr opencog::InsertLinkCast (AtomPtr a)
 
static RemoveLinkPtr opencog::RemoveLinkCast (const Handle &h)
 
static RemoveLinkPtr opencog::RemoveLinkCast (AtomPtr a)
 
static DeleteLinkPtr opencog::DeleteLinkCast (const Handle &h)
 
static DeleteLinkPtr opencog::DeleteLinkCast (AtomPtr a)
 
static FoldLinkPtr opencog::FoldLinkCast (const Handle &h)
 
static FoldLinkPtr opencog::FoldLinkCast (AtomPtr a)
 
static FunctionLinkPtr opencog::FunctionLinkCast (const Handle &h)
 
static FunctionLinkPtr opencog::FunctionLinkCast (AtomPtr a)
 
static PlusLinkPtr opencog::PlusLinkCast (const Handle &h)
 
static PlusLinkPtr opencog::PlusLinkCast (AtomPtr a)
 
static TimesLinkPtr opencog::TimesLinkCast (const Handle &h)
 
static TimesLinkPtr opencog::TimesLinkCast (AtomPtr a)
 
static TypeNodePtr opencog::TypeNodeCast (const Handle &h)
 
static TypeNodePtr opencog::TypeNodeCast (AtomPtr a)
 
void opencog::AtomTable::put_atom_into_index (AtomPtr &)
 
ClassServeropencog::classserver (ClassServerFactory *=ClassServer::createInstance)
 
static IndefiniteTruthValuePtr opencog::IndefiniteTVCast (TruthValuePtr tv)
 
static LinkPtr opencog::LinkCast (const Handle &h)
 
static LinkPtr opencog::LinkCast (const AtomPtr &a)
 
static NodePtr opencog::NodeCast (const Handle &h)
 
static NodePtr opencog::NodeCast (const AtomPtr &a)
 
Handle opencog::add_prefixed_node (AtomSpace &as, Type t, const std::string &prefix)
 
bool opencog::remove_hypergraph (AtomSpace &as, Handle h)
 
HandleSeq opencog::get_all_nodes (Handle h)
 
UnorderedHandleSet opencog::get_all_unique_nodes (Handle h)
 
HandleSeq opencog::get_all_atoms (Handle h)
 
UnorderedHandleSet opencog::get_all_unique_atoms (Handle h)
 
HandleSeq opencog::get_neighbors (const Handle &h, bool fanin, bool fanout, Type desiredLinkType, bool subClasses)
 
UnorderedHandleSet opencog::get_outgoing_nodes (const Handle &hinput, const std::vector< Type > &types)
 
UnorderedHandleSet opencog::get_distant_neighbors (const Handle &h, int dist)
 
HandleSeq opencog::get_predicates (const Handle &target, Type predicateType, bool subClasses)
 
HandleSeq opencog::get_predicates_for (const Handle &target, const Handle &predicate)
 
template<typename T >
bool opencog::foreach_binary_link (const Handle &h, Type ltype, bool(T::*cb)(const Handle &), T *data)
 
template<typename T >
bool opencog::foreach_binary_link (const Handle &h, Type ltype, bool(T::*cb)(const Handle &, const Handle &), T *data)
 
template<typename T >
bool opencog::foreach_reverse_binary_link (const Handle &h, Type ltype, bool(T::*cb)(const Handle &), T *data)
 
template<typename T >
bool opencog::foreach_reverse_binary_link (const Handle &h, Type ltype, bool(T::*cb)(const Handle &, const Handle &), T *data)
 
template<typename T >
bool opencog::foreach_link (const Handle &h, Type ltype, int from, int to, bool(T::*cb)(const Handle &), T *data)
 
template<typename T >
bool opencog::foreach_link (const Handle &h, Type ltype, int from, int to, bool(T::*cb)(const Handle &, const Handle &), T *data)
 
template<typename T >
bool opencog::foreach_unordered_binary_link (const Handle &h, Type ltype, bool(T::*cb)(const Handle &), T *data)
 
template<typename T >
bool opencog::foreach_unordered_binary_link (const Handle &h, Type ltype, bool(T::*cb)(const Handle &, const Handle &), T *data)
 
template<class T >
bool opencog::foreach_atom_pair (const std::vector< Handle > &va, const std::vector< Handle > &vb, bool(T::*cb)(const Handle &, const Handle &), T *data)
 

Variables

TypeIndex opencog::AtomTable::typeIndex
 
NodeIndex opencog::AtomTable::nodeIndex
 
LinkIndex opencog::AtomTable::linkIndex
 
ImportanceIndex opencog::AtomTable::importanceIndex
 
async_caller< AtomTable, AtomPtr > opencog::AtomTable::_index_queue
 
const bool opencog::NO_SUBCLASSES = false
 

Detailed Description

This library (opencog/atomspace) is the backbone of the project. To build it type:

To read a high level overview of this library head to dedicated page.

Experimental DefineLink class. This is a rough sketch for how things like this might be done. It is not necessarily a good idea, and might be replaced by something completely different, someday ...

Experimental NumberNode class. This is a rough sketch for how things like this might be done. It is not necessarily a good idea, and might be replaced by something completely different, someday ...

Experimental TypeNode class. This is a rough sketch for how things like this might be done. It is not necessarily a good idea, and might be replaced by something completely different, someday ...

Macro Definition Documentation

#define createArithmeticLink   std::make_shared<ArithmeticLink>

Definition at line 71 of file ArithmeticLink.h.

#define createAssignLink   std::make_shared<AssignLink>

Definition at line 127 of file AssignLink.h.

#define createAV   std::make_shared<AttentionValue>

Definition at line 42 of file AttentionValue.h.

#define createBindLink   std::make_shared<BindLink>

Definition at line 68 of file BindLink.h.

#define createDefineLink   std::make_shared<DefineLink>

Definition at line 107 of file DefineLink.h.

#define createDeleteLink   std::make_shared<DeleteLink>

Definition at line 65 of file DeleteLink.h.

#define createEvaluationLink   std::make_shared<EvaluationLink>

Definition at line 64 of file EvaluationLink.h.

#define createExecutionOutputLink   std::make_shared<ExecutionOutputLink>

Definition at line 61 of file ExecutionOutputLink.h.

#define createFoldLink   std::make_shared<FoldLink>

Definition at line 72 of file FoldLink.h.

#define createFreeLink   std::make_shared<FreeLink>

Definition at line 103 of file FreeLink.h.

#define createFunctionLink   std::make_shared<FunctionLink>

Definition at line 85 of file FunctionLink.h.

#define createInsertLink   std::make_shared<InsertLink>

Definition at line 151 of file AssignLink.h.

#define createLambdaLink   std::make_shared<LambdaLink>

Definition at line 91 of file LambdaLink.h.

#define createLink   std::make_shared<Link>

Definition at line 269 of file Link.h.

#define createNode   std::make_shared<Node>

Definition at line 119 of file Node.h.

#define createNumberNode   std::make_shared<NumberNode>

Definition at line 83 of file NumberNode.h.

#define createPatternLink   std::make_shared<PatternLink>

Definition at line 188 of file PatternLink.h.

#define createPlusLink   std::make_shared<PlusLink>

Definition at line 71 of file PlusLink.h.

#define createPutLink   std::make_shared<PutLink>

Definition at line 91 of file PutLink.h.

#define createRemoveLink   std::make_shared<RemoveLink>

Definition at line 175 of file AssignLink.h.

#define createTimesLink   std::make_shared<TimesLink>

Definition at line 71 of file TimesLink.h.

#define createTypeNode   std::make_shared<TypeNode>

Definition at line 94 of file TypeNode.h.

#define createVariableList   std::make_shared<VariableList>

Definition at line 101 of file VariableList.h.

Typedef Documentation

typedef boost::signals2::signal<void (const Handle&, const AttentionValuePtr&, const AttentionValuePtr&)> opencog::AFCHSigl

Definition at line 43 of file AttentionBank.h.

typedef std::shared_ptr<ArithmeticLink> opencog::ArithmeticLinkPtr

Definition at line 64 of file ArithmeticLink.h.

typedef unsigned short opencog::Arity

arity of Links, represented as short integer (16 bits)

Definition at line 40 of file Link.h.

typedef std::shared_ptr<AssignLink> opencog::AssignLinkPtr

Definition at line 120 of file AssignLink.h.

typedef boost::signals2::signal<void (AtomPtr, LinkPtr)> opencog::AtomPairSignal

Definition at line 58 of file Atom.h.

typedef std::set<AtomPtr> opencog::AtomPtrSet

Definition at line 60 of file AtomTable.h.

typedef boost::signals2::signal<void (const AtomPtr&)> opencog::AtomPtrSignal

Definition at line 63 of file AtomTable.h.

typedef boost::signals2::signal<void (const Handle&)> opencog::AtomSignal

Definition at line 62 of file AtomTable.h.

typedef std::shared_ptr<AttentionValue> opencog::AttentionValuePtr

Definition at line 40 of file AttentionValue.h.

typedef boost::signals2::signal<void (const Handle&, const AttentionValuePtr&, const AttentionValuePtr&)> opencog::AVCHSigl

Definition at line 66 of file AtomTable.h.

typedef std::shared_ptr<BindLink> opencog::BindLinkPtr

Definition at line 61 of file BindLink.h.

typedef ClassServer* opencog::ClassServerFactory(void)

Definition at line 43 of file ClassServer.h.

typedef std::shared_ptr<CountTruthValue> opencog::CountTruthValuePtr

Definition at line 38 of file CountTruthValue.h.

typedef std::shared_ptr<DefineLink> opencog::DefineLinkPtr

Definition at line 100 of file DefineLink.h.

typedef std::shared_ptr<DeleteLink> opencog::DeleteLinkPtr

Definition at line 58 of file DeleteLink.h.

typedef std::shared_ptr<EvaluationLink> opencog::EvaluationLinkPtr

Definition at line 57 of file EvaluationLink.h.

typedef std::shared_ptr<ExecutionOutputLink> opencog::ExecutionOutputLinkPtr

Definition at line 54 of file ExecutionOutputLink.h.

typedef std::shared_ptr<FoldLink> opencog::FoldLinkPtr

Definition at line 65 of file FoldLink.h.

typedef std::shared_ptr<FreeLink> opencog::FreeLinkPtr

Definition at line 96 of file FreeLink.h.

typedef std::shared_ptr<FunctionLink> opencog::FunctionLinkPtr

Definition at line 78 of file FunctionLink.h.

typedef std::shared_ptr<FuzzyTruthValue> opencog::FuzzyTruthValuePtr

Definition at line 38 of file FuzzyTruthValue.h.

typedef std::vector<LinkPtr> opencog::IncomingSet

Definition at line 55 of file Atom.h.

typedef std::shared_ptr<IndefiniteTruthValue> opencog::IndefiniteTruthValuePtr

Definition at line 40 of file IndefiniteTruthValue.h.

typedef std::shared_ptr<InsertLink> opencog::InsertLinkPtr

Definition at line 144 of file AssignLink.h.

typedef std::shared_ptr<LambdaLink> opencog::LambdaLinkPtr

Definition at line 84 of file LambdaLink.h.

typedef std::shared_ptr<Link> opencog::LinkPtr

Definition at line 53 of file Atom.h.

typedef std::shared_ptr<Node> opencog::NodePtr

Definition at line 112 of file Node.h.

typedef std::shared_ptr<NumberNode> opencog::NumberNodePtr

Definition at line 76 of file NumberNode.h.

typedef std::shared_ptr<PatternLink> opencog::PatternLinkPtr

Definition at line 181 of file PatternLink.h.

typedef std::shared_ptr<PlusLink> opencog::PlusLinkPtr

Definition at line 64 of file PlusLink.h.

typedef std::shared_ptr<ProbabilisticTruthValue> opencog::ProbabilisticTruthValuePtr

Definition at line 38 of file ProbabilisticTruthValue.h.

typedef std::shared_ptr<PutLink> opencog::PutLinkPtr

Definition at line 84 of file PutLink.h.

typedef std::shared_ptr<RemoveLink> opencog::RemoveLinkPtr

Definition at line 168 of file AssignLink.h.

typedef std::shared_ptr<SimpleTruthValue> opencog::SimpleTruthValuePtr

Definition at line 38 of file SimpleTruthValue.h.

typedef std::shared_ptr<TimesLink> opencog::TimesLinkPtr

Definition at line 64 of file TimesLink.h.

typedef boost::signals2::signal<void (const Handle&, const TruthValuePtr&, const TruthValuePtr&)> opencog::TVCHSigl

Definition at line 69 of file AtomTable.h.

typedef unsigned short opencog::Type

type of Atoms, represented as short integer (16 bits)

Definition at line 40 of file types.h.

typedef std::shared_ptr<TypeNode> opencog::TypeNodePtr

Definition at line 87 of file TypeNode.h.

typedef boost::signals2::signal<void (Type)> opencog::TypeSignal

This class keeps track of the complete atom class hierarchy. The current implementation is hardwired. Future versions may include different structures based on run-time type identification.

Definition at line 50 of file ClassServer.h.

typedef std::unordered_set<Atom*> opencog::UnorderedAtomSet

Definition at line 37 of file FixedIntegerIndex.h.

typedef std::shared_ptr<VariableList> opencog::VariableListPtr

Definition at line 94 of file VariableList.h.

typedef std::map<Handle, const std::set<Type> > opencog::VariableTypeMap

Definition at line 43 of file Pattern.h.

typedef std::set<WinkPtr, std::owner_less<WinkPtr> > opencog::WincomingSet

Definition at line 57 of file Atom.h.

typedef std::weak_ptr<Link> opencog::WinkPtr

Definition at line 56 of file Atom.h.

Function Documentation

Handle opencog::add_prefixed_node ( AtomSpace &  ,
Type  ,
const std::string &  prefix = "" 
)

Add a new node to the AtomSpace. A random 16-character string will be appended to the provided name.

Definition at line 28 of file AtomSpaceUtils.cc.

References opencog::AtomSpace::add_node(), opencog::AtomSpace::get_handle(), opencog::AtomSpace::is_valid_handle(), and python.bindlink::result.

static ArithmeticLinkPtr opencog::ArithmeticLinkCast ( const Handle &  h)
inlinestatic

Definition at line 65 of file ArithmeticLink.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static ArithmeticLinkPtr opencog::ArithmeticLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 67 of file ArithmeticLink.h.

References python.create_atoms_by_type::a.

static AssignLinkPtr opencog::AssignLinkCast ( const Handle &  h)
inlinestatic

Definition at line 121 of file AssignLink.h.

References python.create_atoms_by_type::a.

static AssignLinkPtr opencog::AssignLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 123 of file AssignLink.h.

References python.create_atoms_by_type::a.

static BindLinkPtr opencog::BindLinkCast ( const Handle h)
inlinestatic

Definition at line 62 of file BindLink.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static BindLinkPtr opencog::BindLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 64 of file BindLink.h.

References python.create_atoms_by_type::a.

ClassServer & opencog::classserver ( ClassServerFactory *  factory = ClassServer::createInstance)

Gets the singleton instance (following meyer's design pattern)

Definition at line 159 of file ClassServer.cc.

static DefineLinkPtr opencog::DefineLinkCast ( const Handle &  h)
inlinestatic

Definition at line 101 of file DefineLink.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static DefineLinkPtr opencog::DefineLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 103 of file DefineLink.h.

References python.create_atoms_by_type::a.

static DeleteLinkPtr opencog::DeleteLinkCast ( const Handle &  h)
inlinestatic

Definition at line 59 of file DeleteLink.h.

References python.create_atoms_by_type::a.

static DeleteLinkPtr opencog::DeleteLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 61 of file DeleteLink.h.

References python.create_atoms_by_type::a.

static EvaluationLinkPtr opencog::EvaluationLinkCast ( const Handle &  h)
inlinestatic

Definition at line 58 of file EvaluationLink.h.

References python.create_atoms_by_type::a.

static EvaluationLinkPtr opencog::EvaluationLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 60 of file EvaluationLink.h.

References python.create_atoms_by_type::a.

static ExecutionOutputLinkPtr opencog::ExecutionOutputLinkCast ( const Handle &  h)
inlinestatic

Definition at line 55 of file ExecutionOutputLink.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static ExecutionOutputLinkPtr opencog::ExecutionOutputLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 57 of file ExecutionOutputLink.h.

References python.create_atoms_by_type::a.

static FoldLinkPtr opencog::FoldLinkCast ( const Handle &  h)
inlinestatic

Definition at line 66 of file FoldLink.h.

References python.create_atoms_by_type::a.

static FoldLinkPtr opencog::FoldLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 68 of file FoldLink.h.

References python.create_atoms_by_type::a.

template<class T >
bool opencog::foreach_atom_pair ( const std::vector< Handle > &  va,
const std::vector< Handle > &  vb,
bool(T::*)(const Handle &, const Handle &)  cb,
T *  data 
)
inline

Zip together two lists of atoms, calling a function on it ziplist.

Invoke the callback on each pair of corresponding atoms in the vectors va and vb. This iterator is typically useful for making comparisons between atoms.

Returns true if all calls return true, return false otherwise.

Definition at line 30 of file ForeachZip.h.

References opencog::Handle::UNDEFINED.

template<typename T >
bool opencog::foreach_binary_link ( const Handle &  h,
Type  ltype,
bool(T::*)(const Handle &)  cb,
T *  data 
)
inline

foreach_binary_link – follow an ordered, binary link.

Look at the incoming set of the specified atom. Find all links of type link_type, then follow this link to see where its going. Call the callback for each endpoint found.

The callback should return false to search for more matches, or return true to halt the search.

Definition at line 258 of file ForeachChaseLink.h.

References opencog::PrivateUseOnlyChaseLink< T >::follow_link().

template<typename T >
bool opencog::foreach_binary_link ( const Handle &  h,
Type  ltype,
bool(T::*)(const Handle &, const Handle &)  cb,
T *  data 
)
inline

Same as above, except that callback has second argument. The handle of the link itself is passed in the second argument.

Definition at line 270 of file ForeachChaseLink.h.

References opencog::PrivateUseOnlyChaseLink< T >::follow_link_lh().

template<typename T >
bool opencog::foreach_link ( const Handle &  h,
Type  ltype,
int  from,
int  to,
bool(T::*)(const Handle &)  cb,
T *  data 
)
inline

foreach_link – follow an ordered N-ary link.

Look at the incoming set of the specified atom. Find all links of type link_type. Check to make sure that the input handle "h" occupies position "from" in the link. If it does, then invoke the callback, passing the handle in position "to" to the callback. The callback is called for each endpoint found.

The callback should return false to search for more matches, or return true to halt the search.

Definition at line 318 of file ForeachChaseLink.h.

References opencog::PrivateUseOnlyChaseLink< T >::follow_link().

template<typename T >
bool opencog::foreach_link ( const Handle &  h,
Type  ltype,
int  from,
int  to,
bool(T::*)(const Handle &, const Handle &)  cb,
T *  data 
)
inline

Same as above, except the callback is passed the handle of the link itself in the second arg.

Definition at line 330 of file ForeachChaseLink.h.

References opencog::PrivateUseOnlyChaseLink< T >::follow_link_lh().

template<typename T >
bool opencog::foreach_reverse_binary_link ( const Handle &  h,
Type  ltype,
bool(T::*)(const Handle &)  cb,
T *  data 
)
inline

foreach_reverse_binary_link - follow binary link in reverse.

Same as above, except that the link is followed in the reverse direction.

Definition at line 284 of file ForeachChaseLink.h.

References opencog::PrivateUseOnlyChaseLink< T >::follow_link().

template<typename T >
bool opencog::foreach_reverse_binary_link ( const Handle &  h,
Type  ltype,
bool(T::*)(const Handle &, const Handle &)  cb,
T *  data 
)
inline

Same as above, except that callback has second argument. The handle of the link itself is passed in the second argument.

Definition at line 296 of file ForeachChaseLink.h.

References opencog::PrivateUseOnlyChaseLink< T >::follow_link_lh().

template<typename T >
bool opencog::foreach_unordered_binary_link ( const Handle &  h,
Type  ltype,
bool(T::*)(const Handle &)  cb,
T *  data 
)
inline

foreach_unordered_binary_link - chase link from one to other atom.

Definition at line 341 of file ForeachChaseLink.h.

References opencog::PrivateUseOnlyChaseLink< T >::follow_unordered_binary_link().

template<typename T >
bool opencog::foreach_unordered_binary_link ( const Handle &  h,
Type  ltype,
bool(T::*)(const Handle &, const Handle &)  cb,
T *  data 
)
inline
static FreeLinkPtr opencog::FreeLinkCast ( const Handle &  h)
inlinestatic

Definition at line 97 of file FreeLink.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static FreeLinkPtr opencog::FreeLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 99 of file FreeLink.h.

References python.create_atoms_by_type::a.

static FunctionLinkPtr opencog::FunctionLinkCast ( const Handle &  h)
inlinestatic

Definition at line 79 of file FunctionLink.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static FunctionLinkPtr opencog::FunctionLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 81 of file FunctionLink.h.

References python.create_atoms_by_type::a.

HandleSeq opencog::get_all_atoms ( Handle  h)

Get all the atoms within a link and its sublinks.

Parameters
hthe top level link
Returns
a HandleSeq of atoms

Definition at line 89 of file AtomUtils.cc.

References opencog::LinkCast().

HandleSeq opencog::get_all_nodes ( Handle  h)

Get all the nodes within a link and its sublinks.

Parameters
hthe top level link
Returns
a HandleSeq of nodes

General purpose utilities for processing atoms in the Atom.

Contains methods and algorithms which might be useful to other processes.

Definition at line 40 of file AtomUtils.cc.

References opencog::LinkCast().

+ Here is the caller graph for this function:

UnorderedHandleSet opencog::get_all_unique_atoms ( Handle  h)

Get all unique atoms within a link and its sublinks.

Similar to getAllAtoms except there will be no repetition.

Parameters
hthe top level link
Returns
a UnorderedHandleSet of atoms

Definition at line 113 of file AtomUtils.cc.

References opencog::LinkCast().

+ Here is the caller graph for this function:

UnorderedHandleSet opencog::get_all_unique_nodes ( Handle  h)

Get all unique nodes within a link and its sublinks.

Similar to getAllNodes except there will be no repetition.

Parameters
hthe top level link
Returns
a UnorderedHandleSet of nodes

Definition at line 66 of file AtomUtils.cc.

References opencog::LinkCast().

UnorderedHandleSet opencog::get_distant_neighbors ( const Handle &  h,
int  dist = 1 
)

Return all atoms connected to h up to a given distance. Both incomings and outgoings are considered (unlike getNeighbors).

Parameters
hthe center atom
distthe maximum distance, or none if negative
Returns
an UnorderedHandleSet of neighbors

Definition at line 216 of file AtomUtils.cc.

References opencog::get_distant_neighbors_rec().

+ Here is the caller graph for this function:

HandleSeq opencog::get_neighbors ( const Handle &  ,
bool  fanin = true,
bool  fanout = true,
Type  linkType = LINK,
bool  subClasses = true 
)

Returns neighboring atoms, following incoming links and returning their outgoing sets.

Parameters
hGet neighbours for the atom this handle points to.
faninWhether directional (ordered) links point to this node should beconsidered.
fanoutWhether directional (ordered) links point from this node to another should be considered.
linkTypeFollow only these types of links.
subClassesFollow subtypes of linkType too.

Definition at line 130 of file AtomUtils.cc.

References opencog::classserver(), opencog::Atom::getIncomingSet(), and opencog::Handle::value().

+ Here is the caller graph for this function:

UnorderedHandleSet opencog::get_outgoing_nodes ( const Handle &  hinput,
const std::vector< Type > &  types = std::vector< Type >() 
)

Given an atom (a link or node), Return all its children nodes (i.e. traversing the outgoings recursively)

Parameters
hinput- an atoms to be looked
types- a list of type nodes to look for. if vector is empty, all kinds of nodes are looked
Returns
- a set of nodes

Definition at line 156 of file AtomUtils.cc.

References opencog::LinkCast(), opencog::NodeCast(), and python.undocumented.blocksworld::t.

+ Here is the caller graph for this function:

HandleSeq opencog::get_predicates ( const Handle &  target,
Type  predicateType = PREDICATE_NODE,
bool  subClasses = true 
)

Returns a list of all the EvaluationLinks with Predicates of the given type that the atom specified by 'target' participates in. (C++ implementation of cog-get-pred)

For example, given existence of the following:

EvaluationLink PredicateNode "IsA" ListLink ConceptNode "dog" ConceptNode "mammal"

EvaluationLink PredicateNode "IsA" ListLink ConceptNode "dog" ConceptNode "vertebrate"

EvaluationLink PredicateNode "eats" ListLink ConceptNode "dog" ConceptNode "meat"

and, given a get_predicates target of:

ConceptNode "dog"

and predicateType PREDICATE_NODE (or "PredicateNode"), then get_predicates returns evaluation links for:

dog IsA mammal
dog IsA vertebrate
dog eats meat
Parameters
targetSearch for predicates that target.
predicateTypeSearch only for predicates of this type.
subClassesFollow subtypes of linkType too.

Definition at line 225 of file AtomUtils.cc.

References opencog::classserver(), opencog::Atom::getIncomingSet(), opencog::Atom::getType(), opencog::ClassServer::isA(), and opencog::Handle::value().

HandleSeq opencog::get_predicates_for ( const Handle &  target,
const Handle &  predicate 
)

Returns a list of all the EvaluationLinks with the specified predicate that the atom specified by 'target' participates in.

For example, given the following:

EvaluationLink
   PredicateNode "IsA"
   ListLink
      ConceptNode "dog"
      ConceptNode "mammal"

EvaluationLink
   PredicateNode "IsA"
   ListLink
      ConceptNode "dog"
      ConceptNode "vertebrate"

EvaluationLink
   PredicateNode "eats"
   ListLink
      ConceptNode "dog"
      ConceptNode "meat"

then, given a target of:

ConceptNode "dog"

and predicate:

PredicateNode "IsA"

then get_predicates_for returns a list of all of the EvaluationLinks in which the dog has the "IsA" predicate, but not the one for "eats". So:

dog IsA mammal 
dog IsA vertebrate

but NOT:

dog eats meat
Parameters
targetSearch for predicates that target.
predicateTypeSearch only for predicates of this type.
subClassesFollow subtypes of linkType too.

Definition at line 268 of file AtomUtils.cc.

References opencog::classserver(), opencog::Atom::getIncomingSet(), opencog::ClassServer::isA(), and opencog::Handle::value().

static IndefiniteTruthValuePtr opencog::IndefiniteTVCast ( TruthValuePtr  tv)
inlinestatic

Definition at line 43 of file IndefiniteTruthValue.h.

References tv.

static InsertLinkPtr opencog::InsertLinkCast ( const Handle &  h)
inlinestatic

Definition at line 145 of file AssignLink.h.

References python.create_atoms_by_type::a.

static InsertLinkPtr opencog::InsertLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 147 of file AssignLink.h.

References python.create_atoms_by_type::a.

static LambdaLinkPtr opencog::LambdaLinkCast ( const Handle h)
inlinestatic

Definition at line 85 of file LambdaLink.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static LambdaLinkPtr opencog::LambdaLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 87 of file LambdaLink.h.

References python.create_atoms_by_type::a.

static LinkPtr opencog::LinkCast ( const Handle &  h)
inlinestatic

Definition at line 263 of file Link.h.

References python.create_atoms_by_type::a.

static LinkPtr opencog::LinkCast ( const AtomPtr &  a)
inlinestatic

Definition at line 265 of file Link.h.

References python.create_atoms_by_type::a.

static NodePtr opencog::NodeCast ( const Handle &  h)
inlinestatic

Definition at line 113 of file Node.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static NodePtr opencog::NodeCast ( const AtomPtr &  a)
inlinestatic

Definition at line 115 of file Node.h.

References python.create_atoms_by_type::a.

static NumberNodePtr opencog::NumberNodeCast ( const Handle &  h)
inlinestatic

Definition at line 77 of file NumberNode.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static NumberNodePtr opencog::NumberNodeCast ( AtomPtr  a)
inlinestatic

Definition at line 79 of file NumberNode.h.

References python.create_atoms_by_type::a.

static PatternLinkPtr opencog::PatternLinkCast ( const Handle h)
inlinestatic

Definition at line 182 of file PatternLink.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static PatternLinkPtr opencog::PatternLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 184 of file PatternLink.h.

References python.create_atoms_by_type::a.

static PlusLinkPtr opencog::PlusLinkCast ( const Handle &  h)
inlinestatic

Definition at line 65 of file PlusLink.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static PlusLinkPtr opencog::PlusLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 67 of file PlusLink.h.

References python.create_atoms_by_type::a.

static PutLinkPtr opencog::PutLinkCast ( const Handle &  h)
inlinestatic

Definition at line 85 of file PutLink.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static PutLinkPtr opencog::PutLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 87 of file PutLink.h.

References python.create_atoms_by_type::a.

bool opencog::remove_hypergraph ( AtomSpace &  as,
Handle  h 
)

Given a Handle remove it and all its descendants (outgoings of outgoings, etc). Atoms with incomings will not be removed. In case not all atoms have been removed it return false, true otherwise.

Parameters
asThe AtomSpace to the remove the atoms from
hThe handle to remove (and its descendants)
Returns
true if all atoms (h and its descendants) have been removed, false otherwise

Example: remove_hypergraph(as, h) with h = InheritanceLink ConceptNode "A" ConceptNode "B"

will remove the InheritanceLink, ConceptNode "A" and ConceptNode "B".

Definition at line 49 of file AtomSpaceUtils.cc.

References opencog::LinkCast(), and opencog::AtomSpace::remove_atom().

+ Here is the caller graph for this function:

static RemoveLinkPtr opencog::RemoveLinkCast ( const Handle &  h)
inlinestatic

Definition at line 169 of file AssignLink.h.

References python.create_atoms_by_type::a.

static RemoveLinkPtr opencog::RemoveLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 171 of file AssignLink.h.

References python.create_atoms_by_type::a.

static TimesLinkPtr opencog::TimesLinkCast ( const Handle &  h)
inlinestatic

Definition at line 65 of file TimesLink.h.

References python.create_atoms_by_type::a.

static TimesLinkPtr opencog::TimesLinkCast ( AtomPtr  a)
inlinestatic

Definition at line 67 of file TimesLink.h.

References python.create_atoms_by_type::a.

static TypeNodePtr opencog::TypeNodeCast ( const Handle &  h)
inlinestatic

Definition at line 88 of file TypeNode.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static TypeNodePtr opencog::TypeNodeCast ( AtomPtr  a)
inlinestatic

Definition at line 90 of file TypeNode.h.

References python.create_atoms_by_type::a.

static VariableListPtr opencog::VariableListCast ( const Handle h)
inlinestatic

Definition at line 95 of file VariableList.h.

References python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

static VariableListPtr opencog::VariableListCast ( AtomPtr  a)
inlinestatic

Definition at line 97 of file VariableList.h.

References python.create_atoms_by_type::a.

Variable Documentation

async_caller<AtomTable, AtomPtr> opencog::AtomTable::_index_queue
private

Definition at line 113 of file AtomTable.h.

ImportanceIndex opencog::AtomTable::importanceIndex
private

Definition at line 111 of file AtomTable.h.

LinkIndex opencog::AtomTable::linkIndex
private

Definition at line 110 of file AtomTable.h.

const bool opencog::NO_SUBCLASSES = false

Definition at line 38 of file AtomUtils.h.

NodeIndex opencog::AtomTable::nodeIndex
private

Definition at line 109 of file AtomTable.h.

TypeIndex opencog::AtomTable::typeIndex
private

Index for quick retreival of certain kinds of atoms.

Definition at line 108 of file AtomTable.h.