lmseq

lmseq changes the number of elements in one region of one direction of the open part.

Syntax

lmseq direction left delta
  • direction: i, j or k.
  • left: the reduced index on the left side of the region. It runs from 1 to one less than the number of reduced indices in that direction.
  • delta: a signed whole number added to the region’s element count.

What it does

lmseq resizes the single region between reduced index left and the next one. The region’s right end and every index list entry after it grow by delta. The coordinates and the number of partitions stay the same.

When James applies it

When it is read, in the Part phase, as mseq does: James folds it into the part’s index list at once. lmseq stores nothing of its own, so a later insprt does not renumber it. An lmseq written after an insprt reads the numbering the insprt made.

Rules James adds

  • A delta that would leave the region with fewer than one element is refused.
  • update is not supported in this version (E0100), and James reports the coordinate equations as not recognized (E0105). Once they are supported, lmseq after them will be refused, as mseq will be.

Diagnostics

  • E0407: the direction is not i, j or k, left is outside its range, an argument is not a whole number, or the region would shrink below one element.

Example

The script tests/corpus/115-lmseq-folds-single-region/input.tg, which make test runs:

block
1 3 5 7;1 3;1 6 8 13;
1 3 5 7;1 3;1 3 5 7;
lmseq k 2 4
endpart

lmseq k 2 4 adds 4 elements to the k region that begins at reduced index 2. The k list 1 6 8 13 becomes [1 6 12 17]: the region’s right end and every entry after it grow by 4.

See also

  • mseq: changes every region of a direction.
  • insprt: adds a partition.
  • Parts: element counts in detail.

James 0.3.1.

This site uses Just the Docs, a documentation theme for Jekyll.