-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing KeyType documentation #2783
Changes from 3 commits
e9c2848
e7b649d
df5da3e
ff3784c
24ae1a7
657cadd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -59,6 +59,13 @@ public static bool IsValidDataType(Type type) | |||
/// </summary> | ||||
public ulong Count { get; } | ||||
|
||||
/// <summary> | ||||
/// Determine if a DataViewType object is equal to another KeyType instance. | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I might reverse this, so, "if this |
||||
/// Checks if the other item is the type of KeyType, if the RawType | ||||
/// is the same, and if the Count is the same. | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Similar notes on |
||||
/// </summary> | ||||
/// <param name="other">The other object to compare against.</param> | ||||
/// <returns>A boolean if both objects are equal or not.</returns> | ||||
public override bool Equals(DataViewType other) | ||||
{ | ||||
if (other == this) | ||||
|
@@ -73,16 +80,31 @@ public override bool Equals(DataViewType other) | |||
return true; | ||||
} | ||||
|
||||
/// <summary> | ||||
/// Determine if a KeyType instance is equal to another KeyType instance. | ||||
/// Checks if any object is the type of KeyType, if the RawType | ||||
/// is the same, and if the Count is the same. | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you use the |
||||
/// </summary> | ||||
/// <param name="other">The other object to compare against.</param> | ||||
/// <returns>A boolean if both objects are equal or not.</returns> | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
for bool returns, please document them like this: machinelearning/src/Microsoft.ML.StandardLearners/Standard/Online/AveragedLinear.cs Line 94 in 6e9023f
|
||||
public override bool Equals(object other) | ||||
{ | ||||
return other is DataViewType tmp && Equals(tmp); | ||||
} | ||||
|
||||
/// <summary> | ||||
/// Retrieves the hash code. | ||||
/// </summary> | ||||
/// <returns>An integer representing the hash code.</returns> | ||||
public override int GetHashCode() | ||||
{ | ||||
return Hashing.CombinedHash(RawType.GetHashCode(), Count); | ||||
} | ||||
|
||||
/// <summary> | ||||
/// The string representation of the KeyType. | ||||
/// </summary> | ||||
/// <returns>A formatted string.</returns> | ||||
public override string ToString() | ||||
{ | ||||
InternalDataKind rawKind = this.GetRawKind(); | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might prefer
<see
tags. Not that I think we'll rename them this late in the game, but the links would probably be nice.