getUnifiedNumberClassGraph
internal fun getUnifiedNumberClassGraph(options: UnifiedNumberTypeOptions = UnifiedNumberTypeOptions.DEFAULT): DirectedAcyclicGraph<KClass<*>>
Number type graph, structured in terms of number complexity. A number can always be expressed losslessly by a number of a more complex type (any of its parents).
(BigDecimal)
/ \
(BigInteger) \
/ \ \
<~ ULong Long ~> Double ..
.. | / | / | \..
\ | / | / |
UInt Int Float
.. | / | / \..
\ | / | /
UShort Short
| / |
| / |
UByte Byte
\ /
\ /
NothingContent copied to clipboard
For any two numbers, we can find the nearest common ancestor in this graph by calling DirectedAcyclicGraph.findNearestCommonVertex.
Parameters
options