bb0b34fe488fc125fcd8cbb367db92212ac988b3,brian2/stateupdaters/base.py,StateUpdateMethod,determine_stateupdater,#Any#Any#Any#Any#,90
Before Change
return stateupdater
// determine the best suitable state updater
priorities = [(name, updater.get_priority(equations,
namespace,
specifiers))
for name, updater in
StateUpdateMethod.stateupdaters.iteritems()]
priorities.sort(key=lambda elem: elem[1], reverse=True)
// If the list is empty or the first (=best) priority is 0, we did not
// find anything suitable
After Change
if method is not None:
stateupdater = None
for name, registered_stateupdater in StateUpdateMethod.stateupdaters:
if name == method:
stateupdater = registered_stateupdater
break
if stateupdater is None:
raise ValueError("No state updater with the name "%s" "
"is known" % method)
if not stateupdater.can_integrate(equations, namespace, specifiers):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: brian-team/brian2
Commit Name: bb0b34fe488fc125fcd8cbb367db92212ac988b3
Time: 2013-03-26
Author: marcel.stimberg@ens.fr
File Name: brian2/stateupdaters/base.py
Class Name: StateUpdateMethod
Method Name: determine_stateupdater
Project Name: fxsjy/jieba
Commit Name: 751ff35eb5faa6460038bb20a1ef6bfcf29f440a
Time: 2014-10-31
Author: abcdoyle888@gmail.com
File Name: jieba/analyse/__init__.py
Class Name:
Method Name: extract_tags
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 1352c7986ef71a5a7d7c21a31e28c7703346741d
Time: 2019-10-23
Author: ruwa@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_virtual_machine.py
Class Name: GceVirtualMachine
Method Name: _GenerateCreateCommand