Skip to content

Commit 6de7f20

Browse files
committed
Code review comments
1 parent 014970b commit 6de7f20

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

src/Microsoft.ML.Core/Data/ColumnType.cs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ private protected ColumnType(Type rawType, DataKind rawKind)
6767
public Type RawType { get; }
6868

6969
/// <summary>
70-
/// The DataKind corresponding to RawType, if there is one (zero otherwise). It is equivalent
71-
/// to the result produced by DataKindExtensions.TryGetDataKind(RawType, out kind).
70+
/// The <see cref="DataKind"/> corresponding to <see cref="RawType"/>, if there is one (<c>default</c> otherwise).
71+
/// It is equivalent to the result produced by <see cref="DataKindExtensions.TryGetDataKind(Type, out DataKind)"/>.
72+
/// For external code it would be preferable to operate over <see cref="RawType"/>.
7273
/// </summary>
7374
[BestFriend]
7475
internal DataKind RawKind { get; }
@@ -80,19 +81,19 @@ private protected ColumnType(Type rawType, DataKind rawKind)
8081
internal bool IsPrimitive { get; }
8182

8283
/// <summary>
83-
/// Equivalent to "this as PrimitiveType".
84+
/// Equivalent to <c>as <see cref="PrimitiveType"/></c>.
8485
/// </summary>
8586
[BestFriend]
8687
internal PrimitiveType AsPrimitive => IsPrimitive ? (PrimitiveType)this : null;
8788

8889
/// <summary>
89-
/// Whether this type is a standard numeric type.
90+
/// Whether this type is a standard numeric type. External code should use <c>is <see cref="NumberType"/></c>.
9091
/// </summary>
9192
[BestFriend]
9293
internal bool IsNumber { get; }
9394

9495
/// <summary>
95-
/// Whether this type is the standard text type.
96+
/// Whether this type is the standard text type. External code should use <c>is <see cref="TextType"/></c>.
9697
/// </summary>
9798
[BestFriend]
9899
internal bool IsText
@@ -108,7 +109,7 @@ internal bool IsText
108109
}
109110

110111
/// <summary>
111-
/// Whether this type is the standard boolean type.
112+
/// Whether this type is the standard boolean type. External code should use <c>is <see cref="BoolType"/></c>.
112113
/// </summary>
113114
[BestFriend]
114115
internal bool IsBool
@@ -134,12 +135,13 @@ internal bool IsBool
134135
/// <summary>
135136
/// Whether this type is a key type, which implies that the order of values is not significant,
136137
/// and arithmetic is non-sensical. A key type can define a cardinality.
138+
/// External code should use <c>is <see cref="KeyType"/></c>.
137139
/// </summary>
138140
[BestFriend]
139141
internal bool IsKey { get; }
140142

141143
/// <summary>
142-
/// Equivalent to "this as KeyType".
144+
/// Equivalent to <c>as <see cref="KeyType"/></c>.
143145
/// </summary>
144146
[BestFriend]
145147
internal KeyType AsKey => IsKey ? (KeyType)this : null;
@@ -165,27 +167,26 @@ internal bool IsBool
165167
internal bool IsVector { get; }
166168

167169
/// <summary>
168-
/// Equivalent to "this as VectorType".
170+
/// Equivalent to <c>as <see cref="VectorType"/></c>.
169171
/// </summary>
170172
[BestFriend]
171173
internal VectorType AsVector => IsVector ? (VectorType)this : null;
172174

173175
/// <summary>
174-
/// For non-vector types, this returns the column type itself (i.e., return this).
176+
/// For non-vector types, this returns the column type itself (i.e., return <c>this</c>).
175177
/// </summary>
176178
[BestFriend]
177179
internal ColumnType ItemType => ItemTypeCore;
178180

179181
/// <summary>
180182
/// Whether this is a vector type with known size. Returns false for non-vector types.
181-
/// Equivalent to VectorSize > 0.
183+
/// Equivalent to <c><see cref="VectorSize"/> &gt; 0</c>.
182184
/// </summary>
183185
[BestFriend]
184186
internal bool IsKnownSizeVector => VectorSize > 0;
185187

186188
/// <summary>
187-
/// Zero return means either it's not a vector or the size is unknown. Equivalent to
188-
/// IsVector ? ValueCount : 0 and to IsKnownSizeVector ? ValueCount : 0.
189+
/// Zero return means either it's not a vector or the size is unknown.
189190
/// </summary>
190191
[BestFriend]
191192
internal int VectorSize => VectorSizeCore;

src/Microsoft.ML.Core/Data/MetadataUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace Microsoft.ML.Runtime.Data
1515
{
1616
/// <summary>
17-
/// Utilities for implementing and using the metadata API of <see cref="ISchema"/>.
17+
/// Utilities for implementing and using the metadata API of <see cref="Schema"/>.
1818
/// </summary>
1919
public static class MetadataUtils
2020
{

0 commit comments

Comments
 (0)