Skip to content

Commit

Permalink
Update root1d doc to 0.5.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris00 committed Sep 7, 2018
1 parent 115706e commit 37fa0f3
Show file tree
Hide file tree
Showing 5 changed files with 280 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>index</title>
<link rel="stylesheet" href="./odoc.css"/>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
</head>
<body>
<div class="by-name">
<h2>OCaml package documentation</h2>
<ol>
<li><a href="root1d/index.html">root1d</a> <span class="version">0.5.1</span></li>
</ol>
</div>
</body>
</html>
234 changes: 234 additions & 0 deletions doc/odoc.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
@charset "UTF-8";
/* Copyright (c) 2016 Daniel C. Bünzli. All rights reserved.
Distributed under the ISC license, see terms at the end of the file.
odoc 1.2.0 */

/* Reset a few things. */

html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,
a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,
small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,
fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,
article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,
menu,nav,output,ruby,section,summary,time,mark,audio,video
{ margin:0; padding:0; border:0; /* outline: 0; */
font-size:100%; font: inherit; line-height:inherit; vertical-align:baseline;
text-align: inherit; color: inherit; background: transparent; }

table { border-collapse: collapse; border-spacing: 0; }
*, *:before, *:after { box-sizing: border-box; }

body
{ font-family: Helvetica, "DejaVu Sans", Arial, sans-serif;
font-weight: normal;
font-size: 0.875rem;
line-height:1.25rem;
text-align: left;
min-width: 40ex;
max-width: 78ex;
padding: 1.25rem;
margin-left: 3.75rem;
color: #222; background: #FAFAFA; }

/* Basic markup elements */

b, strong { font-weight: bold; }
em { font-style: italic; }

sup { vertical-align: super; }
sub { vertical-align: sub; }
sup, sub { font-size : 0.75rem; line-height: 0; margin-left: 0.2ex; }

p, div, img { margin-top: 1.25rem; }

ul, ol
{ margin-top: 0.625rem; margin-bottom: 0.625rem; list-style-position: outside }

ul { list-style-type: square }
ul > li { margin-left: 1.375rem; }
ol > li { margin-left: 1.7rem; }
li > *:first-child { margin-top: 0 }

/* Text alignements, this should be forbidden. */

.left { text-align: left; }
.right { text-align: right; }
.center { text-align: center; }

/* Links and anchors */

a { text-decoration:none; color:#2C5CBD; }
a:hover { box-shadow:0 1px 0 0 #2C5CBD; }
*:target /* Linked highlight */
{ background-color: #FFF8E5;
box-shadow: 0 0 0 2px #FFF8E5, 0 0 0 3px #DDD; }

.spec:hover > a.anchor, /* FIXME remove */
.anchored:hover a.anchor { visibility: visible; }

a.anchor:before { content: "#" }
a.anchor:hover { box-shadow: none; text-decoration: underline }
a.anchor
{ visibility: hidden; position: absolute; /* top: 0px; */
margin-left: -3ex;
font-weight: normal;
font-style: normal;
padding-right: 1ex; padding-left: 1ex; /* To remain selectable */
color: #AAA; }

.xref-unresolved { box-shadow:0 1px 0 0 red }

/* Section and document divisions.
Until at least 4.03 many of the modules of the stdlib start at .h7,
we restart the sequence there like h2 */

h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10
{ font-weight: bold; margin-top: 1.25rem; }

h1 + *, h2 + *, .h7 + * { margin-top: 0.625rem; }
h1, h2, .h7
{ font-size: 1.25rem;
line-height: 2.4375rem; /* 2.5rem - border width */
padding-top: 0.625rem;
border-top: solid;
border-width: 1px;
border-color: #DDD; }

h3, .h8 { font-size: 1.125rem; }
h2 + h3, .h7 + .h8 { margin-top: 0.625rem; }

/* Preformatted and code */

tt, code, pre
{ font-family: Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono",
monospace;
font-weight: normal;
font-size: 0.75rem; }

pre
{ padding-left: 0.25rem; padding-right: 0.25rem;
margin-left: -0.25rem; margin-right: -0.25rem;
padding-top: 0.3125rem; padding-bottom: 0.3125rem;
margin-top: 1.25rem; /* margin-bottom: 0.625rem; */
line-height: 1.1875rem;
background: #F1F1F1; }

h1 tt, h1 code, h2 tt, h2 code, .h7 tt, .h7 code { font-size: 1.125rem }
h3 tt, h3 code { font-size: 1rem }

/* Code lexemes */

.keyword { font-weight: bold; }

/* Module member specification */

div.def { margin-top: 0rem; text-indent: -2ex; padding-left: 2ex; }
div.def + div.doc { margin-left: 1ex; margin-top: 0.15625rem }
div.doc > *:first-child { margin-top: 0rem; }

/* Collapsible inlined include and module */

details
{ border-radius: 0.5rem;
border-left: 0.2rem solid;
border-color: #FAFAFA /* Background */;
margin-left: -1.5rem;
padding-left: 1.3rem;
padding-bottom: 0.625rem; }

details[open] { border-color: #AAA; }

/* Records and variants FIXME */

div.def table { text-indent: 0em; padding:0; margin-left: -2ex; }
td.def { padding-right: 2ex }
.record td.def { padding-left:2ex; }
td.doc *:first-child { margin-top: 0em }

/* @ tags */

ul.at-tag { list-style-type: none; margin-left: 0; padding: 0; }
ul.at-tag li { margin-left:0; padding:0; }
ul.at-tag li p:first-child { margin-top: 0 } /* FIXME remove */
span.at-tag { font-weight: bold }
.at-tag.deprecated { font-weight: normal; color: crimson }
.at-tag.raise { font-weight: bold; }

/* FIXME random other things to review. */

.heading
{ margin-top: 0.625rem;
border-top: solid;
border-width: 1px;
border-color: #DDD;
text-align: right;
font-weight: normal;
font-style: italic; }

.heading + .sig { margin-top: -1.25rem; }
.heading + .parameters { margin-top: -1.25rem; }

/* Odig package index */

.by-name ol, .by-tag ol, .errors ol { list-style-type: none; margin-left:0; }
.by-name ol ol, .by-tag ol ol { margin-top:0; margin-bottom: 0 }
.by-name li, .by-tag li, .errors li { margin-left:0; }

.by-name .version { font-size: 0.625rem; color: #AAA }
.by-name nav { margin-bottom: 0.625rem }
.by-name nav a
{ text-transform: uppercase; font-size: 1.125rem;
margin-right:1ex; color: #222; display: inline-block; }

.by-tag nav a { margin-right:1ex; color: #222; display: inline-block; }
.by-tag > ol > li { margin-top: 0.625rem; }
.by-tag > ol > li > span,
.by-tag > ol > li > ol,
.by-tag > ol > li > ol > li { display: inline-block; margin-right: 1ex; }

/* Odig package page */

.package nav { display: inline; font-size: 0.875rem; font-weight: normal; }
.package .version { font-size: 0.875rem; }

h1 + .modules, h1 + .sel { margin-top: 0.625rem }
.sel { font-weight: normal; font-style: italic;
font-size:0.875rem; margin-top:1.25rem; }
.sel + .modules { margin-top:0.625rem;
margin-bottom: 1.25rem; margin-left: 1ex; }

.modules { margin:0; }
.modules .module { min-width:8ex; padding-right: 2ex }

.package.info { margin: 0;}
.package.info td:first-child { font-style: italic; padding-right: 2ex; }
.package.info ul { list-style-type: none; display: inline; margin:0; }
.package.info li { display: inline-block; margin:0; margin-right:1ex; }
#info-authors li, #info-maintainers li { display:block; }

/* Mobile adjustements. */

@media only screen and (max-width: 78ex)
{ body { margin: auto; } }

/* Print adjustements. */

@media print
{ body { color: black; background: white; }
body nav:first-child { visibility: hidden; }}

/*---------------------------------------------------------------------------
Copyright (c) 2016 Daniel C. Bünzli
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---------------------------------------------------------------------------*/
Empty file.
25 changes: 25 additions & 0 deletions doc/root1d/Root1D/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Root1D (root1d.Root1D)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> &mdash; <span class="package">package <a href="../index.html">root1d</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">Root1D</span></h1></header><p>1D Root finding algorithms.</p><ul class="at-tag"><li><span class="at-tag version">Version</span>: 0.5.1</li></ul><div class="spec val" id="val-brent"><a href="#val-brent" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>brent : ?&#8288;tol:float <span class="keyword">&#8209;&gt;</span> (float <span class="keyword">&#8209;&gt;</span> float) <span class="keyword">&#8209;&gt;</span> float <span class="keyword">&#8209;&gt;</span> float <span class="keyword">&#8209;&gt;</span> float</code></div><div class="doc"><p><code class="code">brent f a b</code> returns an approximation <code class="code">x</code> of a root of <code class="code">f</code> in
the interval <code class="code">[a,b]</code> with absolute accuracy <code class="code">6. *. epsilon_float
*. abs_float(x) +. tol</code>.</p><ul class="at-tag"><li><span class="at-tag raise">Raises</span> <span class="module-path">Invalid_argument</span>: if <code class="code">f(a) *. f(b) &gt; 0.</code>.</li><li><p><span class="at-tag parameter">Parameter</span> <span class="module-path">tol</span>: desired length of the interval of uncertainty of the final
result (must be <code class="code">&gt;= 0</code>). Default: <code class="code">sqrt epsilon_float</code>.</p><p>Ref.: Brent, R. (1973) Algorithms for Minimization without
Derivatives. Englewood Cliffs, NJ: Prentice-Hall.</p></li></ul></div></div><div class="spec val" id="val-bisection"><a href="#val-bisection" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>bisection : ?&#8288;eps:float <span class="keyword">&#8209;&gt;</span> (float <span class="keyword">&#8209;&gt;</span> float) <span class="keyword">&#8209;&gt;</span> float <span class="keyword">&#8209;&gt;</span> float <span class="keyword">&#8209;&gt;</span> float</code></div><div class="doc"><p><code class="code">bisection f a b</code> find an approximation of a root in the
interval <code class="code">[a,b]</code> using the bisection algorithm.</p><ul class="at-tag"><li><span class="at-tag raise">Raises</span> <span class="module-path">Invalid_argument</span>: if <code class="code">f(a) *. f(b) &gt; 0.</code> or <code class="code">eps &lt;= 0.</code></li><li><span class="at-tag parameter">Parameter</span> <span class="module-path">eps</span>: is the desired relative error on the solution. More
precisely, it terminates when the interval [a,b] verifies
|a-b| ≤ eps max(|a|, |b|). Default: <code class="code">sqrt epsilon_float</code>.</li></ul></div></div><div class="spec val" id="val-illinois"><a href="#val-illinois" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>illinois : ?&#8288;eps:float <span class="keyword">&#8209;&gt;</span> (float <span class="keyword">&#8209;&gt;</span> float) <span class="keyword">&#8209;&gt;</span> float <span class="keyword">&#8209;&gt;</span> float <span class="keyword">&#8209;&gt;</span> float</code></div><div class="doc"><p><code class="code">illinois f a b</code> find an approximation of a root in the interval
<code class="code">[a,b]</code> using the Illinois algorithm (which is the Regula Falsi
method with a small twist). Order of convergence: ³√3 ≈ 1.442.</p><ul class="at-tag"><li><span class="at-tag raise">Raises</span> <span class="module-path">Invalid_argument</span>: if <code class="code">f(a) *. f(b) &gt; 0.</code> or <code class="code">eps &lt;= 0.</code></li><li><p><span class="at-tag parameter">Parameter</span> <span class="module-path">eps</span>: is the desired relative error on the solution. More
precisely, it terminates when the interval [a,b] verifies
|a-b| ≤ eps max(|a|, |b|). Default: <code class="code">sqrt epsilon_float</code>.</p><p>Ref.: <a href="http://link.springer.com/article/10.1007/BF01934364">M. Dowell, P. Jarrat, A modified Regula Falsi method for
computing the root of anequation, BIT 11 (1971), 168–174</a>.</p></li></ul></div></div><div class="spec val" id="val-newton"><a href="#val-newton" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>newton : ?&#8288;good_enough:(float <span class="keyword">&#8209;&gt;</span> float <span class="keyword">&#8209;&gt;</span> float <span class="keyword">&#8209;&gt;</span> bool) <span class="keyword">&#8209;&gt;</span> (float <span class="keyword">&#8209;&gt;</span> float<span class="keyword"> * </span>float) <span class="keyword">&#8209;&gt;</span> float <span class="keyword">&#8209;&gt;</span> float</code></div><div class="doc"><p><code class="code">newton f_f' x0</code> returns an approximate root of <code class="code">f</code> close to the
initial guess <code class="code">x0</code> using Newton's method. <code class="code">f_f'</code> is a function
such that <code class="code">f_f' x</code> returns the couple <code class="code">(f x, f' x)</code> where <code class="code">f' x</code>
is the derivative of <code class="code">f</code> at <code class="code">x</code>.</p><ul class="at-tag"><li><span class="at-tag raise">Raises</span> <span class="module-path">Failure</span>: if the derivative vanishes during the
computations.</li><li><span class="at-tag parameter">Parameter</span> <span class="module-path">good_enough</span>: takes as arguments the current approximation
<code class="code">x</code>, the previous approximation <code class="code">xprev</code>, and <code class="code">f(x)</code> and returns
whether <code class="code">x</code> is a good enough approximation. Default:
<code class="code">abs_float(f x) &lt; sqrt epsilon_float</code>.</li></ul></div></div><div class="spec val" id="val-brent2"><a href="#val-brent2" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>brent2 : ?&#8288;tol:float <span class="keyword">&#8209;&gt;</span> (float <span class="keyword">&#8209;&gt;</span> float<span class="keyword"> * </span>int) <span class="keyword">&#8209;&gt;</span> float <span class="keyword">&#8209;&gt;</span> float <span class="keyword">&#8209;&gt;</span> float</code></div><div class="doc"><p><code class="code">brent2 f a b</code> finds a zero of the function <code class="code">f</code> in the same way
<code class="code">brent f a b</code> does except that <code class="code">f x</code> returns the couple <code class="code">(y, z)</code>
for the number <code class="code">y * 2**z</code>. Thus underflow and overflow can be
avoided for a function with large range.</p><p>Ref.: Brent, R. (1973) Algorithms for Minimization without
Derivatives. Englewood Cliffs, NJ: Prentice-Hall.</p></div></div></body></html>
4 changes: 4 additions & 0 deletions doc/root1d/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (root1d.index)</title><link rel="stylesheet" href="../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> &mdash; <span class="package">package <a href="index.html">root1d</a></span></nav><header></header><h3>Library root1d</h3><p>
The entry point of this library is the module:
<a href="Root1D/index.html">Root1D</a>.</p></body></html>

0 comments on commit 37fa0f3

Please sign in to comment.