-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSplitControl-class.html
362 lines (244 loc) · 14.4 KB
/
SplitControl-class.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
<meta name="description" content="API docs for the SplitControl class from the split_control library, for the Dart programming language.">
<title>SplitControl class - split_control library - Dart API</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet">
<link rel="stylesheet" href="../static-assets/github.css?v1">
<link rel="stylesheet" href="../static-assets/styles.css?v1">
<link rel="icon" href="../static-assets/favicon.png?v1">
</head>
<body data-base-href="../" data-using-base-href="false" class="light-theme">
<div id="overlay-under-drawer"></div>
<header id="title">
<span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span>
<ol class="breadcrumbs gt-separated dark hidden-xs">
<li><a href="../index.html">omnilore_scheduler</a></li>
<li><a href="../compute_split_control/compute_split_control-library.html">compute/split_control.dart</a></li>
<li class="self-crumb">SplitControl class</li>
</ol>
<div class="self-name">SplitControl</div>
<form class="search navbar-right" role="search">
<input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
</form>
<div class="toggle" id="theme-button" title="Toggle brightness">
<label for="theme">
<input type="checkbox" id="theme" value="light-theme">
<span id="dark-theme-button" class="material-symbols-outlined">
dark_mode
</span>
<span id="light-theme-button" class="material-symbols-outlined">
light_mode
</span>
</label>
</div>
</header>
<main>
<div
id="dartdoc-main-content"
class="main-content"
data-above-sidebar="compute_split_control/compute_split_control-library-sidebar.html"
data-below-sidebar="compute_split_control/SplitControl-class-sidebar.html">
<div>
<h1><span class="kind-class">SplitControl</span> class
</h1></div>
<section class="desc markdown">
<p>This class implements an algorithm to find good and equal split among
a group of people</p>
<p>This algorithm is originally devised by John Taber of Omnilore and
implemented in Pascal</p>
</section>
<section class="summary offset-anchor" id="constructors">
<h2>Constructors</h2>
<dl class="constructor-summary-list">
<dt id="SplitControl" class="callable">
<span class="name"><a href="../compute_split_control/SplitControl/SplitControl.html">SplitControl</a></span><span class="signature">(<span class="parameter" id="-param-courses"><span class="type-annotation"><a href="../store_courses/Courses-class.html">Courses</a></span> <span class="parameter-name">courses</span>, </span><span class="parameter" id="-param-people"><span class="type-annotation"><a href="../store_people/People-class.html">People</a></span> <span class="parameter-name">people</span></span>)</span>
</dt>
<dd>
</dd>
</dl>
</section>
<section class="summary offset-anchor inherited" id="instance-properties">
<h2>Properties</h2>
<dl class="properties">
<dt id="hashCode" class="property inherited">
<span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></span>
<span class="signature">→ <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span>
</dt>
<dd class="inherited">
The hash code for this object.
<div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div>
</dd>
<dt id="runtimeType" class="property inherited">
<span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></span>
<span class="signature">→ <a href="https://api.flutter.dev/flutter/dart-core/Type-class.html">Type</a></span>
</dt>
<dd class="inherited">
A representation of the runtime type of the object.
<div class="features"><span class="feature">no setter</span><span class="feature">inherited</span></div>
</dd>
</dl>
</section>
<section
class="summary offset-anchor"
id="instance-methods">
<h2>Methods</h2>
<dl class="callables">
<dt id="addCluster" class="callable">
<span class="name"><a href="../compute_split_control/SplitControl/addCluster.html">addCluster</a></span><span class="signature">(<wbr><span class="parameter" id="addCluster-param-cluster"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Set-class.html">Set</a><span class="signature"><<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>></span></span> <span class="parameter-name">cluster</span></span>)
<span class="returntype parameter">→ void</span>
</span>
</dt>
<dd>
Add the given set of people as one cluster
All clusters passed to this function should be disjoint. If there is need
to expand a previously added cluster, remove first and then add a new one
</dd>
<dt id="getClusterIndex" class="callable">
<span class="name"><a href="../compute_split_control/SplitControl/getClusterIndex.html">getClusterIndex</a></span><span class="signature">(<wbr><span class="parameter" id="getClusterIndex-param-person"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">person</span></span>)
<span class="returntype parameter">→ <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span>
</span>
</dt>
<dd>
Get cluster index given a person's name
</dd>
<dt id="getHistory" class="callable">
<span class="name"><a href="../compute_split_control/SplitControl/getHistory.html">getHistory</a></span><span class="signature">(<wbr>)
<span class="returntype parameter">→ <a href="https://api.flutter.dev/flutter/dart-core/List-class.html">List</a><span class="signature"><<wbr><span class="type-parameter"><a href="https://pub.dev/documentation/tuple/2.0.2/tuple/Tuple2-class.html">Tuple2</a><span class="signature"><<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/List-class.html">List</a><span class="signature"><<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/Set-class.html">Set</a><span class="signature"><<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>></span></span>></span></span>, <span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>></span></span>></span></span>
</span>
</dt>
<dd>
Get split history
</dd>
<dt id="getSplitResult" class="callable">
<span class="name"><a href="../compute_split_control/SplitControl/getSplitResult.html">getSplitResult</a></span><span class="signature">(<wbr><span class="parameter" id="getSplitResult-param-course"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">course</span></span>)
<span class="returntype parameter">→ <a href="https://api.flutter.dev/flutter/dart-core/List-class.html">List</a><span class="signature"><<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/Set-class.html">Set</a><span class="signature"><<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>></span></span>></span></span>
</span>
</dt>
<dd>
Compute the result of splitting without implementing the split
</dd>
<dt id="initialize" class="callable">
<span class="name"><a href="../compute_split_control/SplitControl/initialize.html">initialize</a></span><span class="signature">(<wbr><span class="parameter" id="initialize-param-scheduling"><span class="type-annotation"><a href="../scheduling/Scheduling-class.html">Scheduling</a></span> <span class="parameter-name">scheduling</span></span>)
<span class="returntype parameter">→ void</span>
</span>
</dt>
<dd>
Late initialize Scheduling
</dd>
<dt id="noSuchMethod" class="callable inherited">
<span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></span><span class="signature">(<wbr><span class="parameter" id="noSuchMethod-param-invocation"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Invocation-class.html">Invocation</a></span> <span class="parameter-name">invocation</span></span>)
<span class="returntype parameter">→ dynamic</span>
</span>
</dt>
<dd class="inherited">
Invoked when a nonexistent method or property is accessed.
<div class="features"><span class="feature">inherited</span></div>
</dd>
<dt id="removeCluster" class="callable">
<span class="name"><a href="../compute_split_control/SplitControl/removeCluster.html">removeCluster</a></span><span class="signature">(<wbr><span class="parameter" id="removeCluster-param-person"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">person</span></span>)
<span class="returntype parameter">→ void</span>
</span>
</dt>
<dd>
Remove the cluster to which the given person belongs
</dd>
<dt id="resetState" class="callable">
<span class="name"><a href="../compute_split_control/SplitControl/resetState.html">resetState</a></span><span class="signature">(<wbr>)
<span class="returntype parameter">→ void</span>
</span>
</dt>
<dd>
Reset internal compute state, including clusters
</dd>
<dt id="split" class="callable">
<span class="name"><a href="../compute_split_control/SplitControl/split.html">split</a></span><span class="signature">(<wbr><span class="parameter" id="split-param-course"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">course</span>, </span><span class="parameter" id="split-param-noCompute">{<span class="type-annotation">dynamic</span> <span class="parameter-name">noCompute</span> = <span class="default-value">false</span>}</span>)
<span class="returntype parameter">→ void</span>
</span>
</dt>
<dd>
Main split routine
</dd>
<dt id="toString" class="callable inherited">
<span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/toString.html">toString</a></span><span class="signature">(<wbr>)
<span class="returntype parameter">→ <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>
</span>
</dt>
<dd class="inherited">
A string representation of this object.
<div class="features"><span class="feature">inherited</span></div>
</dd>
</dl>
</section>
<section
class="summary offset-anchor inherited"
id="operators">
<h2>Operators</h2>
<dl class="callables">
<dt id="operator ==" class="callable inherited">
<span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></span><span class="signature">(<wbr><span class="parameter" id="==-param-other"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Object-class.html">Object</a></span> <span class="parameter-name">other</span></span>)
<span class="returntype parameter">→ <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span>
</span>
</dt>
<dd class="inherited">
The equality operator.
<div class="features"><span class="feature">inherited</span></div>
</dd>
</dl>
</section>
<section class="summary offset-anchor" id="constants">
<h2>Constants</h2>
<dl class="properties">
<dt id="numPeople" class="constant">
<span class="name "><a href="../compute_split_control/SplitControl/numPeople-constant.html">numPeople</a></span>
<span class="signature">→ const <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span>
</dt>
<dd>
The index into <code>_splitMatrix</code> where the number of people per row is stored
</dd>
<dt id="numUnavail" class="constant">
<span class="name "><a href="../compute_split_control/SplitControl/numUnavail-constant.html">numUnavail</a></span>
<span class="signature">→ const <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span>
</dt>
<dd>
The index into <code>_splitMatrix</code> where the number of unavailability per row
is stored
When number of people is 0, this index stores the index of the cluster
this person is currently in
</dd>
</dl>
</section>
</div> <!-- /.main-content -->
<div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
<!-- The search input and breadcrumbs below are only responsively visible at low resolutions. -->
<header id="header-search-sidebar" class="hidden-l">
<form class="search-sidebar" role="search">
<input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
</form>
</header>
<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
<li><a href="../index.html">omnilore_scheduler</a></li>
<li><a href="../compute_split_control/compute_split_control-library.html">split_control</a></li>
<li class="self-crumb">SplitControl class</li>
</ol>
<h5>split_control library</h5>
<div id="dartdoc-sidebar-left-content"></div>
</div>
<div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
</div><!--/.sidebar-offcanvas-->
</main>
<footer>
<span class="no-break">
omnilore_scheduler
1.0.0+1
</span>
</footer>
<script src="../static-assets/highlight.pack.js?v1"></script>
<script src="../static-assets/docs.dart.js"></script>
</body>
</html>