| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <link rel="canonical" href="https://ignite.apache.org/releases/2.4.0/javadoc/org/apache/ignite/ml/math/Algebra.html" /> |
| <META NAME="ROBOTS" CONTENT="NOINDEX"> |
| |
| <!-- Generated by javadoc (1.8.0_77) on Mon Mar 05 10:43:19 UTC 2018 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Algebra (Ignite 2.4.0)</title> |
| <meta name="date" content="2018-03-05"> |
| <link rel="stylesheet" type="text/css" href="../../../../../javadoc.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-61232409-1', 'auto'); |
| ga('send', 'pageview'); |
| |
| </script></head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Algebra (Ignite 2.4.0)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <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/Algebra.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-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage">Ignite - In-Memory Data Fabric</div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../../../org/apache/ignite/ml/math/Blas.html" title="class in org.apache.ignite.ml.math"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/ignite/ml/math/Algebra.html" target="_top">Frames</a></li> |
| <li><a href="Algebra.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><a href="#fields.inherited.from.class.org.apache.ignite.ml.math.Constants">Field</a> | </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">org.apache.ignite.ml.math</div> |
| <h2 title="Class Algebra" class="title">Class Algebra</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/8/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><a href="../../../../../org/apache/ignite/ml/math/Constants.html" title="class in org.apache.ignite.ml.math">org.apache.ignite.ml.math.Constants</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.ignite.ml.math.Algebra</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">Algebra</span> |
| extends <a href="../../../../../org/apache/ignite/ml/math/Constants.html" title="class in org.apache.ignite.ml.math">Constants</a></pre> |
| <div class="block">Miscellaneous arithmetic and algebra functions. |
| Lifted from Apache Mahout.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.ignite.ml.math.Constants"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class org.apache.ignite.ml.math.<a href="../../../../../org/apache/ignite/ml/math/Constants.html" title="class in org.apache.ignite.ml.math">Constants</a></h3> |
| <code><a href="../../../../../org/apache/ignite/ml/math/Constants.html#BIG">BIG</a>, <a href="../../../../../org/apache/ignite/ml/math/Constants.html#BIGINV">BIGINV</a>, <a href="../../../../../org/apache/ignite/ml/math/Constants.html#LOGPI">LOGPI</a>, <a href="../../../../../org/apache/ignite/ml/math/Constants.html#MACHEP">MACHEP</a>, <a href="../../../../../org/apache/ignite/ml/math/Constants.html#MAXGAM">MAXGAM</a>, <a href="../../../../../org/apache/ignite/ml/math/Constants.html#MAXLOG">MAXLOG</a>, <a href="../../../../../org/apache/ignite/ml/math/Constants.html#MINLOG">MINLOG</a>, <a href="../../../../../org/apache/ignite/ml/math/Constants.html#SQRTH">SQRTH</a>, <a href="../../../../../org/apache/ignite/ml/math/Constants.html#SQTPI">SQTPI</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" 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><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#Algebra--">Algebra</a></span>()</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#binomial-double-long-">binomial</a></span>(double n, |
| long k)</code> |
| <div class="block">Efficiently returns the binomial coefficient, often also referred to as |
| "n over k" or "n choose k".</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#binomial-long-long-">binomial</a></span>(long n, |
| long k)</code> |
| <div class="block">Efficiently returns the binomial coefficient, often also referred to as "n over k" or "n choose k".</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#ceil-double-">ceil</a></span>(double val)</code> |
| <div class="block">Returns the smallest <code>long >= value</code>.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#chbevl-double-double:A-int-">chbevl</a></span>(double x, |
| double[] coef, |
| int N)</code> |
| <div class="block">Evaluates the series of Chebyshev polynomials Ti at argument x/2.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#evalPoly-double-double:A-int-">evalPoly</a></span>(double x, |
| double[] coef, |
| int n)</code> |
| <div class="block">Evaluates the given polynomial of degree <code>N</code> at <code>x</code>.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#evalPoly1-double-double:A-int-">evalPoly1</a></span>(double x, |
| double[] coef, |
| int n)</code> |
| <div class="block">Evaluates the given polynomial of degree <code>N</code> at <code>x</code>, assuming coefficient of N is 1.0.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#floor-double-">floor</a></span>(double val)</code> |
| <div class="block">Returns the largest <code>long <= value</code>.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#hypot-double-double-">hypot</a></span>(double a, |
| double b)</code> |
| <div class="block">Gets <code>sqrt(a^2 + b^2)</code> without under/overflow.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#log-double-double-">log</a></span>(double base, |
| double val)</code> |
| <div class="block">Returns <code>log<sub>base</sub>value</code>.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#log10-double-">log10</a></span>(double val)</code> |
| <div class="block">Returns <code>log<sub>10</sub>value</code>.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#log2-double-">log2</a></span>(double val)</code> |
| <div class="block">Returns <code>log<sub>2</sub>value</code>.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#logFactorial-int-">logFactorial</a></span>(int k)</code> |
| <div class="block">Returns <code>log(k!)</code>.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#longFactorial-int-">longFactorial</a></span>(int k)</code> |
| <div class="block">Instantly returns the factorial <code>k!</code>.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/ignite/ml/math/Algebra.html#stirlingCorrection-int-">stirlingCorrection</a></span>(int k)</code> |
| <div class="block">Returns the StirlingCorrection.</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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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="Algebra--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Algebra</h4> |
| <pre>public Algebra()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="binomial-double-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>binomial</h4> |
| <pre>public static double binomial(double n, |
| long k)</pre> |
| <div class="block">Efficiently returns the binomial coefficient, often also referred to as |
| "n over k" or "n choose k". The binomial coefficient is defined as |
| <code>(n * n-1 * ... * n-k+1 ) / ( 1 * 2 * ... * k )</code>. |
| <ul> <li><code>k&lt;0</code>: <code>0</code>.</li> |
| <li><code>k==0</code>: <code>1</code>.</li> |
| <li><code>k==1</code>: <code>n</code>.</li> |
| <li>else: <code>(n * n-1 * ... * n-k+1 ) / ( 1 * 2 * ... * k)</code>.</li> |
| </ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>n</code> - Size of set.</dd> |
| <dd><code>k</code> - Size of subset.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Binomial coefficient.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="binomial-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>binomial</h4> |
| <pre>public static double binomial(long n, |
| long k)</pre> |
| <div class="block">Efficiently returns the binomial coefficient, often also referred to as "n over k" or "n choose k". |
| The binomial coefficient is defined as |
| <ul> <li><code>k&lt;0</code>: <code>0</code>. <li><code>k==0 || k==n</code>: <code>1</code>. <li><code>k==1 || k==n-1</code>: |
| <code>n</code>. <li>else: <code>(n * n-1 * ... * n-k+1 ) / ( 1 * 2 * ... * k )</code>. </ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>n</code> - Size of set.</dd> |
| <dd><code>k</code> - Size of subset.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Binomial coefficient.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="ceil-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ceil</h4> |
| <pre>public static long ceil(double val)</pre> |
| <div class="block">Returns the smallest <code>long >= value</code>. |
| <dl><dt>Examples: <code>1.0 -> 1, 1.2 -> 2, 1.9 -> 2</code>. This |
| method is safer than using (long) Math.ceil(value), because of possible rounding error.</dt></dl></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>val</code> - Value for ceil.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Ceil of the given value.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="chbevl-double-double:A-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>chbevl</h4> |
| <pre>public static double chbevl(double x, |
| double[] coef, |
| int N)</pre> |
| <div class="block">Evaluates the series of Chebyshev polynomials Ti at argument x/2. The series is given by |
| <pre class="snippet"> |
| N-1 |
| - ' |
| y = > coef[i] T (x/2) |
| - i |
| i=0 |
| </pre> |
| Coefficients are stored in reverse order, i.e. the zero order term is last in the array. Note N is the number of |
| coefficients, not the order. |
| <p> |
| If coefficients are for the interval a to b, x must have been transformed to x |
| -< 2(2x - b - a)/(b-a) before entering the routine. This maps x from (a, b) to (-1, 1), over which the |
| Chebyshev polynomials are defined.</p> |
| <p> |
| If the coefficients are for the inverted interval, in which (a, b) is |
| mapped to (1/b, 1/a), the transformation required is <code>x -> 2(2ab/x - b - a)/(b-a)</code>. If b is infinity, this |
| becomes <code>x -> 4a/x - 1</code>.</p> |
| <p> |
| SPEED: |
| </p> |
| Taking advantage of the recurrence properties of the Chebyshev |
| polynomials, the routine requires one more addition per loop than evaluating a nested polynomial of the same |
| degree.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>x</code> - Argument to the polynomial.</dd> |
| <dd><code>coef</code> - Coefficients of the polynomial.</dd> |
| <dd><code>N</code> - Number of coefficients.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="floor-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>floor</h4> |
| <pre>public static long floor(double val)</pre> |
| <div class="block">Returns the largest <code>long <= value</code>. |
| <dl><dt>Examples: <code>1.0 -> 1, 1.2 -> 1, 1.9 -> 1 <dt> 2.0 -> 2, 2.2 -> 2, 2.9 -> 2</code></dt></dl> |
| This method is safer than using (long) Math.floor(value), because of possible rounding error.</div> |
| </li> |
| </ul> |
| <a name="log-double-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>log</h4> |
| <pre>public static double log(double base, |
| double val)</pre> |
| <div class="block">Returns <code>log<sub>base</sub>value</code>.</div> |
| </li> |
| </ul> |
| <a name="log10-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>log10</h4> |
| <pre>public static double log10(double val)</pre> |
| <div class="block">Returns <code>log<sub>10</sub>value</code>.</div> |
| </li> |
| </ul> |
| <a name="log2-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>log2</h4> |
| <pre>public static double log2(double val)</pre> |
| <div class="block">Returns <code>log<sub>2</sub>value</code>.</div> |
| </li> |
| </ul> |
| <a name="logFactorial-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>logFactorial</h4> |
| <pre>public static double logFactorial(int k)</pre> |
| <div class="block">Returns <code>log(k!)</code>. Tries to avoid overflows. For <code>k&lt;30</code> simply looks up a table in O(1). |
| For <code>k&gt;=30</code> uses Stirling's approximation.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>k</code> - must hold <code>k &gt;= 0</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="longFactorial-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>longFactorial</h4> |
| <pre>public static long longFactorial(int k)</pre> |
| <div class="block">Instantly returns the factorial <code>k!</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>k</code> - must hold <code>k >= 0 && k < 21</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="stirlingCorrection-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stirlingCorrection</h4> |
| <pre>public static double stirlingCorrection(int k)</pre> |
| <div class="block">Returns the StirlingCorrection. |
| <p> |
| Correction term of the Stirling approximation for <code>log(k!)</code> (series in |
| 1/k, or table values for small k) with int parameter k. <code>log k! = (k + 1/2)log(k + 1) - (k + 1) + |
| (1/2)log(2Pi) + STIRLING_CORRECTION(k + 1) log k! = (k + 1/2)log(k) - k + (1/2)log(2Pi) + |
| STIRLING_CORRECTION(k) </code> </p></div> |
| </li> |
| </ul> |
| <a name="evalPoly1-double-double:A-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>evalPoly1</h4> |
| <pre>public static double evalPoly1(double x, |
| double[] coef, |
| int n)</pre> |
| <div class="block">Evaluates the given polynomial of degree <code>N</code> at <code>x</code>, assuming coefficient of N is 1.0. Otherwise same |
| as <a href="../../../../../org/apache/ignite/ml/math/Algebra.html#evalPoly-double-double:A-int-"><code>evalPoly(double, double[], int)</code></a>. |
| <pre class="snippet"> |
| 2 N |
| y = C + C x + C x +...+ C x |
| 0 1 2 N |
| </pre> |
| where <pre class="snippet"> |
| C = 1 |
| N |
| </pre> |
| and hence is omitted from the array. |
| <p> |
| Coefficients are stored in reverse order:</p> |
| <pre class="snippet"> |
| coef[0] = C , ..., coef[N-1] = C . |
| N-1 0 |
| </pre> |
| Calling arguments are otherwise the same as <a href="../../../../../org/apache/ignite/ml/math/Algebra.html#evalPoly-double-double:A-int-"><code>evalPoly(double, double[], int)</code></a>. |
| <p> |
| In the interest of speed, there are no checks for out of bounds arithmetic.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>x</code> - Argument to the polynomial.</dd> |
| <dd><code>coef</code> - Coefficients of the polynomial.</dd> |
| <dd><code>n</code> - Degree of the polynomial.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="evalPoly-double-double:A-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>evalPoly</h4> |
| <pre>public static double evalPoly(double x, |
| double[] coef, |
| int n)</pre> |
| <div class="block">Evaluates the given polynomial of degree <code>N</code> at <code>x</code>. |
| <pre class="snippet"> |
| 2 N |
| y = C + C x + C x +...+ C x |
| 0 1 2 N |
| </pre> |
| <p> |
| Coefficients are stored in reverse order:</p> |
| <pre class="snippet"> |
| coef[0] = C , ..., coef[N] = C . |
| N 0 |
| </pre> |
| <p> |
| In the interest of speed, there are no checks for out of bounds arithmetic.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>x</code> - Argument to the polynomial.</dd> |
| <dd><code>coef</code> - Coefficients of the polynomial.</dd> |
| <dd><code>n</code> - Degree of the polynomial.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hypot-double-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>hypot</h4> |
| <pre>public static double hypot(double a, |
| double b)</pre> |
| <div class="block">Gets <code>sqrt(a^2 + b^2)</code> without under/overflow.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>a</code> - First side value.</dd> |
| <dd><code>b</code> - Second side value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Hypotenuse value.</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> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <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/Algebra.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-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage">Ignite - In-Memory Data Fabric</div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../../../org/apache/ignite/ml/math/Blas.html" title="class in org.apache.ignite.ml.math"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/ignite/ml/math/Algebra.html" target="_top">Frames</a></li> |
| <li><a href="Algebra.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><a href="#fields.inherited.from.class.org.apache.ignite.ml.math.Constants">Field</a> | </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><table width="100%" border="0" cellspacing=0 cellpadding=0 style="padding: 5px"> <tr> <td> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <a target=_blank href="https://ignite.apache.org"><nobr>2018 Copyright © Apache Software Foundation</nobr></a> </td> </tr> </tbody> </table> </td> <td width="100%" align="right" valign="center"> <a href="https://twitter.com/ApacheIgnite" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @ApacheIgnite</a> </td> </tr> <tr> <td colspan="2" valign="top" align="left"> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <b>Ignite Fabric</b> </td> <td>: ver. <strong>2.4.0</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>: March 5 2018 </td> </tr> </tbody> </table> </td> </tr> </table></small></p> |
| </body> |
| </html> |