Table of Contents

Class BinarySolverUtil

Namespace
Hi.Geom.Solvers
Assembly
HiGeom.dll

Utility class providing binary solving methods for one-dimensional functions.

public static class BinarySolverUtil
Inheritance
BinarySolverUtil
Inherited Members

Methods

CenterSplitionSolve(Func<double, double>, double, double, double, double, double, Func<double, bool>, int)

Solves for a target y-value using the center splitting method.

public static IEnumerable<BinarySolvingStatus> CenterSplitionSolve(Func<double, double> func, double x0, double y0, double x1, double yTarget, double convergenceLimit, Func<double, bool> isYAcceptableFunc, int maxIteration = 12)

Parameters

func Func<double, double>

The function to solve

x0 double

Initial x value

y0 double

Initial y value (func(x0))

x1 double

Second x value

yTarget double

Target y value to solve for

convergenceLimit double

Convergence limit (acceptable error)

isYAcceptableFunc Func<double, bool>

Function to determine if a y value is acceptable

maxIteration int

Maximum number of iterations

Returns

IEnumerable<BinarySolvingStatus>

A sequence of solving status objects showing the progress of the solution

CenterSplitionSolveWithY1(Func<double, double>, double, double, double, double, double, double, Func<double, bool>, int)

Solves for a target y-value using the center splitting method with a pre-calculated y1 value.

public static IEnumerable<BinarySolvingStatus> CenterSplitionSolveWithY1(Func<double, double> func, double x0, double y0, double x1, double y1, double yTarget, double convergenceLimit, Func<double, bool> isYAcceptableFunc, int maxIteration = 12)

Parameters

func Func<double, double>

The function to solve

x0 double

Initial x value

y0 double

Initial y value (func(x0))

x1 double

Second x value

y1 double

Second y value (func(x1))

yTarget double

Target y value to solve for

convergenceLimit double

Convergence limit (acceptable error)

isYAcceptableFunc Func<double, bool>

Function to determine if a y value is acceptable

maxIteration int

Maximum number of iterations

Returns

IEnumerable<BinarySolvingStatus>

A sequence of solving status objects showing the progress of the solution

SlopeSolve(Func<double, double>, double, double, double, double, double, int)

Solves for a target y-value using the slope method.

public static IEnumerable<BinarySolvingStatus> SlopeSolve(Func<double, double> func, double x0, double y0, double x1, double yTarget, double convergenceLimit, int maxIteration = 12)

Parameters

func Func<double, double>

The function to solve

x0 double

Initial x value

y0 double

Initial y value (func(x0))

x1 double

Second x value

yTarget double

Target y value to solve for

convergenceLimit double

Convergence limit (acceptable error)

maxIteration int

Maximum number of iterations

Returns

IEnumerable<BinarySolvingStatus>

A sequence of solving status objects showing the progress of the solution

SlopeSolveWithY1(Func<double, double>, double, double, double, double, double, double, int)

Solves for a target y-value using the slope method with a pre-calculated y1 value.

public static IEnumerable<BinarySolvingStatus> SlopeSolveWithY1(Func<double, double> func, double x0, double y0, double x1, double y1, double yTarget, double convergenceLimit, int maxIteration = 12)

Parameters

func Func<double, double>

The function to solve

x0 double

Initial x value

y0 double

Initial y value (func(x0))

x1 double

Second x value

y1 double

Second y value (func(x1))

yTarget double

Target y value to solve for

convergenceLimit double

Convergence limit (acceptable error)

maxIteration int

Maximum number of iterations

Returns

IEnumerable<BinarySolvingStatus>

A sequence of solving status objects showing the progress of the solution