Options
All
  • Public
  • Public/Protected
  • All
Menu

A group of nodes that are all on different branches and have different vector clock values, but share the same Logoot start, end, and length.

Hierarchy

  • LogootNodeGroup

Index

Constructors

constructor

Properties

group

length

length: number = 0

nodes

nodes: object

The LogootNodes in this group. Despite what TypeScript thinks, they key is not a string. It is a BranchKey. Problem is, TS doesn't support using symbols to index a type, which will hopefully fixed when TypeScript PR #26797 lands. In the mean time, using as to turn the BranchKey into a string is used as a hacky workaround.

Type declaration

start

start: LogootPosition = new LogootPosition()

Accessors

branches

conflicted

  • get conflicted(): boolean

end

  • The end of the node. Note that technically there is not an atom at this position, so it's fair game to have another node placed at this position.

    Returns LogootPosition

ldoc_length

  • get ldoc_length(): number

n_branches

  • get n_branches(): number

Methods

br

branchLength

  • branchLength(branches: BranchKey[]): number
  • Gets the length of all DATA nodes on branches.

    Parameters

    • branches: BranchKey[]

      The branches to search.

    Returns number

    The length of all DATA nodes

delBr

eachNode

  • eachNode(cb: function): void

mapNodes

  • mapNodes(cb: function): object

splitAround

  • Split this LogootNodeGroup around a position pos units after the current start on the lowest level.

    Parameters

    • pos: number

      The location of where to split this group.

    Returns LogootNodeGroup

    A new LogootNodeGroup. This is spliced into this conflict group, so no cleanup is necessary after this is run.

toString

  • toString(): string

Generated using TypeDoc