This utility function is used to parse, as matrices of integers, strings returned by the Kreuzer-Skarke database. As an example,
|
|
The actual format allowed is the following: Spaces, tabs, and commas are all separators for elements of the array. Newlines, and ] characters separate rows. Finally, each empty line is ignored, and the remaining lines must all have the same number of elements.
As another example, matrices coming from Sage often use square brackets, and can be read using this function.
|
|
Formatting of white space is generally not important, except that each row must be on one line, and if there are several on a line, each row is ended by a ].
|
|
The object matrixFromString is a method function.