335 lines
16 KiB
HTML
335 lines
16 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (version 1.7.0_51) on Wed Apr 06 13:11:04 EDT 2016 -->
|
|
<title>Root (Parallel Java 2 Library Documentation)</title>
|
|
<meta name="date" content="2016-04-06">
|
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="Root (Parallel Java 2 Library Documentation)";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar_top">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Root.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../edu/rit/numeric/RobustFit.html" title="class in edu.rit.numeric"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../edu/rit/numeric/RootBisection.html" title="class in edu.rit.numeric"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?edu/rit/numeric/Root.html" target="_top">Frames</a></li>
|
|
<li><a href="Root.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
|
<li><a href="#method_detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip-navbar_top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">edu.rit.numeric</div>
|
|
<h2 title="Class Root" class="title">Class Root</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>edu.rit.numeric.Root</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>Direct Known Subclasses:</dt>
|
|
<dd><a href="../../../edu/rit/numeric/RootBisection.html" title="class in edu.rit.numeric">RootBisection</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public abstract class <span class="strong">Root</span>
|
|
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
|
|
<div class="block">Class Root is the abstract base class for an object that finds roots of a
|
|
<a href="../../../edu/rit/numeric/Function.html" title="interface in edu.rit.numeric">Function</a>. Given a real-valued function of a real-valued variable
|
|
<I>f</I>(<I>x</I>), an instance of a subclass of class Root finds a value
|
|
<I>x</I> such that <I>f</I>(<I>x</I>) = 0.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><strong><a href="../../../edu/rit/numeric/Root.html#Root(edu.rit.numeric.Function)">Root</a></strong>(<a href="../../../edu/rit/numeric/Function.html" title="interface in edu.rit.numeric">Function</a> func)</code>
|
|
<div class="block">Construct a new object to find roots of the given function.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected abstract double</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Root.html#findRoot(edu.rit.numeric.Function, edu.rit.numeric.Bracket, double)">findRoot</a></strong>(<a href="../../../edu/rit/numeric/Function.html" title="interface in edu.rit.numeric">Function</a> func,
|
|
<a href="../../../edu/rit/numeric/Bracket.html" title="class in edu.rit.numeric">Bracket</a> brack,
|
|
double tol)</code>
|
|
<div class="block">Find a root of <TT>func.f()</TT> in the bracketing interval
|
|
<TT>brack.x1</TT> to <TT>brack.x2</TT> with tolerance <TT>tol</TT>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>double</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Root.html#root(edu.rit.numeric.Bracket)">root</a></strong>(<a href="../../../edu/rit/numeric/Bracket.html" title="class in edu.rit.numeric">Bracket</a> brack)</code>
|
|
<div class="block">Find a root of the function in the given bracketing interval.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>double</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/Root.html#root(edu.rit.numeric.Bracket, double)">root</a></strong>(<a href="../../../edu/rit/numeric/Bracket.html" title="class in edu.rit.numeric">Bracket</a> brack,
|
|
double tol)</code>
|
|
<div class="block">Find a root of the function in the given bracketing interval to the given
|
|
tolerance.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
|
|
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="Root(edu.rit.numeric.Function)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>Root</h4>
|
|
<pre>public Root(<a href="../../../edu/rit/numeric/Function.html" title="interface in edu.rit.numeric">Function</a> func)</pre>
|
|
<div class="block">Construct a new object to find roots of the given function.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>func</code> - Function.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>func</TT> is null.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="root(edu.rit.numeric.Bracket)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>root</h4>
|
|
<pre>public final double root(<a href="../../../edu/rit/numeric/Bracket.html" title="class in edu.rit.numeric">Bracket</a> brack)</pre>
|
|
<div class="block">Find a root of the function in the given bracketing interval. The
|
|
<TT>root()</TT> method calls the <TT>brack.bracket()</TT> method to find
|
|
the bracketing interval; typically <TT>brack</TT> is a newly constructed
|
|
instance of a subclass of class <a href="../../../edu/rit/numeric/Bracket.html" title="class in edu.rit.numeric">Bracket</a>. A tolerance of
|
|
<I>ε</I>(|<I>x</I><SUB>1</SUB>| + |<I>x</I><SUB>2</SUB>|)/2
|
|
is used, where <I>ε</I> is the machine precision and the
|
|
bracketing interval is <I>x</I><SUB>1</SUB> to <I>x</I><SUB>2</SUB>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>brack</code> - Bracketing interval object.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Root of <TT>func.f</TT>(<I>x</I>).</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="root(edu.rit.numeric.Bracket, double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>root</h4>
|
|
<pre>public final double root(<a href="../../../edu/rit/numeric/Bracket.html" title="class in edu.rit.numeric">Bracket</a> brack,
|
|
double tol)</pre>
|
|
<div class="block">Find a root of the function in the given bracketing interval to the given
|
|
tolerance. The <TT>root()</TT> method calls the <TT>brack.bracket()</TT>
|
|
method to find the bracketing interval; typically <TT>brack</TT> is a
|
|
newly constructed instance of a subclass of class <a href="../../../edu/rit/numeric/Bracket.html" title="class in edu.rit.numeric">Bracket</a>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>brack</code> - Bracketing interval object.</dd><dd><code>tol</code> - Tolerance.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Root of <TT>func.f</TT>(<I>x</I>).</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - (unchecked exception) Thrown if <TT>tol</TT> ≤ 0.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="findRoot(edu.rit.numeric.Function, edu.rit.numeric.Bracket, double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>findRoot</h4>
|
|
<pre>protected abstract double findRoot(<a href="../../../edu/rit/numeric/Function.html" title="interface in edu.rit.numeric">Function</a> func,
|
|
<a href="../../../edu/rit/numeric/Bracket.html" title="class in edu.rit.numeric">Bracket</a> brack,
|
|
double tol)</pre>
|
|
<div class="block">Find a root of <TT>func.f()</TT> in the bracketing interval
|
|
<TT>brack.x1</TT> to <TT>brack.x2</TT> with tolerance <TT>tol</TT>.
|
|
Function values at the bracketing interval endpoints are
|
|
<TT>brack.f_x1</TT> and <TT>brack.f_x2</TT>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>func</code> - Function.</dd><dd><code>brack</code> - Bracketing interval object.</dd><dd><code>tol</code> - Tolerance.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Root of <TT>func.f</TT>(<I>x</I>).</dd></dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar_bottom">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Root.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../edu/rit/numeric/RobustFit.html" title="class in edu.rit.numeric"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../edu/rit/numeric/RootBisection.html" title="class in edu.rit.numeric"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?edu/rit/numeric/Root.html" target="_top">Frames</a></li>
|
|
<li><a href="Root.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
|
<li><a href="#method_detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip-navbar_bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small><FONT SIZE="-2">Copyright © 2013–2016 by Alan Kaminsky. All rights reserved. Send comments to ark</FONT><FONT SIZE="1" COLOR="#FFFFFF">­</FONT><FONT SIZE="-2">@</FONT><FONT SIZE="1" COLOR="#FFFFFF">­</FONT><FONT SIZE="-2">cs.rit.edu.</FONT></small></p>
|
|
</body>
|
|
</html>
|