Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cornell-zhang/heurigym
/ functions
Functions
245 in github.com/cornell-zhang/heurigym
⨍
Functions
245
◇
Types & classes
38
↓ 43 callers
Method
x
global_routing/program/evaluator.cpp:45
↓ 43 callers
Method
y
global_routing/program/evaluator.cpp:46
↓ 37 callers
Method
z
global_routing/program/evaluator.cpp:84
↓ 9 callers
Method
num_gridx
global_routing/program/evaluator.cpp:226
↓ 8 callers
Method
num_gridy
global_routing/program/evaluator.cpp:227
↓ 8 callers
Method
num_layer
global_routing/program/evaluator.cpp:228
↓ 7 callers
Method
idx
global_routing/program/evaluator.cpp:112
↓ 6 callers
Method
extend
(self, items)
egraph_extraction/baseline/greedy_baseline.py:105
↓ 6 callers
Method
insert
(self, item)
egraph_extraction/baseline/greedy_baseline.py:100
↓ 5 callers
Method
update
global_routing/program/evaluator.cpp:58
↓ 4 callers
Method
capacity
global_routing/program/evaluator.cpp:135
↓ 4 callers
Function
read_instance
Read DataA.csv and return an :class:`Instance`. The CSV must contain at least the columns documented in the README. Pay-rate columns (`DutyCo
crew_pairing/program/utils.py:73
↓ 3 callers
Method
_get_provider
Get the provider name from a model identifier.
llm_solver_agent.py:447
↓ 3 callers
Method
demand
global_routing/program/evaluator.cpp:133
↓ 3 callers
Method
is_hor
global_routing/program/evaluator.cpp:152
↓ 3 callers
Method
is_routing_layer
global_routing/program/evaluator.cpp:151
↓ 3 callers
Method
is_ver
global_routing/program/evaluator.cpp:153
↓ 2 callers
Method
_get_base_model_name
Extracts the base model name from a model identifier for file paths.
llm_solver_agent.py:488
↓ 2 callers
Function
_parse_datetime
Convert separate date+time strings into a naive datetime object.
crew_pairing/program/utils.py:68
↓ 2 callers
Function
calculate_distance
(x1: float, y1: float, x2: float, y2: float)
pickup_delivery_time_windows/program/utils.py:112
↓ 2 callers
Function
calculate_solve_at_i
Calculate solve@i metrics for the first i iterations.
scripts/collect_results.py:210
↓ 2 callers
Function
evaluate
Compute the total cost of a crew-pairing solution. Parameters ---------- input_file : str Path to **DataA.csv** (instance file).
crew_pairing/program/evaluator.py:36
↓ 2 callers
Function
find_iteration_dirs
Find all iteration directories and their sample subdirectories.
scripts/collect_results.py:28
↓ 2 callers
Method
from_dict
(self, input_dict)
egraph_extraction/baseline/egraph_data.py:74
↓ 2 callers
Function
get_allele_maps_0_indexed
Builds two maps for 0-indexed domain IDs: 1. id_to_genotype: 0-idx ID -> frozenset({allele1, allele2}) 2. genotype_to_id: frozenset({alle
pedigree/program/utils.py:24
↓ 2 callers
Function
get_n_alleles_from_sources
Determines the number of unique alleles (n_alleles). It considers the maximum allele value explicitly observed (e.g., if allele '4' is seen,
pedigree/program/utils.py:1
↓ 2 callers
Method
init
global_routing/program/evaluator.cpp:195
↓ 2 callers
Method
map_resource_type
Map resource type to internal representation
operator_scheduling/baseline/ilp.py:117
↓ 2 callers
Function
parse_json
Parse the JSON file and build the graph. Returns: A tuple of: - Dictionary mapping node IDs to Node objects - Dictionary
operator_scheduling/program/utils.py:23
↓ 2 callers
Function
parse_schedule
Parse the schedule file. Returns: Dictionary mapping node IDs to their scheduled start times
operator_scheduling/program/utils.py:71
↓ 2 callers
Method
pop
(self)
egraph_extraction/baseline/greedy_baseline.py:109
↓ 2 callers
Function
read_instance
(file_path: str)
pickup_delivery_time_windows/program/utils.py:31
↓ 2 callers
Method
set_x
global_routing/program/evaluator.cpp:47
↓ 2 callers
Method
set_y
global_routing/program/evaluator.cpp:48
↓ 2 callers
Method
topological_sort_dfs
Perform topological sorting using DFS and set ASAP/ALAP times
operator_scheduling/baseline/ilp.py:65
↓ 2 callers
Method
unit_via_cost
global_routing/program/evaluator.cpp:159
↓ 1 callers
Function
_build_aux
Pre-compute helper maps for fast constraint checks.
egraph_extraction/program/verifier.py:47
↓ 1 callers
Method
_calculate_alap_times
Calculate As Late As Possible (ALAP) times
operator_scheduling/baseline/ilp.py:105
↓ 1 callers
Method
_calculate_asap_times
Calculate As Soon As Possible (ASAP) times
operator_scheduling/baseline/ilp.py:93
↓ 1 callers
Function
_check_abc_available
Raise RuntimeError if `abc` binary is not on PATH.
technology_mapping/baseline/run_abc.py:88
↓ 1 callers
Function
_check_abc_available
Raise RuntimeError if `abc` binary is not on PATH.
technology_mapping/program/verifier.py:138
↓ 1 callers
Function
_check_lut_size
Check if the candidate BLIF file satisfies the LUT size constraint. Args: candidate: Path to the candidate BLIF file max
technology_mapping/program/verifier.py:81
↓ 1 callers
Method
_cycle_dfs
(self, egraph_enodes, class_id, status, cycles)
egraph_extraction/baseline/greedy_baseline.py:136
↓ 1 callers
Method
_depth_first_search
Helper function for DFS traversal
operator_scheduling/baseline/ilp.py:81
↓ 1 callers
Method
_format_problem_info
Formats the problem information section for the prompt.
llm_solver_agent.py:532
↓ 1 callers
Method
_get_actual_model_name
Get the actual model name to use with the API.
llm_solver_agent.py:475
↓ 1 callers
Method
_get_default_template
Returns a default prompt template if prompt.md is not found.
llm_solver_agent.py:528
↓ 1 callers
Method
_get_example_program
Gets an example program template for the problem.
llm_solver_agent.py:547
↓ 1 callers
Function
_get_nodes_via_abc
Run ABC `ps` and return the LUT count (nodes).
technology_mapping/baseline/run_abc.py:135
↓ 1 callers
Function
_get_nodes_via_abc
Run ABC `ps` and return the LUT count (nodes).
technology_mapping/program/evaluator.py:47
↓ 1 callers
Function
_has_cycle
()
egraph_extraction/program/verifier.py:108
↓ 1 callers
Method
_load_prompt_template
Loads the prompt template from prompt.md.
llm_solver_agent.py:518
↓ 1 callers
Method
_parse_reasoning_effort
Parse the reasoning_effort from the model name if specified.
llm_solver_agent.py:506
↓ 1 callers
Function
_parse_schedule
Read the solver output file. Each non-blank, non-comment line represents **one pairing** and contains the space-separated list of leg tokens
crew_pairing/program/evaluator.py:15
↓ 1 callers
Function
_parse_schedule
Read schedule file → list of pairings (each is list of leg tokens).
crew_pairing/program/verifier.py:14
↓ 1 callers
Function
_run_cec
Run `cec` in ABC and return the CompletedProcess.
technology_mapping/baseline/run_abc.py:97
↓ 1 callers
Function
_run_cec
Run `cec` in ABC and return the CompletedProcess.
technology_mapping/program/verifier.py:148
↓ 1 callers
Method
_save_api_info_to_json
Saves API information to a JSON file.
llm_solver_agent.py:683
↓ 1 callers
Method
add_access
global_routing/program/evaluator.cpp:97
↓ 1 callers
Method
add_in_node
(self, in_node)
egraph_extraction/baseline/egraph_data.py:37
↓ 1 callers
Function
build_candidate_pairings
Build candidate pairings more efficiently with iterative approach and pruning. Uses a breadth-first approach with aggressive pruning to avoid
crew_pairing/baseline/baseline.py:127
↓ 1 callers
Function
build_graph
Builds the graph G for the min-cut problem.
protein_sequence_design/baseline/min_cut_baseline.py:128
↓ 1 callers
Function
build_pairings
(instance_csv: Path)
crew_pairing/baseline/baseline.py:271
↓ 1 callers
Function
calculate_cost
Calculate the cost for a given model and token usage.
config.py:118
↓ 1 callers
Method
calculate_cost_set
(self, node, costs, cost_of_node, egraph_enodes, best_cost)
egraph_extraction/baseline/greedy_baseline.py:20
↓ 1 callers
Function
calculate_distances
Calculates pairwise distances between residues.
protein_sequence_design/baseline/min_cut_baseline.py:78
↓ 1 callers
Function
calculate_geomean
Calculate geometric mean, coverage, and QCI for an iteration's results using baseline values.
scripts/collect_results.py:175
↓ 1 callers
Function
calculate_percentage_agreement
Calculates the percentage agreement between two sequences.
protein_sequence_design/baseline/min_cut_baseline.py:69
↓ 1 callers
Function
calculate_sasa
Calculates SASA using Bio.PDB.SASA.ShrakeRupley. Args: structure (Bio.PDB.Structure): The parsed PDB structure object. re
protein_sequence_design/baseline/min_cut_baseline.py:94
↓ 1 callers
Method
cell_height
global_routing/program/evaluator.cpp:236
↓ 1 callers
Method
cell_width
global_routing/program/evaluator.cpp:235
↓ 1 callers
Function
check_usage_legal
(problem: Problem, solution: Solution)
intra_op_parallel/program/verifier.py:139
↓ 1 callers
Method
choose
(self, class_id, node_id)
egraph_extraction/baseline/greedy_baseline.py:126
↓ 1 callers
Function
classify_error
Classify error message into operator scheduling specific categories.
scripts/collect_results.py:65
↓ 1 callers
Function
copy_run_to_iterations
(llm_solutions_dir)
scripts/copy_run.py:5
↓ 1 callers
Method
dag_cost
(self, egraph_enodes, roots, cost, quad_cost=None)
egraph_extraction/baseline/greedy_baseline.py:160
↓ 1 callers
Function
default_paths
Return (input_csv, output_txt) based on repo layout.
crew_pairing/baseline/baseline.py:64
↓ 1 callers
Function
dfs
(u: str)
egraph_extraction/program/verifier.py:112
↓ 1 callers
Function
evaluate
(input_file: str, output_file: str)
pedigree/program/evaluator.py:4
↓ 1 callers
Function
evaluate
Cost calculation function: calculates the cost. Args: input_file: Path to the input file solution_file: Path to the outp
technology_mapping/baseline/run_abc.py:116
↓ 1 callers
Function
evaluate
Cost calculation function: calculates the cost. Suppose the input has been verified by the verifier, which means the input to this function i
technology_mapping/program/evaluator.py:22
↓ 1 callers
Function
evaluate
Cost calculation function: calculates the solution cost. Args: input_file: Path to the input file containing the instance solutio
pickup_delivery_time_windows/program/evaluator.py:5
↓ 1 callers
Function
evaluate
Evaluate the solution for a given input file and output file. Args: input_file (str): Path to the input file. output_fil
intra_op_parallel/program/evaluator.py:4
↓ 1 callers
Function
evaluate
Sum the 'cost' field of every selected node that actually exists.
egraph_extraction/program/evaluator.py:16
↓ 1 callers
Function
evaluate
Run heurigym evaluator and return the total cost.
global_routing/baseline/run_baseline.py:43
↓ 1 callers
Function
evaluate
Cost calculation function: calculates the cost. Suppose the input has been verified by the verifier, which means the input to this function i
global_routing/program/evaluator.py:6
↓ 1 callers
Method
execute_program
Runs the Python program and returns success status and output.
llm_solver_agent.py:169
↓ 1 callers
Method
extract
int index for elcass id and enode id
egraph_extraction/baseline/greedy_baseline.py:51
↓ 1 callers
Function
extract_errors
Extract error information from .cost files in the iteration directory.
scripts/collect_results.py:83
↓ 1 callers
Function
find_all_datasets
Find all potential datasets under the given base directory and group them by base name. Args: base_dir (str): Base directory to sear
scripts/run.py:7
↓ 1 callers
Method
find_cycles
(self, egraph_enodes, roots)
egraph_extraction/baseline/greedy_baseline.py:129
↓ 1 callers
Function
find_result_files
Find all .result files in the given directory.
scripts/plot.py:51
↓ 1 callers
Function
find_run_files
Find all run.py files in iteration directories and their sample subdirectories.
scripts/collect_results.py:115
↓ 1 callers
Method
format_prompt
Formats the problem description into a prompt for the LLM.
llm_solver_agent.py:564
↓ 1 callers
Method
from_json
Create a Graph instance from a JSON file. Args: json_file: Path to the JSON file constrained_latency: Optiona
operator_scheduling/baseline/ilp.py:31
↓ 1 callers
Method
from_json_file
(self, json_file)
egraph_extraction/baseline/egraph_data.py:153
↓ 1 callers
Function
g_function
Sigmoidal function g(d_ij) from the paper.
protein_sequence_design/baseline/min_cut_baseline.py:89
↓ 1 callers
Function
generate_latency_plot
Generate a bar chart for latency comparison.
scripts/plot.py:59
↓ 1 callers
Method
generate_resource_constrained_ilp
Generate ILP for resource-constrained problems
operator_scheduling/baseline/ilp.py:197
↓ 1 callers
Function
generate_summary_table
Generate a formatted summary table comparing all models' performance.
llm_solver_agent.py:1064
next →
1–100 of 245, ranked by callers