-
Notifications
You must be signed in to change notification settings - Fork 119
Home
em is a new project so documentation is limited.
- Glossary - List of terms and definitions.
- Utility - Guide to common data types and utility functions.
Although em is rendered as a hierarchy, the basic data structure is a graph rather than a tree. Edges connect thoughts and contexts. The main difference from a tree is that nodes may have multiple parents, or in em terminology, thoughts may appear in many contexts (just as contexts can contain many thoughts).
e.g. The thought with value 'x'
appears in contexts ['A', 'B']
and ['C']
:
- A
- B
- x
- C
- x
Paths are primarily used in relation to the cursor. There are infinitely many paths to a thought, since the context view allows jumping across the hierarchy and circular paths are allowed. Generally paths are converted into contexts to do anything useful.
Given the string value of a thought, you can get a Thought object that contains a list of its contexts using getThought
.
Given a context, you can get its thoughts using getThoughts
.