Index list
From ArachneWiki
An index list is a type of input parameter that represents a set of integers with a string. Many Arachne modules require index lists in their command-line arguments. The ParseSet module converts index lists from strings into vec<int>s.
Format
Adopted from ParseSet.h
Accepted formats for integers:
- n: a single non-negative integer n. Example: 6.
- {n1,n2,...,nk}: a set of non-negative integers, n_{1} to n_{k}. Example: {0,3,8,17,15}.
- [a,b]: all integers between a and b, inclusive. Requires that a ≤ b. Example: [2,5] = {2,3,4,5}.
- [a,b): all integers between a and b, including a but not b. Requires that a ≤ b. Example: [2,5) = {2,3,4}.
- @file: a list of integers given in the file file.
- a|b: a combination of any of the above formats. Example: [3,6)|[8,12] = {3,4,5,8,9,10,11,12}.
ParseSet does not handle negative integers. (Fortunately, indices are never negative.) Do not include quotations around the index list.