• Public
  • Public/Protected
  • All

External module "listmodel/index"


Type aliases


Conflict: object

Type declaration


KnownPositionBst: Bst<LogootNode, object>


LogootBst: Bst<LogootNode, object>


Removal: object

Type declaration



  • This is possibly the most important function in this entire program. The role of this function is to determine which parts of a node will have precedence over nodes currently in a Logoot binary search tree. Any new node must be filtered to determine which parts can actually make it into the document. For example, if there is a node with a higher rclk currently in the BST, that portion that overlaps with the node must be cut out. If the reverse is true, the node must be removed. This is done by first filtering the nodes in the region in question using a user-defined priority function. Nodes are either kept, ignored, or removed. These nodes are then used as regions of the input to skip over (variable named skip_ranges) and the resulting node(s) are returned.


    • bst: LogootBst

      The binary search tree containing current nodes to consider

    • nstart: LogootPosition

      The start of the region in question

    • length: number

      The length of the region in question

    • resolveConflict: function

      A callback function determining what happens to a node currently in the BST in the region in question. If it returns 1, the node is kept. If it is 0, the node is ignored and is not skipped over. If it is -1, the section in question of the node is removed and the informRemoval function is called so further removals can be performed.

    • addNode: function

      A function only called when a node is split into pieces and additional nodes must be added as side-effects of the operation.

    • informRemoval: function

      A function to be called when a section or all of a node is removed so that the caller can modify the document as necessary.

        • (node: LogootNode, pos: number, length: number, whole: boolean): void
        • Parameters

          • node: LogootNode
          • pos: number
          • length: number
          • whole: boolean

          Returns void

    Returns LogootNodeWithMeta[]

Generated using TypeDoc