OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-rocca commits / c737f1f

Add copy_atomspace helper
c737f1f0cba28ef8d82eba5e6fc2533cacc364dc
by Nil Geisweiller <ngeiswei@gmail.com> · 2022-06-10T07:26:43.000Z

Changed files (1) +10 -0

rocca/agents/utils.py +10 -0
……@@ -65,6 +65,16 @@ def add_to_atomspace(atoms: set[Atom] | list[Atom], atomspace: AtomSpace) -> Non
6565 atomspace.add_atom(atom)
6666
6767
68def copy_atomspace(src: AtomSpace, dst: AtomSpace) -> None:
69 """Copy the content of src into the dst.
70
71 The copy does not clean dst.
72
73 """
74
75 add_to_atomspace(atomspace_roots(src), dst)
76
77
6878def fetch_cogscms(atomspace: AtomSpace) -> set[Atom]:
6979 """Fetch all cognitive schematics from an given atomspace."""
7080