Skip to content

Commit f031f43

Browse files
committed
Scott documentation review.
1 parent 24b59e6 commit f031f43

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

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

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -92,24 +92,22 @@ public interface IDataView
9292
RowCursor GetRowCursor(Func<int, bool> needCol, Random rand = null);
9393

9494
/// <summary>
95-
/// This constructs a set of parallel batch cursors. The value <paramref name="n"/> is a recommended limit
96-
/// on cardinality. If <paramref name="n"/> is non-positive, this indicates that the caller
97-
/// has no recommendation, and the implementation should have some default behavior to cover
98-
/// this case. Note that this is strictly a recommendation: it is entirely possible that
99-
/// an implementation can return a different number of cursors.
95+
/// This constructs a set of parallel batch cursors. The value <paramref name="n"/> is a recommended limit on
96+
/// cardinality. If <paramref name="n"/> is non-positive, this indicates that the caller has no recommendation,
97+
/// and the implementation should have some default behavior to cover this case. Note that this is strictly a
98+
/// recommendation: it is entirely possible that an implementation can return a different number of cursors.
10099
///
101100
/// The cursors should return the same data as returned through
102-
/// <see cref="GetRowCursor(Func{int, bool}, Random)"/>, except partitioned: no two cursors
103-
/// should return the "same" row as would have been returned through the regular serial cursor,
104-
/// but all rows should be returned by exactly one of the cursors returned from this cursor.
105-
/// The cursors can have their values reconciled downstream through the use of the
106-
/// <see cref="Row.Batch"/> property.
101+
/// <see cref="GetRowCursor(Func{int, bool}, Random)"/>, except partitioned: no two cursors should return the
102+
/// "same" row as would have been returned through the regular serial cursor, but all rows should be returned by
103+
/// exactly one of the cursors returned from this cursor. The cursors can have their values reconciled
104+
/// downstream through the use of the <see cref="Row.Batch"/> property.
107105
///
108-
/// The typical usage pattern is that a set of cursors is requested, each of them is then
109-
/// given to a set of working threads that consume from them independently while, ultimately,
110-
/// the results are finally collated in the end by exploiting the ordering of the <see cref="Row.Batch"/>
111-
/// property described above. More typical scenarios will be content with pulling from the single
112-
/// serial cursor of <see cref="GetRowCursor(Func{int, bool}, Random)"/>.
106+
/// The typical usage pattern is that a set of cursors is requested, each of them is then given to a set of
107+
/// working threads that consume from them independently while, ultimately, the results are finally collated in
108+
/// the end by exploiting the ordering of the <see cref="Row.Batch"/> property described above. More typical
109+
/// scenarios will be content with pulling from the single serial cursor of
110+
/// <see cref="GetRowCursor(Func{int, bool}, Random)"/>.
113111
/// </summary>
114112
/// <param name="needCol">The predicate, where a column is active if this returns true.</param>
115113
/// <param name="n">The suggested degree of parallelism.</param>
@@ -124,7 +122,7 @@ public interface IDataView
124122
}
125123

126124
/// <summary>
127-
/// Delegate type to get a value. This can used for efficient access to data in a <see cref="Row"/>
125+
/// Delegate type to get a value. This can be used for efficient access to data in a <see cref="Row"/>
128126
/// or <see cref="RowCursor"/>.
129127
/// </summary>
130128
public delegate void ValueGetter<TValue>(ref TValue value);
@@ -150,9 +148,13 @@ public abstract class Row : IDisposable
150148
/// <summary>
151149
/// This provides a means for reconciling multiple rows that have been produced generally from
152150
/// <see cref="IDataView.GetRowCursorSet(Func{int, bool}, int, Random)"/>. When getting a set, there is a need
153-
/// to, while allowing parallel processing to proceed, always have an aim thatthe original order should be
154-
/// reconverable. So: for any cursor implementation, batch numbers should be non-decreasing. Furthermore, any
155-
/// given batch number should only appear in one of the cursors as returned by
151+
/// to, while allowing parallel processing to proceed, always have an aim that the original order should be
152+
/// reconverable. Note, whether or not a user cares about that original order in ones specific application is
153+
/// another story altogether (most callers of this as a practical matter do not, otherwise they would not call
154+
/// it), but at least in principle it should be possible to reconstruct the original order one would get from an
155+
/// identically configured <see cref="IDataView.GetRowCursor(Func{int, bool}, Random)"/>. So: for any cursor
156+
/// implementation, batch numbers should be non-decreasing. Furthermore, any given batch number should only
157+
/// appear in one of the cursors as returned by
156158
/// <see cref="IDataView.GetRowCursorSet(Func{int, bool}, int, Random)"/>. In this way, order is determined by
157159
/// batch number. An operation that reconciles these cursors to produce a consistent single cursoring, could do
158160
/// so by drawing from the single cursor, among all cursors in the set, that has the smallest batch number

0 commit comments

Comments
 (0)