Options
All
  • Public
  • Public/Protected
  • All
Menu

A group of LogootNodeGroups that are considered by the JoinFunction (see the list document model index.ts file) to be related. Each Logoot node is not displayed in the order specified in groups. Rather, all of the nodes on a particular branch are displayed together and in the order defined by branch_order.

Hierarchy

Index

Constructors

constructor

  • Parameters

    • position: number

      The local position of this CG

    • branch_order: BranchKey[]

      The order in which branches are displayed. All of the nodes that make up a single branch are placed together. This is now global on the LDM level, so a reference should be passed in by the LDM.

    Returns ConflictGroup

Properties

branch_order

branch_order: BranchKey[]

The order in which branches are displayed. All of the nodes that make up a single branch are placed together. This is now global on the LDM level, so a reference should be passed in by the LDM.

groups

groups: LogootNodeGroup[] = []

A list of LogootNodeGroups that make up the Logoot side of the local document. A group's nodes will be split up and placed into one of the branch sections as defined in branch_order. These absolutely must be in order based on their Logoot positions.

Optional left_node

left_node: ConflictGroup

Optional parent_node

parent_node: ConflictGroup

Optional right_node

right_node: ConflictGroup

value

value: number

Accessors

absolute_value

  • get absolute_value(): number

conflicted

  • get conflicted(): boolean

equal_parent

first_branch

first_data_position

  • Search this node (and potentially the BST) for the closest data position greater than or equal to the start of this CG.

    Returns LogootPosition

    The position of the first data node in this node or successors.

inorder_predecessor

inorder_successor

known_position

  • get known_position(): number

largest_child

largest_larger_child

last_branch

last_data_position

  • Search this node (and potentially the BST) for the closest data position less than or equal to the end of this CG.

    Returns LogootPosition

    The position of the last data node in this node or predecessors.

ldoc_end

  • get ldoc_end(): number

ldoc_length

  • get ldoc_length(): number

logoot_end

logoot_start

root

smallest_child

smallest_smaller_child

Methods

addChild

addSpaceBefore

  • addSpaceBefore(s: number, parentUpdate: (np: ConflictGroup) => void): void

branchLength

  • branchLength(branches: BranchKey[]): number
  • The length in the local document (only DATA nodes) of only branches.

    Parameters

    • branches: BranchKey[]

      A list of branches to count.

    Returns number

getNeighbors

insertPos

  • Find the position in the local document of a group that is already in this ConflictGroup. This is named insertPos because it is used to find the insertion position of a new group, but the naming is a bit confusing.

    throws

    {FatalError} Will throw if after is not in this CG.

    Parameters

    • br: BranchKey

      The branch on which to determine the position.

    • at: LogootNodeGroup

      The LogootNodeGroup to determine the position of.

    Returns number

    The position of at.

insertSingleBranchGroup

  • Adds a group with only one branch to this CG and returns its position.

    throws

    {TypeError} If the group has more than one branch or if the group's ConflictGroup is not set to this. Set group.group to this before calling to avoid this error.

    Parameters

    Returns number

    The position in the local document of the insertion.

operateOnAll

preferential_cmp

removeChild

replaceWith

search

selfTest

toString

  • toString(): string

Generated using TypeDoc