{ "function_name": "simult_search", "file_path": "src/helpers/dependent_cp/simult.py", "function_calls": [ { "function_call_name": "to_valid_array", "functionality": "Converts the input dependency graph to a valid list-of-lists adjacency matrix, handling both list and string input representations.", "input": "question[\"dep_graph\"]", "output": "adjacency matrix (list[list[int]])", "location_or_namespace": "src/helpers/dependent_cp/simult.py" }, { "function_call_name": "topological_sort", "functionality": "Performs a topological sort on the directed acyclic graph (adjacency matrix), returning an ordering of nodes such that all dependencies of a node precede it.", "input": "adj_list", "output": "top_order (list[int])", "location_or_namespace": "src/helpers/dependent_cp/simult.py" }, { "function_call_name": "risk_score", "functionality": "Calculates a risk score for each node/claim based on its frequency score and, optionally, descendant risk information using a provided beta parameter.", "input": "question, top_order, beta", "output": "node_scores (dict[int, float])", "location_or_namespace": "src/helpers/dependent_cp/simult.py" }, { "function_call_name": "sort", "functionality": "Sorts a list in place in ascending order.", "input": "None (method called as threshes.sort())", "output": "None (threshes sorted in place)", "location_or_namespace": "builtins" }, { "function_call_name": "enumerate", "functionality": "Returns an iterator of pairs (index, value) for items in an iterable.", "input": "top_order", "output": "iterator of (int, element)", "location_or_namespace": "builtins" }, { "function_call_name": "range", "functionality": "Creates an iterable sequence of integers from 0 up to but not including a given value.", "input": "len(node_scores) or len(question['claims']) or len(adj_list)", "output": "iterator of int", "location_or_namespace": "builtins" }, { "function_call_name": "pop", "functionality": "Removes and returns the item at the given position in the list (index 0 in this usage).", "input": "0 (index of item to remove from candidates)", "output": "node (int)", "location_or_namespace": "builtins" }, { "function_call_name": "append", "functionality": "Adds an item to the end of the list.", "input": "node (int) or element (int or list)", "output": "None", "location_or_namespace": "builtins" } ] }