Options
All
  • Public
  • Public/Protected
  • All
Menu

An index of alignment frequencies

Hierarchy

Index

Constructors

constructor

Methods

increment

  • increment(alignment: Alignment, value?: number): void
  • Increments a value in the index

    Parameters

    • alignment: Alignment
    • Default value value: number = 1

    Returns void

Protected incrementIndex

  • incrementIndex(key: string, value?: number): void
  • Adds a number to the key's value. If no number is given the default amount will be added to the value.

    Parameters

    • key: string
    • Default value value: number = 1

      optional value to add

    Returns void

read

  • read(alignment: Alignment | string): number
  • Reads a value from the index

    Parameters

    • alignment: Alignment | string

      the alignment index to read. This may be a specific key, or the alignment object to read the default key.

    Returns number

Protected readIndex

  • readIndex(key: string): number
  • Reads a value from the index. If the key does not exist the result will be 0.

    Parameters

    • key: string

    Returns number

write

  • write(alignment: Alignment, value: number): void
  • Writes a value to the index

    deprecated

    Parameters

    Returns void

Protected writeIndex

  • writeIndex(key: string, value: number): void
  • Manually writes a value to the index

    deprecated

    use incrementIndex instead.

    Parameters

    • key: string
    • value: number

    Returns void

Generated using TypeDoc