Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 3.08 KB

030-TextualisationPolicy.md

File metadata and controls

53 lines (35 loc) · 3.08 KB

QuickData.Characters.FSharp

TextualisationPolicy

Defines cases to be used when textualising a sequence of Normals.

Note: See the the documentation here for more information about the Normal type.

The TextualisationPolicy Type

The TextualisationPolicy type defines a discriminated union used to specify how a sequence of Normals can be textualised.

Textualisation takes a Normal and maps it to a character in a character set.

The cases are:

Case Name Map Normal To
UseNearest *1 The nearest character in the set *2
TendDownwards The earlier of the two characters *3
TendUpwards The later of the two characters *4
TendOutwards The character which is earlier when the value is less then 0.5 or later if greater than or equal to 0.5
TendInwards The character which is later when the value is less then 0.5 or earlier if greater than or equal to 0.5
  • *1 : The default case.
  • *2 : uses Math.Round internally and this will usually be adequate.
  • *3 : uses Math.Floor internally.
  • *4 : uses Math.Ceiling internally.

To specify a textualisation policy simply supply its name, such as TextualisationPolicy.TendDownwards.

The difference between these cases can sometimes be subtle so it is recommended that you experiment to see which is best for your particular requirements with the data you are processing.

Discriminated Union Identity Values

Functions are available for converting to and from POCO types and DU characters. See the overview documentation for more information about these.

Exception-free Processing

Exception-free processing versions - FailSafe, Option, and Result - of some functions are available. See the overview documentation for more information about these.

Issues, Questions, and Suggestions

You can visit the QuickData.FSharp GitHub repository to report issues, ask questions, or make suggestions. You can also read about the changes across different versions in the release notes there.