tune
This commit is contained in:
@@ -153,6 +153,158 @@ Class BinarySolverUtil
|
||||
</h2>
|
||||
|
||||
|
||||
<a id="Hi_Geom_Solvers_BinarySolverUtil_CenterSplitionSolve_" data-uid="Hi.Geom.Solvers.BinarySolverUtil.CenterSplitionSolve*"></a>
|
||||
|
||||
<h3 id="Hi_Geom_Solvers_BinarySolverUtil_CenterSplitionSolve_System_Func_System_Double_System_Double__Hi_Common_Range_System_Double__Hi_Geom_Vec2d_System_Double_System_Double_System_Func_System_Double_System_Boolean__System_Int32_" data-uid="Hi.Geom.Solvers.BinarySolverUtil.CenterSplitionSolve(System.Func{System.Double,System.Double},Hi.Common.Range{System.Double},Hi.Geom.Vec2d,System.Double,System.Double,System.Func{System.Double,System.Boolean},System.Int32)">
|
||||
CenterSplitionSolve(Func<double, double>, Range<double>, Vec2d, double, double, Func<double, bool>, int)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Efficient center splitting solve that uses an initial point (x0, y0) within the boundary to save one function evaluation.
|
||||
The algorithm intelligently chooses the optimal boundary points based on the initial point position.</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static IEnumerable<BinarySolvingStatus> CenterSplitionSolve(Func<double, double> func, Range<double> xBoundary, Vec2d x0y0, double yTarget, double convergenceLimit, Func<double, bool> isYAcceptableFunc, int maxIteration = 12)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>func</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>></dt>
|
||||
<dd><p>The function to solve</p>
|
||||
</dd>
|
||||
<dt><code>xBoundary</code> <a class="xref" href="Hi.Common.Range-1.html">Range</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>></dt>
|
||||
<dd><p>boundary of the search interval. The order of Min and Max is not mattered, i.e. they can be reversed.</p>
|
||||
</dd>
|
||||
<dt><code>x0y0</code> <a class="xref" href="Hi.Geom.Vec2d.html">Vec2d</a></dt>
|
||||
<dd><p>Initial x,y value (x0,func(x0))</p>
|
||||
</dd>
|
||||
<dt><code>yTarget</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd><p>Target y value to solve for</p>
|
||||
</dd>
|
||||
<dt><code>convergenceLimit</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd><p>Convergence limit (acceptable error)</p>
|
||||
</dd>
|
||||
<dt><code>isYAcceptableFunc</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>></dt>
|
||||
<dd><p>Function to determine if a y value is acceptable</p>
|
||||
</dd>
|
||||
<dt><code>maxIteration</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
||||
<dd><p>Maximum number of iterations</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><<a class="xref" href="Hi.Geom.Solvers.BinarySolvingStatus.html">BinarySolvingStatus</a>></dt>
|
||||
<dd><p>A sequence of solving status objects showing the progress of the solution</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a id="Hi_Geom_Solvers_BinarySolverUtil_CenterSplitionSolve_" data-uid="Hi.Geom.Solvers.BinarySolverUtil.CenterSplitionSolve*"></a>
|
||||
|
||||
<h3 id="Hi_Geom_Solvers_BinarySolverUtil_CenterSplitionSolve_System_Func_System_Double_System_Double__Hi_Common_Range_System_Double__System_Double_System_Double_System_Double_System_Func_System_Double_System_Boolean__System_Int32_" data-uid="Hi.Geom.Solvers.BinarySolverUtil.CenterSplitionSolve(System.Func{System.Double,System.Double},Hi.Common.Range{System.Double},System.Double,System.Double,System.Double,System.Func{System.Double,System.Boolean},System.Int32)">
|
||||
CenterSplitionSolve(Func<double, double>, Range<double>, double, double, double, Func<double, bool>, int)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"></div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static IEnumerable<BinarySolvingStatus> CenterSplitionSolve(Func<double, double> func, Range<double> xBoundary, double x0, double yTarget, double convergenceLimit, Func<double, bool> isYAcceptableFunc, int maxIteration = 12)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>func</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>></dt>
|
||||
<dd></dd>
|
||||
<dt><code>xBoundary</code> <a class="xref" href="Hi.Common.Range-1.html">Range</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>></dt>
|
||||
<dd></dd>
|
||||
<dt><code>x0</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd></dd>
|
||||
<dt><code>yTarget</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd></dd>
|
||||
<dt><code>convergenceLimit</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd></dd>
|
||||
<dt><code>isYAcceptableFunc</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>></dt>
|
||||
<dd></dd>
|
||||
<dt><code>maxIteration</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><<a class="xref" href="Hi.Geom.Solvers.BinarySolvingStatus.html">BinarySolvingStatus</a>></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a id="Hi_Geom_Solvers_BinarySolverUtil_CenterSplitionSolve_" data-uid="Hi.Geom.Solvers.BinarySolverUtil.CenterSplitionSolve*"></a>
|
||||
|
||||
<h3 id="Hi_Geom_Solvers_BinarySolverUtil_CenterSplitionSolve_System_Func_System_Double_System_Double__Hi_Common_Range_System_Double__System_Double_System_Double_System_Func_System_Double_System_Boolean__System_Int32_" data-uid="Hi.Geom.Solvers.BinarySolverUtil.CenterSplitionSolve(System.Func{System.Double,System.Double},Hi.Common.Range{System.Double},System.Double,System.Double,System.Func{System.Double,System.Boolean},System.Int32)">
|
||||
CenterSplitionSolve(Func<double, double>, Range<double>, double, double, Func<double, bool>, int)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"></div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static IEnumerable<BinarySolvingStatus> CenterSplitionSolve(Func<double, double> func, Range<double> xBoundary, double yTarget, double convergenceLimit, Func<double, bool> isYAcceptableFunc, int maxIteration = 12)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>func</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>></dt>
|
||||
<dd></dd>
|
||||
<dt><code>xBoundary</code> <a class="xref" href="Hi.Common.Range-1.html">Range</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>></dt>
|
||||
<dd></dd>
|
||||
<dt><code>yTarget</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd></dd>
|
||||
<dt><code>convergenceLimit</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd></dd>
|
||||
<dt><code>isYAcceptableFunc</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>></dt>
|
||||
<dd></dd>
|
||||
<dt><code>maxIteration</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><<a class="xref" href="Hi.Geom.Solvers.BinarySolvingStatus.html">BinarySolvingStatus</a>></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a id="Hi_Geom_Solvers_BinarySolverUtil_CenterSplitionSolve_" data-uid="Hi.Geom.Solvers.BinarySolverUtil.CenterSplitionSolve*"></a>
|
||||
|
||||
<h3 id="Hi_Geom_Solvers_BinarySolverUtil_CenterSplitionSolve_System_Func_System_Double_System_Double__System_Double_System_Double_System_Double_System_Double_System_Double_System_Func_System_Double_System_Boolean__System_Int32_" data-uid="Hi.Geom.Solvers.BinarySolverUtil.CenterSplitionSolve(System.Func{System.Double,System.Double},System.Double,System.Double,System.Double,System.Double,System.Double,System.Func{System.Double,System.Boolean},System.Int32)">
|
||||
@@ -165,7 +317,7 @@ Class BinarySolverUtil
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">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)</code></pre>
|
||||
<pre><code class="lang-csharp hljs">public static IEnumerable<BinarySolvingStatus> CenterSplitionSolve(Func<double, double> func, double x0, double y0, double xBoundary, double yTarget, double convergenceLimit, Func<double, bool> isYAcceptableFunc, int maxIteration = 12)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
@@ -179,8 +331,8 @@ Class BinarySolverUtil
|
||||
<dt><code>y0</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd><p>Initial y value (func(x0))</p>
|
||||
</dd>
|
||||
<dt><code>x1</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd><p>Second x value</p>
|
||||
<dt><code>xBoundary</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd><p>extended side boundary</p>
|
||||
</dd>
|
||||
<dt><code>yTarget</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd><p>Target y value to solve for</p>
|
||||
|
||||
Reference in New Issue
Block a user