ivcurves 1.0 documentation

  • Scoreboard
  • Test Cases
  • How to Participate
  • Submissions
  • Documentation
  • Compare Curves
    • ivcurves.compare_curves._find_x_intersection
    • ivcurves.compare_curves._find_distance
    • ivcurves.compare_curves.score_curve
    • ivcurves.compare_curves.score_parameters
    • ivcurves.compare_curves.calc_precise_curve
    • ivcurves.compare_curves._get_test_sets_to_score
    • ivcurves.compare_curves.write_test_set_score_per_curve_csvs
    • ivcurves.compare_curves.write_overall_scores_csv
  • Precise
    • ivcurves.precise.max_power_pt_finder
    • ivcurves.precise.golden_search
    • ivcurves.precise.lambert_i_from_v
    • ivcurves.precise.lambert_v_from_i
    • ivcurves.precise.diff_lhs_rhs
    • ivcurves.precise.get_precise_i
    • ivcurves.precise.build_precise_json
  • Utils
    • ivcurves.utils.set_globals
    • ivcurves.utils.constants
    • ivcurves.utils.mp_num_digits_left_of_decimal
    • ivcurves.utils.mp_nstr_precision_func
    • ivcurves.utils.read_iv_curve_parameter_sets
    • ivcurves.utils.make_iv_curve_name
    • ivcurves.utils.get_filenames_in_directory
    • ivcurves.utils.load_json
    • ivcurves.utils.save_json
  • Plots
    • ivcurves.plots.plot_precise_iv_curves
    • ivcurves.plots.scoring_visualization
  • GitHub Workflows
    • Score Submission
    • Record Scores
    • Update Scores
    • Pytest
    • Utility Python Scripts
      • Print JSON as ENV
        • workflows.utils.print_json_as_env.validate_pr_config
        • workflows.utils.print_json_as_env.format_bool_variables
        • workflows.utils.print_json_as_env.format_path_variables
        • workflows.utils.print_json_as_env.format_variable_values
        • workflows.utils.print_json_as_env.print_json_as_env
      • Record Scores
        • workflows.utils.record_scores.load_overall_scores
        • workflows.utils.record_scores.validate_overall_scores
        • workflows.utils.record_scores.write_overall_scores_to_database

ivcurves.precise.golden_search#

ivcurves.precise.golden_search(a, b, func, atol, max_iters)#

Finds a local maximizer of a function on an interval \([a, b]\) with at most atol error using golden-section serach.

Parameters:
  • a (float) – Left endpoint of interval.

  • b (float) – Right endpoint of interval.

  • func (function) – Single-variable function to maximize.

  • atol (float) – The absolute tolerance between the true and calculated maximizer.

  • max_iters (int) – Maximum number of iterations golden-section search before failing.

Returns:

The calculated maximizer.

Return type:

float

Notes

For more information on the algorithm, see http://www.math.kent.edu/~reichel/courses/intr.num.comp.2/lecture16/lecture8.pdf.

previous

ivcurves.precise.max_power_pt_finder

next

ivcurves.precise.lambert_i_from_v

© Copyright 2022, ivcurves Development Team.

Created using Sphinx 5.0.2.