Download annotations/annotation_31/function_info.json from mcy98/RECODE-H: direct link, hf CLI and curl.
- Browser
- Download file 25.5 kB
-
https://huggingface.co/datasets/mcy98/RECODE-H/resolve/main/annotations/annotation_31/function_info.json
- Command line
-
hf download hf://datasets/mcy98/RECODE-H/annotations/annotation_31/function_info.json
-
curl -L -o function_info.json https://huggingface.co/datasets/mcy98/RECODE-H/resolve/main/annotations/annotation_31/function_info.json
25.5 kB
| [ | |
| { | |
| "function_name": "MatrixMultiplier.__init__", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "__init__", | |
| "functionality": "Initializes the base class (object).", | |
| "input": "A (matrix)", | |
| "output": "None", | |
| "location_or_namespace": "super" | |
| }, | |
| { | |
| "function_call_name": "len", | |
| "functionality": "Returns the number of rows of the matrix.", | |
| "input": "A (matrix)", | |
| "output": "int (number of rows)", | |
| "location_or_namespace": "builtins" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "NaiveMultiplier.multiply", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "dot", | |
| "functionality": "Computes the dot product of two arrays (vector-matrix multiplication).", | |
| "input": "v (vector), self.A (matrix)", | |
| "output": "numpy.ndarray (result of multiplication)", | |
| "location_or_namespace": "numpy" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "NaiveMultiplier.dump", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [] | |
| }, | |
| { | |
| "function_name": "NaiveMultiplier.load", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "NaiveMultiplier.__init__", | |
| "functionality": "Initializes a new NaiveMultiplier object with the given data as matrix A.", | |
| "input": "A=data (matrix data)", | |
| "output": "NaiveMultiplier instance", | |
| "location_or_namespace": "multipliers_np.NaiveMultiplier" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRBinaryMultiplier.__init__", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "__init__", | |
| "functionality": "Initializes the base class (MatrixMultiplier).", | |
| "input": "A (matrix)", | |
| "output": "None", | |
| "location_or_namespace": "super" | |
| }, | |
| { | |
| "function_call_name": "log", | |
| "functionality": "Calculates the logarithm base 2 of a number.", | |
| "input": "self.n (number of rows), 2 (base)", | |
| "output": "float", | |
| "location_or_namespace": "math" | |
| }, | |
| { | |
| "function_call_name": "int", | |
| "functionality": "Converts a floating-point number to an integer.", | |
| "input": "float_value", | |
| "output": "int", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "preprocess", | |
| "functionality": "Orchestrates the preprocessing steps of the RSR algorithm for the binary matrix, including padding, column blocking, permutation, and segmentation.", | |
| "input": "self.k (blocking parameter)", | |
| "output": "tuple (blocks_permutations, padding)", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRBinaryMultiplier.find_permutations", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "lexsort", | |
| "functionality": "Performs an indirect stable sort on multiple keys, effectively sorting rows lexicographically.", | |
| "input": "matrix.T[::-1] (transposed matrix with rows reversed)", | |
| "output": "numpy.ndarray (sorted indices)", | |
| "location_or_namespace": "numpy" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRBinaryMultiplier.find_segment_indices", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "full", | |
| "functionality": "Returns a new array of a given shape and type, filled with a specified value.", | |
| "input": "2 ** k (shape), n (fill value), dtype=int", | |
| "output": "numpy.ndarray", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "format", | |
| "functionality": "Formats an integer to a binary string with a specified width and leading zeros.", | |
| "input": "0 (value), f'0{k}b' (format specifier)", | |
| "output": "str", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "map", | |
| "functionality": "Applies the 'str' function to each element in the row.", | |
| "input": "str (function), row (iterable)", | |
| "output": "map object", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "str", | |
| "functionality": "Converts an object to its string representation.", | |
| "input": "element (from row)", | |
| "output": "str", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "join", | |
| "functionality": "Concatenates strings from an iterable into a single string.", | |
| "input": "iterable of strings (output of map)", | |
| "output": "str", | |
| "location_or_namespace": "builtins.str" | |
| }, | |
| { | |
| "function_call_name": "int", | |
| "functionality": "Converts a binary string to an integer.", | |
| "input": "row_str (binary string), 2 (base)", | |
| "output": "int", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "range", | |
| "functionality": "Generates a sequence of numbers for iteration.", | |
| "input": "last_row_decimal + 1 (start), current_row_decimal (stop)", | |
| "output": "range object", | |
| "location_or_namespace": "builtins" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRBinaryMultiplier.generate_binary_matrix", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "array", | |
| "functionality": "Creates a NumPy array from a Python list of lists.", | |
| "input": "list of lists (containing binary representations)", | |
| "output": "numpy.ndarray", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "list", | |
| "functionality": "Converts a map object (from binary representation) to a list.", | |
| "input": "map object", | |
| "output": "list", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "map", | |
| "functionality": "Applies the 'int' function to each character of a binary string.", | |
| "input": "int (function), binary_repr_output (string)", | |
| "output": "map object", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "int", | |
| "functionality": "Converts a character to an integer.", | |
| "input": "char (from binary string)", | |
| "output": "int", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "binary_repr", | |
| "functionality": "Returns the binary representation of a number as a string, padded to a specified width.", | |
| "input": "i (number), width=k (width)", | |
| "output": "str (binary string)", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "range", | |
| "functionality": "Generates a sequence of numbers from 0 to num_rows-1.", | |
| "input": "num_rows", | |
| "output": "range object", | |
| "location_or_namespace": "builtins" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRBinaryMultiplier.preprocess", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "pad", | |
| "functionality": "Pads an array with constant values.", | |
| "input": "self.A (matrix), ((0, 0), (0, padding)) (pad widths), mode='constant'", | |
| "output": "numpy.ndarray (padded matrix)", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "range", | |
| "functionality": "Generates a sequence of numbers for iterating through column blocks.", | |
| "input": "0 (start), self.m (stop), k (step)", | |
| "output": "range object", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "find_permutations", | |
| "functionality": "Sorts rows of a block matrix lexicographically and returns permutation indices.", | |
| "input": "block_matrix", | |
| "output": "numpy.ndarray (permutation indices)", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| }, | |
| { | |
| "function_call_name": "find_segment_indices", | |
| "functionality": "Calculates segment start indices for each unique binary row in a permuted block.", | |
| "input": "block_matrix, permutations", | |
| "output": "numpy.ndarray (segment indices)", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| }, | |
| { | |
| "function_call_name": "asizeof", | |
| "functionality": "Calculates the approximate size in bytes of a Python object.", | |
| "input": "blocks_permutations (list of tuples)", | |
| "output": "int (size in bytes)", | |
| "location_or_namespace": "pympler.asizeof" | |
| }, | |
| { | |
| "function_call_name": "print", | |
| "functionality": "Prints memory information to the console.", | |
| "input": "string (formatted message)", | |
| "output": "None", | |
| "location_or_namespace": "builtins" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRBinaryMultiplier.multiply", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "empty", | |
| "functionality": "Creates an uninitialized array of a given shape and type.", | |
| "input": "self.m + self._padding (shape), dtype=int", | |
| "output": "numpy.ndarray (results array)", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "generate_binary_matrix", | |
| "functionality": "Creates the Bin_[k] matrix containing all possible binary values.", | |
| "input": "self.k (blocking parameter)", | |
| "output": "numpy.ndarray (Bin_[k] matrix)", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| }, | |
| { | |
| "function_call_name": "NaiveMultiplier.__init__", | |
| "functionality": "Initializes a NaiveMultiplier object for performing block products.", | |
| "input": "binary_matrix (Bin_[k] matrix)", | |
| "output": "NaiveMultiplier instance", | |
| "location_or_namespace": "multipliers_np.NaiveMultiplier" | |
| }, | |
| { | |
| "function_call_name": "enumerate", | |
| "functionality": "Returns an enumerate object, yielding index-value pairs from an iterable.", | |
| "input": "self._blocks_permutations (list of (permutation, segment_indices) tuples)", | |
| "output": "enumerate object", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "empty", | |
| "functionality": "Creates an uninitialized array for segmented_sum.", | |
| "input": "2 ** self.k (shape)", | |
| "output": "numpy.ndarray (segmented_sum array)", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "cumsum", | |
| "functionality": "Computes the cumulative sum of array elements along a given axis.", | |
| "input": "permuted_vector", | |
| "output": "numpy.ndarray (cumulative sum array)", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "insert", | |
| "functionality": "Inserts values along the given axis before the given indices.", | |
| "input": "cumsum_arr (array), 0 (index), 0 (value)", | |
| "output": "numpy.ndarray (modified cumulative sum array)", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "len", | |
| "functionality": "Returns the length of the segment_indices list.", | |
| "input": "segment_indices", | |
| "output": "int (length)", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "len", | |
| "functionality": "Returns the length of the cumsum_arr array.", | |
| "input": "cumsum_arr", | |
| "output": "int (length)", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "multiply", | |
| "functionality": "Performs vector-matrix multiplication for a block using the naive approach (segmented_sum . Bin_[k]).", | |
| "input": "segmented_sum", | |
| "output": "numpy.ndarray (block product result)", | |
| "location_or_namespace": "multipliers_np.NaiveMultiplier" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRBinaryMultiplier.dump", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "concatenate", | |
| "functionality": "Joins a sequence of arrays along an existing axis.", | |
| "input": "(per, seg) (permutation and segment arrays)", | |
| "output": "numpy.ndarray (concatenated array)", | |
| "location_or_namespace": "numpy" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRBinaryMultiplier.load", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "RSRBinaryMultiplier.__init__", | |
| "functionality": "Initializes a new RSRBinaryMultiplier object with preloaded data.", | |
| "input": "None (no matrix or k provided at initialization)", | |
| "output": "RSRBinaryMultiplier instance", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRTernaryMultiplier.__init__", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "__init__", | |
| "functionality": "Initializes the base class (MatrixMultiplier).", | |
| "input": "A (matrix)", | |
| "output": "None", | |
| "location_or_namespace": "super" | |
| }, | |
| { | |
| "function_call_name": "unpack_matrices", | |
| "functionality": "Decomposes a ternary matrix into two binary matrices (B1 for 1s, B2 for -1s).", | |
| "input": "A (ternary matrix)", | |
| "output": "tuple (B1, B2)", | |
| "location_or_namespace": "multipliers_np.RSRTernaryMultiplier" | |
| }, | |
| { | |
| "function_call_name": "RSRBinaryMultiplier.__init__", | |
| "functionality": "Initializes an RSR Binary Multiplier object for the first decomposed binary matrix (B1).", | |
| "input": "self._B1 (binary matrix), k=k (blocking parameter)", | |
| "output": "RSRBinaryMultiplier instance", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| }, | |
| { | |
| "function_call_name": "RSRBinaryMultiplier.__init__", | |
| "functionality": "Initializes an RSR Binary Multiplier object for the second decomposed binary matrix (B2).", | |
| "input": "self._B2 (binary matrix), k=k (blocking parameter)", | |
| "output": "RSRBinaryMultiplier instance", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRTernaryMultiplier.__binary_multiplier_class__", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [] | |
| }, | |
| { | |
| "function_name": "RSRTernaryMultiplier.unpack_matrices", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "astype", | |
| "functionality": "Copies the boolean array (from matrix comparison) and casts its elements to integers (0 or 1).", | |
| "input": "int (type to cast to)", | |
| "output": "numpy.ndarray (binary matrix)", | |
| "location_or_namespace": "numpy.ndarray" | |
| }, | |
| { | |
| "function_call_name": "astype", | |
| "functionality": "Copies the boolean array (from matrix comparison) and casts its elements to integers (0 or 1).", | |
| "input": "int (type to cast to)", | |
| "output": "numpy.ndarray (binary matrix)", | |
| "location_or_namespace": "numpy.ndarray" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRTernaryMultiplier.multiply", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "multiply", | |
| "functionality": "Performs vector-matrix multiplication using the RSR binary algorithm for the first binary matrix (B1).", | |
| "input": "v (vector)", | |
| "output": "numpy.ndarray (result of multiplication)", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| }, | |
| { | |
| "function_call_name": "multiply", | |
| "functionality": "Performs vector-matrix multiplication using the RSR binary algorithm for the second binary matrix (B2).", | |
| "input": "v (vector)", | |
| "output": "numpy.ndarray (result of multiplication)", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRTernaryMultiplier.dump", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "dump", | |
| "functionality": "Dumps the preprocessed data for the first internal RSR binary multiplier.", | |
| "input": "None", | |
| "output": "tuple (serialized data)", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| }, | |
| { | |
| "function_call_name": "dump", | |
| "functionality": "Dumps the preprocessed data for the second internal RSR binary multiplier.", | |
| "input": "None", | |
| "output": "tuple (serialized data)", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRTernaryMultiplier.load", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "load", | |
| "functionality": "Loads (deserializes) an RSRBinaryMultiplier instance from data.", | |
| "input": "data[0] (serialized data for B1)", | |
| "output": "RSRBinaryMultiplier instance", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| }, | |
| { | |
| "function_call_name": "load", | |
| "functionality": "Loads (deserializes) an RSRBinaryMultiplier instance from data.", | |
| "input": "data[1] (serialized data for B2)", | |
| "output": "RSRBinaryMultiplier instance", | |
| "location_or_namespace": "multipliers_np.RSRBinaryMultiplier" | |
| }, | |
| { | |
| "function_call_name": "RSRTernaryMultiplier.__init__", | |
| "functionality": "Initializes a new RSRTernaryMultiplier object.", | |
| "input": "None", | |
| "output": "RSRTernaryMultiplier instance", | |
| "location_or_namespace": "multipliers_np.RSRTernaryMultiplier" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRPlusPlusBinaryMultiplier._faster_mult", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "empty", | |
| "functionality": "Creates an uninitialized array for storing results of the optimized block product.", | |
| "input": "self.k (shape)", | |
| "output": "numpy.ndarray", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "range", | |
| "functionality": "Generates a sequence of numbers for iterative computation (loop for k to 1).", | |
| "input": "self.k (start), 0 (stop), -1 (step)", | |
| "output": "range object", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "sum", | |
| "functionality": "Calculates the sum of elements at odd indices of the segmented_sum array.", | |
| "input": "segmented_sum[1::2] (sliced array)", | |
| "output": "int or float", | |
| "location_or_namespace": "numpy" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRPlusPlusBinaryMultiplier.multiply", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "empty", | |
| "functionality": "Creates an uninitialized array for storing the final results of the multiplication.", | |
| "input": "self.m + self._padding (shape), dtype=int", | |
| "output": "numpy.ndarray", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "enumerate", | |
| "functionality": "Returns an enumerate object, yielding index-value pairs from an iterable.", | |
| "input": "self._blocks_permutations (list of (permutation, segment_indices) tuples)", | |
| "output": "enumerate object", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "empty", | |
| "functionality": "Creates an uninitialized array for segmented_sum.", | |
| "input": "2 ** self.k (shape)", | |
| "output": "numpy.ndarray (segmented_sum array)", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "cumsum", | |
| "functionality": "Computes the cumulative sum of array elements along a given axis.", | |
| "input": "permuted_vector", | |
| "output": "numpy.ndarray (cumulative sum array)", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "insert", | |
| "functionality": "Inserts values along the given axis before the given indices.", | |
| "input": "cumsum_arr (array), 0 (index), 0 (value)", | |
| "output": "numpy.ndarray (modified cumulative sum array)", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "len", | |
| "functionality": "Returns the length of the segment_indices list.", | |
| "input": "segment_indices", | |
| "output": "int (length)", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "len", | |
| "functionality": "Returns the length of the cumsum_arr array.", | |
| "input": "cumsum_arr", | |
| "output": "int (length)", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "_faster_mult", | |
| "functionality": "Implements an optimized way to compute the block product (segmented_sum . Bin_[k]) for RSR++.", | |
| "input": "segmented_sum", | |
| "output": "numpy.ndarray (block product result)", | |
| "location_or_namespace": "multipliers_np.RSRPlusPlusBinaryMultiplier" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "RSRPlusPlusTernaryMultiplier.__binary_multiplier_class__", | |
| "file_path": "multipliers_np.py", | |
| "function_calls": [] | |
| } | |
| ] |