blob: 604334ba3e57c23dd1ec1903f5c38d658a8f9117 [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>
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym(72949126, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/72949126" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<script type='text/javascript'>
window.__lo_site_id = 284467;
(function() {
var wa = document.createElement('script'); wa.type = 'text/javascript'; wa.async = true;
wa.src = 'https://d10lpsik1i8c69.cloudfront.net/w.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wa, s);
})();
</script>
<link rel="canonical" href="https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/ml/math/primitives/vector/VectorUtils.html" />
<!-- Generated by javadoc (1.8.0_261) on Wed Dec 09 14:33:11 MSK 2020 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>VectorUtils (Ignite 2.9.1)</title>
<meta name="date" content="2020-12-09">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
<link rel='shortcut icon' href='https://ignite.apache.org/favicon.ico'/>
<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="VectorUtils (Ignite 2.9.1)";
}
}
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,"i14":9,"i15":9,"i16":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/VectorUtils.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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorStorage.html" title="interface in org.apache.ignite.ml.math.primitives.vector"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/ignite/ml/math/primitives/vector/VectorUtils.html" target="_top">Frames</a></li>
<li><a href="VectorUtils.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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.ignite.ml.math.primitives.vector</div>
<h2 title="Class VectorUtils" class="title">Class VectorUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://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>org.apache.ignite.ml.math.primitives.vector.VectorUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">VectorUtils</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Some utils for <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector"><code>Vector</code></a>.</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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</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/primitives/vector/VectorUtils.html#VectorUtils--">VectorUtils</a></span>()</code>&nbsp;</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">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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 <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#concat-org.apache.ignite.ml.math.primitives.vector.Vector...-">concat</a></span>(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>...&nbsp;vs)</code>
<div class="block">Concatenates given vectors.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#concat-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.primitives.vector.Vector...-">concat</a></span>(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v1,
<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>...&nbsp;vs)</code>
<div class="block">Concatenates given vectors.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#concat-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.primitives.vector.Vector-">concat</a></span>(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v1,
<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v2)</code>
<div class="block">Concatenates two given vectors.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#copyPart-org.apache.ignite.ml.math.primitives.vector.Vector-int-int-">copyPart</a></span>(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v,
int&nbsp;off,
int&nbsp;len)</code>
<div class="block">Get copy of part of given length of given vector starting from given offset.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#elementWiseMinus-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.primitives.vector.Vector-">elementWiseMinus</a></span>(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;vec1,
<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;vec2)</code>
<div class="block">Performs in-place vector subtraction.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#elementWiseTimes-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.primitives.vector.Vector-">elementWiseTimes</a></span>(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;vec1,
<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;vec2)</code>
<div class="block">Performs in-place vector multiplication.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/impl/DenseVector.html" title="class in org.apache.ignite.ml.math.primitives.vector.impl">DenseVector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#fill-double-int-">fill</a></span>(double&nbsp;val,
int&nbsp;n)</code>
<div class="block">Create new vector of specified size n with specified value.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/functions/IgniteFunction.html" title="interface in org.apache.ignite.ml.math.functions">IgniteFunction</a><span class='angle_bracket'>&lt;</span><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>,<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a><span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#getProjector-int:A-">getProjector</a></span>(int[]&nbsp;mapping)</code>
<div class="block">Get projector from index mapping.</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/primitives/vector/VectorUtils.html#num2Arr-double-">num2Arr</a></span>(double&nbsp;val)</code>
<div class="block">Turn number to 1-sized array.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#num2Vec-double-">num2Vec</a></span>(double&nbsp;val)</code>
<div class="block">Wrap specified value into vector.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#of-double...-">of</a></span>(double...&nbsp;values)</code>
<div class="block">Creates dense local on heap vector based on array of doubles.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#of-java.lang.Double:A-">of</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a>[]&nbsp;values)</code>
<div class="block">Creates vector based on array of Doubles.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/NamedVector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">NamedVector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#of-java.util.Map-">of</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><span class='angle_bracket'>&lt;</span><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a><span class='angle_bracket'>&gt;</span>&nbsp;values)</code>
<div class="block">Creates named vector based on map of keys and values.</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/primitives/vector/VectorUtils.html#vec2Num-org.apache.ignite.ml.math.primitives.vector.Vector-">vec2Num</a></span>(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;vec)</code>
<div class="block">Turn Vector into number by looking at index of maximal element in vector.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/impl/DenseVector.html" title="class in org.apache.ignite.ml.math.primitives.vector.impl">DenseVector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#zeroes-int-">zeroes</a></span>(int&nbsp;n)</code>
<div class="block">Create new</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#zeroesLike-org.apache.ignite.ml.math.primitives.vector.Vector-">zeroesLike</a></span>(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v)</code>
<div class="block">Create new vector like given vector initialized by zeroes.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorUtils.html#zipWith-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.functions.IgniteBiFunction-">zipWith</a></span>(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v1,
<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v2,
<a href="../../../../../../../org/apache/ignite/ml/math/functions/IgniteBiFunction.html" title="interface in org.apache.ignite.ml.math.functions">IgniteBiFunction</a><span class='angle_bracket'>&lt;</span><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a><span class='angle_bracket'>&gt;</span>&nbsp;f)</code>
<div class="block">Zip two vectors with given binary function
(i.e. apply binary function to both vector elementwise and construct vector from results).</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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="VectorUtils--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>VectorUtils</h4>
<pre>public&nbsp;VectorUtils()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="zeroesLike-org.apache.ignite.ml.math.primitives.vector.Vector-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>zeroesLike</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;zeroesLike(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v)</pre>
<div class="block">Create new vector like given vector initialized by zeroes.</div>
</li>
</ul>
<a name="zeroes-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>zeroes</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/impl/DenseVector.html" title="class in org.apache.ignite.ml.math.primitives.vector.impl">DenseVector</a>&nbsp;zeroes(int&nbsp;n)</pre>
<div class="block">Create new</div>
</li>
</ul>
<a name="fill-double-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fill</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/impl/DenseVector.html" title="class in org.apache.ignite.ml.math.primitives.vector.impl">DenseVector</a>&nbsp;fill(double&nbsp;val,
int&nbsp;n)</pre>
<div class="block">Create new vector of specified size n with specified value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>val</code> - Value.</dd>
<dd><code>n</code> - Size;</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>New vector of specified size n with specified value.</dd>
</dl>
</li>
</ul>
<a name="num2Vec-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>num2Vec</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;num2Vec(double&nbsp;val)</pre>
<div class="block">Wrap specified value into vector.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>val</code> - Value to wrap.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Specified value wrapped into vector.</dd>
</dl>
</li>
</ul>
<a name="num2Arr-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>num2Arr</h4>
<pre>public static&nbsp;double[]&nbsp;num2Arr(double&nbsp;val)</pre>
<div class="block">Turn number to 1-sized array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>val</code> - Value to wrap in array.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Number wrapped in 1-sized array.</dd>
</dl>
</li>
</ul>
<a name="vec2Num-org.apache.ignite.ml.math.primitives.vector.Vector-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vec2Num</h4>
<pre>public static&nbsp;double&nbsp;vec2Num(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;vec)</pre>
<div class="block">Turn Vector into number by looking at index of maximal element in vector.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>vec</code> - Vector to be turned into number.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Number.</dd>
</dl>
</li>
</ul>
<a name="elementWiseTimes-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.primitives.vector.Vector-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>elementWiseTimes</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;elementWiseTimes(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;vec1,
<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;vec2)</pre>
<div class="block">Performs in-place vector multiplication.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>vec1</code> - Operand to be changed and first multiplication operand.</dd>
<dd><code>vec2</code> - Second multiplication operand.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Updated first operand.</dd>
</dl>
</li>
</ul>
<a name="elementWiseMinus-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.primitives.vector.Vector-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>elementWiseMinus</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;elementWiseMinus(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;vec1,
<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;vec2)</pre>
<div class="block">Performs in-place vector subtraction.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>vec1</code> - Operand to be changed and subtracted from.</dd>
<dd><code>vec2</code> - Operand to subtract.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Updated first operand.</dd>
</dl>
</li>
</ul>
<a name="zipWith-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.functions.IgniteBiFunction-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>zipWith</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;zipWith(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v1,
<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v2,
<a href="../../../../../../../org/apache/ignite/ml/math/functions/IgniteBiFunction.html" title="interface in org.apache.ignite.ml.math.functions">IgniteBiFunction</a><span class='angle_bracket'>&lt;</span><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a><span class='angle_bracket'>&gt;</span>&nbsp;f)</pre>
<div class="block">Zip two vectors with given binary function
(i.e. apply binary function to both vector elementwise and construct vector from results).
Example zipWith({0, 2, 4}, {1, 3, 5}, plus) = {0 + 1, 2 + 3, 4 + 5}.
Length of result is length of shortest of vectors.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>v1</code> - First vector.</dd>
<dd><code>v2</code> - Second vector.</dd>
<dd><code>f</code> - Function to zip with.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Result of zipping.</dd>
</dl>
</li>
</ul>
<a name="copyPart-org.apache.ignite.ml.math.primitives.vector.Vector-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyPart</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;copyPart(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v,
int&nbsp;off,
int&nbsp;len)</pre>
<div class="block">Get copy of part of given length of given vector starting from given offset.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>v</code> - Vector to copy part from.</dd>
<dd><code>off</code> - Offset.</dd>
<dd><code>len</code> - Length.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Copy of part of given length of given vector starting from given offset.</dd>
</dl>
</li>
</ul>
<a name="of-double...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>of</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;of(double...&nbsp;values)</pre>
<div class="block">Creates dense local on heap vector based on array of doubles.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - Values.</dd>
</dl>
</li>
</ul>
<a name="of-java.lang.Double:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>of</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;of(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a>[]&nbsp;values)</pre>
<div class="block">Creates vector based on array of Doubles. If array contains null-elements then
method returns sparse local on head vector. In other case method returns
dense local on heap vector.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - Values.</dd>
</dl>
</li>
</ul>
<a name="of-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>of</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/NamedVector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">NamedVector</a>&nbsp;of(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><span class='angle_bracket'>&lt;</span><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a><span class='angle_bracket'>&gt;</span>&nbsp;values)</pre>
<div class="block">Creates named vector based on map of keys and values.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - Values.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Named vector.</dd>
</dl>
</li>
</ul>
<a name="concat-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.primitives.vector.Vector-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>concat</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;concat(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v1,
<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v2)</pre>
<div class="block">Concatenates two given vectors.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>v1</code> - First vector.</dd>
<dd><code>v2</code> - Second vector.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Concatenation result.</dd>
</dl>
</li>
</ul>
<a name="concat-org.apache.ignite.ml.math.primitives.vector.Vector-org.apache.ignite.ml.math.primitives.vector.Vector...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>concat</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;concat(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;v1,
<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>...&nbsp;vs)</pre>
<div class="block">Concatenates given vectors.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>v1</code> - First vector.</dd>
<dd><code>vs</code> - Other vectors.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Concatenation result.</dd>
</dl>
</li>
</ul>
<a name="concat-org.apache.ignite.ml.math.primitives.vector.Vector...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>concat</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>&nbsp;concat(<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>...&nbsp;vs)</pre>
<div class="block">Concatenates given vectors.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>vs</code> - Other vectors.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Concatenation result.</dd>
</dl>
</li>
</ul>
<a name="getProjector-int:A-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getProjector</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/ignite/ml/math/functions/IgniteFunction.html" title="interface in org.apache.ignite.ml.math.functions">IgniteFunction</a><span class='angle_bracket'>&lt;</span><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a>,<a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/Vector.html" title="interface in org.apache.ignite.ml.math.primitives.vector">Vector</a><span class='angle_bracket'>&gt;</span>&nbsp;getProjector(int[]&nbsp;mapping)</pre>
<div class="block">Get projector from index mapping.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mapping</code> - Index mapping.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Projector.</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/VectorUtils.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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/ignite/ml/math/primitives/vector/VectorStorage.html" title="interface in org.apache.ignite.ml.math.primitives.vector"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/ignite/ml/math/primitives/vector/VectorUtils.html" target="_top">Frames</a></li>
<li><a href="VectorUtils.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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><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>2020 Copyright &#169; 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 Database and Caching Platform</b> </td> <td>:&nbsp;&nbsp; ver. <strong>2.9.1</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>:&nbsp;&nbsp; December 9 2020 </td> </tr> </tbody> </table> </td> </tr> </table></small></p>
</body>
</html>