openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Public Member Functions | List of all members
Bisect Class Reference

#include <bench_utils.h>

Collaboration diagram for Bisect:

Public Member Functions

 Bisect (float min, float max, float tol=0.01)
 object for performing a bisection search More...
 
bool update (float &val, bool success)
 update search More...
 
float current ()
 

Detailed Description

perform a bisection, finding the minimum threshold which triggers a successful response

Definition at line 27 of file bench_utils.h.

Constructor & Destructor Documentation

◆ Bisect()

Bisect::Bisect ( float  min,
float  max,
float  tol = 0.01 
)
inline

object for performing a bisection search

Parameters
minminimum of range to search
maxmaximum of range, can be INFINITY
tolrelative change in threshold to stop

Definition at line 37 of file bench_utils.h.

Member Function Documentation

◆ current()

float Bisect::current ( )
inline

Definition at line 59 of file bench_utils.h.

◆ update()

bool Bisect::update ( float &  val,
bool  success 
)
inline

update search

Parameters
[in,out]valvalue tried
success[in]whether a suprathreshold event occurred
Returns
whether the threshold was found within the tolerance
Postcondition
val is updated to the next value to try

Definition at line 47 of file bench_utils.h.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: