blob: 7009e77a8f8e502f42f5ae624b50649d9c791c38 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>TransformUtils (Apache Commons Math 3.3 API)</title>
<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="TransformUtils (Apache Commons Math 3.3 API)";
}
//-->
</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/TransformUtils.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"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/transform/TransformType.html" title="enum in org.apache.commons.math3.transform"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/transform/TransformUtils.html" target="_top">Frames</a></li>
<li><a href="TransformUtils.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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.commons.math3.transform</div>
<h2 title="Class TransformUtils" class="title">Class TransformUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/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>org.apache.commons.math3.transform.TransformUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">TransformUtils</span>
extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Useful functions for the implementation of various transforms.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>3.0</dd>
<dt><span class="strong">Version:</span></dt>
<dd>$Id: TransformUtils.java 1385310 2012-09-16 16:32:10Z tn $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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">&nbsp;</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>static <a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex">Complex</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/transform/TransformUtils.html#createComplexArray(double[][])">createComplexArray</a></strong>(double[][]&nbsp;dataRI)</code>
<div class="block">Builds a new array of <a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex"><code>Complex</code></a> from the specified two dimensional
array of real and imaginary parts.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static double[][]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/transform/TransformUtils.html#createRealImaginaryArray(org.apache.commons.math3.complex.Complex[])">createRealImaginaryArray</a></strong>(<a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex">Complex</a>[]&nbsp;dataC)</code>
<div class="block">Builds a new two dimensional array of <code>double</code> filled with the real
and imaginary parts of the specified <a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex"><code>Complex</code></a> numbers.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/transform/TransformUtils.html#exactLog2(int)">exactLog2</a></strong>(int&nbsp;n)</code>
<div class="block">Returns the base-2 logarithm of the specified <code>int</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex">Complex</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/transform/TransformUtils.html#scaleArray(org.apache.commons.math3.complex.Complex[], double)">scaleArray</a></strong>(<a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex">Complex</a>[]&nbsp;f,
double&nbsp;d)</code>
<div class="block">Multiply every component in the given complex array by the
given real number.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static double[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/transform/TransformUtils.html#scaleArray(double[], double)">scaleArray</a></strong>(double[]&nbsp;f,
double&nbsp;d)</code>
<div class="block">Multiply every component in the given real array by the
given real number.</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&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/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">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="scaleArray(double[], double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scaleArray</h4>
<pre>public static&nbsp;double[]&nbsp;scaleArray(double[]&nbsp;f,
double&nbsp;d)</pre>
<div class="block">Multiply every component in the given real array by the
given real number. The change is made in place.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>f</code> - the real array to be scaled</dd><dd><code>d</code> - the real scaling coefficient</dd>
<dt><span class="strong">Returns:</span></dt><dd>a reference to the scaled array</dd></dl>
</li>
</ul>
<a name="scaleArray(org.apache.commons.math3.complex.Complex[], double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scaleArray</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex">Complex</a>[]&nbsp;scaleArray(<a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex">Complex</a>[]&nbsp;f,
double&nbsp;d)</pre>
<div class="block">Multiply every component in the given complex array by the
given real number. The change is made in place.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>f</code> - the complex array to be scaled</dd><dd><code>d</code> - the real scaling coefficient</dd>
<dt><span class="strong">Returns:</span></dt><dd>a reference to the scaled array</dd></dl>
</li>
</ul>
<a name="createRealImaginaryArray(org.apache.commons.math3.complex.Complex[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createRealImaginaryArray</h4>
<pre>public static&nbsp;double[][]&nbsp;createRealImaginaryArray(<a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex">Complex</a>[]&nbsp;dataC)</pre>
<div class="block">Builds a new two dimensional array of <code>double</code> filled with the real
and imaginary parts of the specified <a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex"><code>Complex</code></a> numbers. In the
returned array <code>dataRI</code>, the data is laid out as follows
<ul>
<li><code>dataRI[0][i] = dataC[i].getReal()</code>,</li>
<li><code>dataRI[1][i] = dataC[i].getImaginary()</code>.</li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataC</code> - the array of <a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex"><code>Complex</code></a> data to be transformed</dd>
<dt><span class="strong">Returns:</span></dt><dd>a two dimensional array filled with the real and imaginary parts
of the specified complex input</dd></dl>
</li>
</ul>
<a name="createComplexArray(double[][])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createComplexArray</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex">Complex</a>[]&nbsp;createComplexArray(double[][]&nbsp;dataRI)
throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre>
<div class="block">Builds a new array of <a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex"><code>Complex</code></a> from the specified two dimensional
array of real and imaginary parts. In the returned array <code>dataC</code>,
the data is laid out as follows
<ul>
<li><code>dataC[i].getReal() = dataRI[0][i]</code>,</li>
<li><code>dataC[i].getImaginary() = dataRI[1][i]</code>.</li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataRI</code> - the array of real and imaginary parts to be transformed</dd>
<dt><span class="strong">Returns:</span></dt><dd>an array of <a href="../../../../../org/apache/commons/math3/complex/Complex.html" title="class in org.apache.commons.math3.complex"><code>Complex</code></a> with specified real and imaginary parts.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if the number of rows of the specified
array is not two, or the array is not rectangular</dd></dl>
</li>
</ul>
<a name="exactLog2(int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>exactLog2</h4>
<pre>public static&nbsp;int&nbsp;exactLog2(int&nbsp;n)
throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Returns the base-2 logarithm of the specified <code>int</code>. Throws an
exception if <code>n</code> is not a power of two.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>n</code> - the <code>int</code> whose base-2 logarithm is to be evaluated</dd>
<dt><span class="strong">Returns:</span></dt><dd>the base-2 logarithm of <code>n</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if <code>n</code> is not a power of two</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/TransformUtils.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"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/transform/TransformType.html" title="enum in org.apache.commons.math3.transform"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/transform/TransformUtils.html" target="_top">Frames</a></li>
<li><a href="TransformUtils.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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>Copyright &#169; 2003&#x2013;2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>