Skip to content

Commit 1194f29

Browse files
committed
updated docs based on review
1 parent 4fb881f commit 1194f29

File tree

6 files changed

+24
-14
lines changed

6 files changed

+24
-14
lines changed

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/UnifyingNumbers.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import org.jetbrains.kotlinx.dataframe.impl.UnifiedNumberTypeOptions
2727
* UByte Byte
2828
* \ /
2929
* \ /
30-
* Nothing?
30+
* Nothing
3131
* ```
3232
* For each number type in the graph, it holds that a number of that type can be expressed lossless by
3333
* a number of a more complex type (any of its parents).
@@ -40,7 +40,11 @@ import org.jetbrains.kotlinx.dataframe.impl.UnifiedNumberTypeOptions
4040
*
4141
* See [UnifiedNumberTypeOptions] for these settings.
4242
*
43-
* At the bottom of the graph is [Nothing?][Nothing].
44-
* This can be interpreted as `null`.
43+
* Nullability, while not displayed in the graph, is also taken into account.
44+
* This means that `Int?` and `Float` will be unified to `Double?`.
45+
*
46+
* At the bottom of the graph is [Nothing].
47+
* This can be interpreted as "no type" and can have no instance,
48+
* while [Nothing?][Nothing] can only be `null`.
4549
*/
4650
public interface UnifyingNumbers

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/NumberTypeUtils.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ private val unifiedNumberTypeGraphs = mutableMapOf<UnifiedNumberTypeOptions, Dir
5252
* UByte Byte
5353
* \ /
5454
* \ /
55-
* Nothing?
55+
* Nothing
5656
* ```
5757
*
5858
* For any two numbers, we can find the nearest common ancestor in this graph
@@ -127,7 +127,7 @@ internal fun getUnifiedNumberTypeGraph(
127127
* UByte Byte
128128
* \ /
129129
* \ /
130-
* Nothing?
130+
* Nothing
131131
* ```
132132
*
133133
* For any two numbers, we can find the nearest common ancestor in this graph

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/types/UtilTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ class UtilTests {
438438
* UByte Byte
439439
* \ /
440440
* \ /
441-
* Nothing?
441+
* Nothing
442442
* ```
443443
*/
444444
@Test

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/UnifyingNumbers.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ import org.jetbrains.kotlinx.dataframe.impl.UnifiedNumberTypeOptions
2222
*
2323
* See [UnifiedNumberTypeOptions] for these settings.
2424
*
25-
* At the bottom of the graph is [Nothing?][Nothing].
26-
* This can be interpreted as `null`.
25+
* Nullability, while not displayed in the graph, is also taken into account.
26+
* This means that `Int?` and `Float` will be unified to `Double?`.
27+
*
28+
* At the bottom of the graph is [Nothing].
29+
* This can be interpreted as "no type" and can have no instance,
30+
* while [Nothing?][Nothing] can only be `null`.
2731
*/
2832
public interface UnifyingNumbers {
2933

@@ -45,7 +49,7 @@ public interface UnifyingNumbers {
4549
* UByte Byte
4650
* \\ /
4751
* \\ /
48-
* Nothing?
52+
* Nothing
4953
* ```
5054
*/
5155
@ExcludeFromSources

docs/StardustDocs/resources/snippets/kdocs/org.jetbrains.kotlinx.dataframe.documentation.UnifyingNumbers.Graph.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@
101101
UByte Byte
102102
\ /
103103
\ /
104-
Nothing?
104+
Nothing
105105
</code></pre></body>
106106
<html/>

docs/StardustDocs/topics/numberUnification.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[//]: # (title: Number Unification)
22

3-
The concept of unifying numbers is converting them to a common number type without losing information.
3+
Unifying numbers means converting them to a common number type without losing information.
44

5-
This is an internal part of the library for now, but its logic can be encountered in multiple places, such as
5+
This is currently an internal part of the library,
6+
but its logic implementation can be encountered in multiple places, such as
67
[statistics](summaryStatistics.md), and [reading JSON](read.md#read-from-json).
78

89
The following graph shows the hierarchy of number types in Kotlin DataFrame.
@@ -15,10 +16,11 @@ For each number type in the graph, it holds that a number of that type can be ex
1516
a number of a more complex type (any of its parents).
1617
This is either because the more complex type has a larger range or higher precision (in terms of bits).
1718

18-
Nullability, while not displayed everywhere in the graph, is also taken into account.
19+
Nullability, while not displayed in the graph, is also taken into account.
1920
This means that `Int?` and `Float` will be unified to `Double?`.
2021

21-
At the bottom of the graph is `Nothing?`. This can be interpreted as `null`.
22+
`Nothing` is at the bottom of the graph and is the starting point in unification.
23+
This can be interpreted as "no type" and can have no instance, while `Nothing?` can only be `null`.
2224

2325
> There may be parts of the library that "unify" numbers, such as [`readCsv`](read.md#column-type-inference-from-csv),
2426
> or [`readExcel`](read.md#read-from-excel).

0 commit comments

Comments
 (0)