Show More
@@ -95,6 +95,14 b' def _setupsample(dag, nodes, size):' | |||||
95 | return always, set(), desiredlen |
|
95 | return always, set(), desiredlen | |
96 |
|
96 | |||
97 | def _takequicksample(dag, nodes, size): |
|
97 | def _takequicksample(dag, nodes, size): | |
|
98 | """takes a quick sample of size <size> | |||
|
99 | ||||
|
100 | It is meant for initial sampling and focuses on querying heads and close | |||
|
101 | ancestors of heads. | |||
|
102 | ||||
|
103 | :dag: a dag object | |||
|
104 | :nodes: set of nodes to discover | |||
|
105 | :size: the maximum size of the sample""" | |||
98 | sample = dag.headsetofconnecteds(nodes) |
|
106 | sample = dag.headsetofconnecteds(nodes) | |
99 | if size <= len(sample): |
|
107 | if size <= len(sample): | |
100 | return _limitsample(sample, size) |
|
108 | return _limitsample(sample, size) |
General Comments 0
You need to be logged in to leave comments.
Login now