CalculationWeightsAndHeights Module
Parses the rows of the calculation weight sheet and the calculation height sheet into ascending whole grams and whole cm. Returns every error in the rows.
Functions and values
| Function or value |
Description
|
Full Usage:
CalculationWeightsAndHeights.ascending sheet values
Parameters:
string
values : (int * int<'u>) list
Returns: int<'u> array * NormalValueSheetWarning list
Type parameters: 'u |
Returns the values in ascending order without duplicates, with a warning for each row that holds a value lower than a row above it or a value a row above it already holds.
|
Full Usage:
CalculationWeightsAndHeights.heightColumn
Returns: string
|
The column of the calculation heights, in cm.
|
Full Usage:
CalculationWeightsAndHeights.heightSheet
Returns: string
|
The sheet of the calculation heights.
|
Full Usage:
CalculationWeightsAndHeights.ofRows rows
Parameters:
Map<string, string[][]>
Returns: Validation<(CalculationWeightsAndHeights * NormalValueSheetWarning list), NormalValueSheetError>
|
Builds the calculation weights and heights from the rows of the two sheets, keyed by sheet name. The weights in kg become whole grams, the heights whole cm. Returns every error of both sheets, with MissingSheet for a sheet that is not in the map; otherwise the weights and heights with the warnings of both sheets.
|
Full Usage:
CalculationWeightsAndHeights.parseSheet sheet column toWhole rows
Parameters:
string
column : string
toWhole : float -> int<'u>
rows : string[] array
Returns: Validation<(int * int<'u>) list, NormalValueSheetError>
Type parameters: 'u |
Parses the rows of a sheet, header first, into the numbers of a column with their row numbers, each rounded to a whole value by toWhole. A blank cell is skipped. Returns every error in the rows: a number that is not positive, a number that rounds to 0, and NoValues when no row holds a value.
|
Full Usage:
CalculationWeightsAndHeights.sheets
Returns: string list
|
The names of the two sheets.
|
Full Usage:
CalculationWeightsAndHeights.weightColumn
Returns: string
|
The column of the calculation weights, in kg.
|
Full Usage:
CalculationWeightsAndHeights.weightSheet
Returns: string
|
The sheet of the calculation weights.
|
GenPRES