2022-08-12 19:55:22 +00:00
<!DOCTYPE HTML>
2019-12-15 20:58:06 +00:00
<!-- NewPage -->
< html lang = "en" >
< head >
2022-08-12 19:55:22 +00:00
<!-- Generated by javadoc -->
2023-01-26 23:42:09 +00:00
< title > OrtUtil (onnxruntime 1.15.0 API)< / title >
2022-08-12 19:55:22 +00:00
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" >
2019-12-15 20:58:06 +00:00
< link rel = "stylesheet" type = "text/css" href = "../../stylesheet.css" title = "Style" >
2023-01-20 00:21:07 +00:00
< link rel = "stylesheet" type = "text/css" href = "../../jquery/jquery-ui.min.css" title = "Style" >
< link rel = "stylesheet" type = "text/css" href = "../../jquery-ui.overrides.css" title = "Style" >
2019-12-15 20:58:06 +00:00
< script type = "text/javascript" src = "../../script.js" > < / script >
2022-08-12 19:55:22 +00:00
< script type = "text/javascript" src = "../../jquery/jszip/dist/jszip.min.js" > < / script >
< script type = "text/javascript" src = "../../jquery/jszip-utils/dist/jszip-utils.min.js" > < / script >
<!-- [if IE]>
< script type = "text/javascript" src = "../../jquery/jszip-utils/dist/jszip-utils-ie.min.js" > < / script >
<![endif]-->
2023-01-20 00:21:07 +00:00
< script type = "text/javascript" src = "../../jquery/jquery-3.6.0.min.js" > < / script >
< script type = "text/javascript" src = "../../jquery/jquery-ui.min.js" > < / script >
2019-12-15 20:58:06 +00:00
< / head >
< body >
< script type = "text/javascript" > < ! - -
try {
if (location.href.indexOf('is-external=true') == -1) {
2023-01-26 23:42:09 +00:00
parent.document.title="OrtUtil (onnxruntime 1.15.0 API)";
2019-12-15 20:58:06 +00:00
}
}
catch(err) {
}
//-->
2022-08-12 19:55:22 +00:00
var data = {"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,"i17":9,"i18":9,"i19":9,"i20":9};
2019-12-15 20:58:06 +00:00
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";
2022-08-12 19:55:22 +00:00
var pathtoroot = "../../";
var useModuleDirectories = true;
loadScripts(document, 'script');< / script >
2019-12-15 20:58:06 +00:00
< noscript >
< div > JavaScript is disabled on your browser.< / div >
< / noscript >
2022-08-12 19:55:22 +00:00
< header role = "banner" >
< nav role = "navigation" >
< div class = "fixedNav" >
2019-12-15 20:58:06 +00:00
<!-- ========= START OF TOP NAVBAR ======= -->
2022-08-12 19:55:22 +00:00
< div class = "topNav" > < a id = "navbar.top" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< div class = "skipNav" > < a href = "#skip.navbar.top" title = "Skip navigation links" > Skip navigation links< / a > < / div >
2022-08-12 19:55:22 +00:00
< a id = "navbar.top.firstrow" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "navList" title = "Navigation" >
2022-08-12 19:55:22 +00:00
< li > < a href = "../../index.html" > Overview< / a > < / li >
< li > < a href = "package-summary.html" > Package< / a > < / li >
2019-12-15 20:58:06 +00:00
< li class = "navBarCell1Rev" > Class< / 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" id = "allclasses_navbar_top" >
2022-08-12 19:55:22 +00:00
< li > < a href = "../../allclasses.html" > All Classes< / a > < / li >
< / ul >
< ul class = "navListSearch" >
< li > < label for = "search" > SEARCH:< / label >
< input type = "text" id = "search" value = "search" disabled = "disabled" >
< input type = "reset" id = "reset" value = "reset" disabled = "disabled" >
< / li >
2019-12-15 20:58:06 +00:00
< / 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 >
2022-08-12 19:55:22 +00:00
< noscript >
< div > JavaScript is disabled on your browser.< / div >
< / noscript >
2019-12-15 20:58:06 +00:00
< / div >
< div >
< ul class = "subNavList" >
< li > Summary: < / li >
< li > Nested | < / li >
< li > Field | < / li >
< li > Constr | < / li >
< li > < a href = "#method.summary" > Method< / a > < / li >
< / ul >
< ul class = "subNavList" >
< li > Detail: < / li >
< li > Field | < / li >
< li > Constr | < / li >
< li > < a href = "#method.detail" > Method< / a > < / li >
< / ul >
< / div >
2022-08-12 19:55:22 +00:00
< a id = "skip.navbar.top" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a > < / div >
<!-- ========= END OF TOP NAVBAR ========= -->
2022-08-12 19:55:22 +00:00
< / div >
< div class = "navPadding" > < / div >
< script type = "text/javascript" > < ! - -
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
< / script >
< / nav >
< / header >
2019-12-15 20:58:06 +00:00
<!-- ======== START OF CLASS DATA ======== -->
2022-08-12 19:55:22 +00:00
< main role = "main" >
2019-12-15 20:58:06 +00:00
< div class = "header" >
2022-08-12 19:55:22 +00:00
< div class = "subTitle" > < span class = "packageLabelInType" > Package< / span > < a href = "package-summary.html" > ai.onnxruntime< / a > < / div >
2019-12-15 20:58:06 +00:00
< h2 title = "Class OrtUtil" class = "title" > Class OrtUtil< / h2 >
< / div >
< div class = "contentContainer" >
< ul class = "inheritance" >
< li > java.lang.Object< / li >
< li >
< ul class = "inheritance" >
< li > ai.onnxruntime.OrtUtil< / li >
< / ul >
< / li >
< / ul >
< div class = "description" >
< ul class = "blockList" >
< li class = "blockList" >
< hr >
< pre > public final class < span class = "typeNameLabel" > OrtUtil< / span >
extends java.lang.Object< / pre >
< div class = "block" > Util code for interacting with Java arrays.< / div >
< / li >
< / ul >
< / div >
< div class = "summary" >
< ul class = "blockList" >
< li class = "blockList" >
<!-- ========== METHOD SUMMARY =========== -->
2023-01-20 00:21:07 +00:00
< section >
2019-12-15 20:58:06 +00:00
< ul class = "blockList" >
2022-08-12 19:55:22 +00:00
< li class = "blockList" > < a id = "method.summary" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< h3 > Method Summary< / h3 >
2022-08-12 19:55:22 +00:00
< table class = "memberSummary" >
2019-12-15 20:58:06 +00:00
< 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 >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "col" > Method< / th >
< th class = "colLast" scope = "col" > Description< / th >
2019-12-15 20:58:06 +00:00
< / tr >
< tr id = "i0" class = "altColor" >
< td class = "colFirst" > < code > static long< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#elementCount(long%5B%5D)" > elementCount< / a > < / span > ​ (long[] shape)< / code > < / th >
< td class = "colLast" >
2019-12-15 20:58:06 +00:00
< div class = "block" > Counts the number of elements stored in a Tensor of this shape.< / div >
< / td >
< / tr >
< tr id = "i1" class = "rowColor" >
< td class = "colFirst" > < code > static java.lang.String[]< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#flattenString(java.lang.Object)" > flattenString< / a > < / span > ​ (java.lang.Object o)< / code > < / th >
< td class = "colLast" >
< div class = "block" > Flatten a multidimensional String array into a single dimensional String array, reading it in a
multidimensional row-major order.< / div >
2019-12-15 20:58:06 +00:00
< / td >
< / tr >
< tr id = "i2" class = "altColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#newBooleanArray(long%5B%5D)" > newBooleanArray< / a > < / span > ​ (long[] shape)< / code > < / th >
< td class = "colLast" >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive boolean array of up to 8 dimensions, using the supplied shape.< / div >
< / td >
< / tr >
< tr id = "i3" class = "rowColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#newByteArray(long%5B%5D)" > newByteArray< / a > < / span > ​ (long[] shape)< / code > < / th >
< td class = "colLast" >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive byte array of up to 8 dimensions, using the supplied shape.< / div >
< / td >
< / tr >
< tr id = "i4" class = "altColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#newDoubleArray(long%5B%5D)" > newDoubleArray< / a > < / span > ​ (long[] shape)< / code > < / th >
< td class = "colLast" >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive double array of up to 8 dimensions, using the supplied shape.< / div >
< / td >
< / tr >
< tr id = "i5" class = "rowColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#newFloatArray(long%5B%5D)" > newFloatArray< / a > < / span > ​ (long[] shape)< / code > < / th >
< td class = "colLast" >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive float array of up to 8 dimensions, using the supplied shape.< / div >
< / td >
< / tr >
< tr id = "i6" class = "altColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#newIntArray(long%5B%5D)" > newIntArray< / a > < / span > ​ (long[] shape)< / code > < / th >
< td class = "colLast" >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive int array of up to 8 dimensions, using the supplied shape.< / div >
< / td >
< / tr >
< tr id = "i7" class = "rowColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#newLongArray(long%5B%5D)" > newLongArray< / a > < / span > ​ (long[] shape)< / code > < / th >
< td class = "colLast" >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive long array of up to 8 dimensions, using the supplied shape.< / div >
< / td >
< / tr >
< tr id = "i8" class = "altColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#newShortArray(long%5B%5D)" > newShortArray< / a > < / span > ​ (long[] shape)< / code > < / th >
< td class = "colLast" >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive short array of up to 8 dimensions, using the supplied shape.< / div >
< / td >
< / tr >
< tr id = "i9" class = "rowColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#newStringArray(long%5B%5D)" > newStringArray< / a > < / span > ​ (long[] shape)< / code > < / th >
< td class = "colLast" >
< div class = "block" > Creates a new String array of up to 8 dimensions, using the supplied shape.< / div >
2019-12-15 20:58:06 +00:00
< / td >
< / tr >
< tr id = "i10" class = "altColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#reshape(boolean%5B%5D,long%5B%5D)" > reshape< / a > < / span > ​ (boolean[] input,
long[] shape)< / code > < / th >
< td class = "colLast" >
< div class = "block" > Reshapes a boolean array into the desired n-dimensional array assuming the boolean array is
stored in n-dimensional row-major order.< / div >
2019-12-15 20:58:06 +00:00
< / td >
< / tr >
< tr id = "i11" class = "rowColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#reshape(byte%5B%5D,long%5B%5D)" > reshape< / a > < / span > ​ (byte[] input,
long[] shape)< / code > < / th >
< td class = "colLast" >
< div class = "block" > Reshapes a byte array into the desired n-dimensional array assuming the byte array is stored in
n-dimensional row-major order.< / div >
2019-12-15 20:58:06 +00:00
< / td >
< / tr >
< tr id = "i12" class = "altColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#reshape(double%5B%5D,long%5B%5D)" > reshape< / a > < / span > ​ (double[] input,
long[] shape)< / code > < / th >
< td class = "colLast" >
< div class = "block" > Reshapes a double array into the desired n-dimensional array assuming the double array is
stored in n-dimensional row-major order.< / div >
2019-12-15 20:58:06 +00:00
< / td >
< / tr >
< tr id = "i13" class = "rowColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#reshape(float%5B%5D,long%5B%5D)" > reshape< / a > < / span > ​ (float[] input,
long[] shape)< / code > < / th >
< td class = "colLast" >
< div class = "block" > Reshapes a float array into the desired n-dimensional array assuming the float array is stored
in n-dimensional row-major order.< / div >
2019-12-15 20:58:06 +00:00
< / td >
< / tr >
< tr id = "i14" class = "altColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#reshape(int%5B%5D,long%5B%5D)" > reshape< / a > < / span > ​ (int[] input,
long[] shape)< / code > < / th >
< td class = "colLast" >
< div class = "block" > Reshapes an int array into the desired n-dimensional array, assuming the int array is stored in
n-dimensional row-major order.< / div >
2019-12-15 20:58:06 +00:00
< / td >
< / tr >
< tr id = "i15" class = "rowColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#reshape(long%5B%5D,long%5B%5D)" > reshape< / a > < / span > ​ (long[] input,
long[] shape)< / code > < / th >
< td class = "colLast" >
< div class = "block" > Reshapes a long array into the desired n-dimensional array, assuming the long array is stored
in n-dimensional row-major order.< / div >
2019-12-15 20:58:06 +00:00
< / td >
< / tr >
< tr id = "i16" class = "altColor" >
2022-08-12 19:55:22 +00:00
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#reshape(short%5B%5D,long%5B%5D)" > reshape< / a > < / span > ​ (short[] input,
long[] shape)< / code > < / th >
< td class = "colLast" >
< div class = "block" > Reshapes a short array into the desired n-dimensional array assuming the short array is stored
in n-dimensional row-major order.< / div >
< / td >
< / tr >
< tr id = "i17" class = "rowColor" >
< td class = "colFirst" > < code > static java.lang.Object< / code > < / td >
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#reshape(java.lang.String%5B%5D,long%5B%5D)" > reshape< / a > < / span > ​ (java.lang.String[] input,
long[] shape)< / code > < / th >
< td class = "colLast" >
< div class = "block" > Reshapes a String array into the desired n-dimensional array assuming the String array is
stored in n-dimensional row-major order.< / div >
< / td >
< / tr >
< tr id = "i18" class = "altColor" >
2019-12-15 20:58:06 +00:00
< td class = "colFirst" > < code > static long[]< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#transformShape(int%5B%5D)" > transformShape< / a > < / span > ​ (int[] shape)< / code > < / th >
< td class = "colLast" >
2019-12-15 20:58:06 +00:00
< div class = "block" > Converts an int shape into a long shape.< / div >
< / td >
< / tr >
2022-08-12 19:55:22 +00:00
< tr id = "i19" class = "rowColor" >
2019-12-15 20:58:06 +00:00
< td class = "colFirst" > < code > static int[]< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#transformShape(long%5B%5D)" > transformShape< / a > < / span > ​ (long[] shape)< / code > < / th >
< td class = "colLast" >
2019-12-15 20:58:06 +00:00
< div class = "block" > Converts an long shape into a int shape.< / div >
< / td >
< / tr >
2022-08-12 19:55:22 +00:00
< tr id = "i20" class = "altColor" >
2019-12-15 20:58:06 +00:00
< td class = "colFirst" > < code > static boolean< / code > < / td >
2022-08-12 19:55:22 +00:00
< th class = "colSecond" scope = "row" > < code > < span class = "memberNameLink" > < a href = "#validateShape(long%5B%5D)" > validateShape< / a > < / span > ​ (long[] shape)< / code > < / th >
< td class = "colLast" >
2019-12-15 20:58:06 +00:00
< div class = "block" > Checks that the shape is a valid shape for a Java array (i.e.< / div >
< / td >
< / tr >
< / table >
< ul class = "blockList" >
2022-08-12 19:55:22 +00:00
< li class = "blockList" > < a id = "methods.inherited.from.class.java.lang.Object" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< h3 > Methods inherited from class java.lang.Object< / h3 >
< code > clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait< / code > < / li >
< / ul >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< / section >
2019-12-15 20:58:06 +00:00
< / li >
< / ul >
< / div >
< div class = "details" >
< ul class = "blockList" >
< li class = "blockList" >
<!-- ============ METHOD DETAIL ========== -->
2023-01-20 00:21:07 +00:00
< section >
2019-12-15 20:58:06 +00:00
< ul class = "blockList" >
2022-08-12 19:55:22 +00:00
< li class = "blockList" > < a id = "method.detail" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< h3 > Method Detail< / h3 >
2022-08-12 19:55:22 +00:00
< a id = "transformShape(long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > transformShape< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static int[] transformShape​ (long[] shape)< / pre >
2019-12-15 20:58:06 +00:00
< div class = "block" > Converts an long shape into a int shape.
2022-08-12 19:55:22 +00:00
< p > Validates that the shape has more than 1 elements, less than 9 elements, each element is
less than < code > Integer.MAX_VALUE< / code > and that each entry is non-negative.< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The long shape.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > The int shape.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "transformShape(int[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > transformShape< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static long[] transformShape​ (int[] shape)< / pre >
2019-12-15 20:58:06 +00:00
< div class = "block" > Converts an int shape into a long shape.
2022-08-12 19:55:22 +00:00
< p > Validates that the shape has more than 1 element, less than 9 elements and that each entry
is non-negative.< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The int shape.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > The long shape.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "newBooleanArray(long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > newBooleanArray< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object newBooleanArray​ (long[] shape)< / pre >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive boolean array of up to 8 dimensions, using the supplied shape.
2022-08-12 19:55:22 +00:00
2019-12-15 20:58:06 +00:00
< p > < / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The shape of array to create.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > A boolean array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "newByteArray(long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > newByteArray< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object newByteArray​ (long[] shape)< / pre >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive byte array of up to 8 dimensions, using the supplied shape.
2022-08-12 19:55:22 +00:00
2019-12-15 20:58:06 +00:00
< p > < / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The shape of array to create.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > A byte array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "newShortArray(long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > newShortArray< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object newShortArray​ (long[] shape)< / pre >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive short array of up to 8 dimensions, using the supplied shape.
2022-08-12 19:55:22 +00:00
2019-12-15 20:58:06 +00:00
< p > < / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The shape of array to create.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > A short array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "newIntArray(long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > newIntArray< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object newIntArray​ (long[] shape)< / pre >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive int array of up to 8 dimensions, using the supplied shape.
2022-08-12 19:55:22 +00:00
2019-12-15 20:58:06 +00:00
< p > < / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The shape of array to create.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > A int array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "newLongArray(long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > newLongArray< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object newLongArray​ (long[] shape)< / pre >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive long array of up to 8 dimensions, using the supplied shape.
2022-08-12 19:55:22 +00:00
2019-12-15 20:58:06 +00:00
< p > < / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The shape of array to create.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > A long array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "newFloatArray(long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > newFloatArray< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object newFloatArray​ (long[] shape)< / pre >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive float array of up to 8 dimensions, using the supplied shape.
2022-08-12 19:55:22 +00:00
2019-12-15 20:58:06 +00:00
< p > < / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The shape of array to create.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > A float array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "newDoubleArray(long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > newDoubleArray< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object newDoubleArray​ (long[] shape)< / pre >
2019-12-15 20:58:06 +00:00
< div class = "block" > Creates a new primitive double array of up to 8 dimensions, using the supplied shape.
2022-08-12 19:55:22 +00:00
< p > < / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The shape of array to create.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > A double array.< / dd >
< / dl >
< / li >
< / ul >
< a id = "newStringArray(long[])" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > newStringArray< / h4 >
< pre class = "methodSignature" > public static java.lang.Object newStringArray​ (long[] shape)< / pre >
< div class = "block" > Creates a new String array of up to 8 dimensions, using the supplied shape.
2019-12-15 20:58:06 +00:00
< p > < / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The shape of array to create.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > A double array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "reshape(boolean[],long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > reshape< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object reshape​ (boolean[] input,
2019-12-15 20:58:06 +00:00
long[] shape)< / pre >
2022-08-12 19:55:22 +00:00
< div class = "block" > Reshapes a boolean array into the desired n-dimensional array assuming the boolean array is
stored in n-dimensional row-major order. Throws < code > IllegalArgumentException< / code > if the number
of elements doesn't match between the shape and the input or the shape is invalid.< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > input< / code > - The boolean array.< / dd >
< dd > < code > shape< / code > - The desired shape.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > An n-dimensional boolean array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "reshape(byte[],long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > reshape< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object reshape​ (byte[] input,
2019-12-15 20:58:06 +00:00
long[] shape)< / pre >
2022-08-12 19:55:22 +00:00
< div class = "block" > Reshapes a byte array into the desired n-dimensional array assuming the byte array is stored in
n-dimensional row-major order. Throws < code > IllegalArgumentException< / code > if the number of
elements doesn't match between the shape and the input or the shape is invalid.< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > input< / code > - The byte array.< / dd >
< dd > < code > shape< / code > - The desired shape.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > An n-dimensional byte array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "reshape(short[],long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > reshape< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object reshape​ (short[] input,
2019-12-15 20:58:06 +00:00
long[] shape)< / pre >
2022-08-12 19:55:22 +00:00
< div class = "block" > Reshapes a short array into the desired n-dimensional array assuming the short array is stored
in n-dimensional row-major order. Throws < code > IllegalArgumentException< / code > if the number of
elements doesn't match between the shape and the input or the shape is invalid.< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > input< / code > - The short array.< / dd >
< dd > < code > shape< / code > - The desired shape.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > An n-dimensional short array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "reshape(int[],long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > reshape< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object reshape​ (int[] input,
2019-12-15 20:58:06 +00:00
long[] shape)< / pre >
2022-08-12 19:55:22 +00:00
< div class = "block" > Reshapes an int array into the desired n-dimensional array, assuming the int array is stored in
n-dimensional row-major order. Throws < code > IllegalArgumentException< / code > if the number of
elements doesn't match between the shape and the input or the shape is invalid.< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > input< / code > - The int array.< / dd >
< dd > < code > shape< / code > - The desired shape.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > An n-dimensional int array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "reshape(long[],long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > reshape< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object reshape​ (long[] input,
2019-12-15 20:58:06 +00:00
long[] shape)< / pre >
2022-08-12 19:55:22 +00:00
< div class = "block" > Reshapes a long array into the desired n-dimensional array, assuming the long array is stored
in n-dimensional row-major order. Throws < code > IllegalArgumentException< / code > if the number of
elements doesn't match between the shape and the input or the shape is invalid.< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > input< / code > - The long array.< / dd >
< dd > < code > shape< / code > - The desired shape.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > An n-dimensional long array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "reshape(float[],long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > reshape< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object reshape​ (float[] input,
2019-12-15 20:58:06 +00:00
long[] shape)< / pre >
2022-08-12 19:55:22 +00:00
< div class = "block" > Reshapes a float array into the desired n-dimensional array assuming the float array is stored
in n-dimensional row-major order. Throws < code > IllegalArgumentException< / code > if the number of
elements doesn't match between the shape and the input or the shape is invalid.< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > input< / code > - The float array.< / dd >
< dd > < code > shape< / code > - The desired shape.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > An n-dimensional float array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "reshape(double[],long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > reshape< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.Object reshape​ (double[] input,
2019-12-15 20:58:06 +00:00
long[] shape)< / pre >
2022-08-12 19:55:22 +00:00
< div class = "block" > Reshapes a double array into the desired n-dimensional array assuming the double array is
stored in n-dimensional row-major order. Throws < code > IllegalArgumentException< / code > if the number
of elements doesn't match between the shape and the input or the shape is invalid.< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > input< / code > - The double array.< / dd >
< dd > < code > shape< / code > - The desired shape.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > An n-dimensional double array.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "reshape(java.lang.String[],long[])" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > reshape< / h4 >
< pre class = "methodSignature" > public static java.lang.Object reshape​ (java.lang.String[] input,
long[] shape)< / pre >
< div class = "block" > Reshapes a String array into the desired n-dimensional array assuming the String array is
stored in n-dimensional row-major order. Throws < code > IllegalArgumentException< / code > if the number
of elements doesn't match between the shape and the input or the shape is invalid.< / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > input< / code > - The double array.< / dd >
< dd > < code > shape< / code > - The desired shape.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > An n-dimensional String array.< / dd >
< / dl >
< / li >
< / ul >
< a id = "elementCount(long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > elementCount< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static long elementCount​ (long[] shape)< / pre >
2019-12-15 20:58:06 +00:00
< div class = "block" > Counts the number of elements stored in a Tensor of this shape.
2022-08-12 19:55:22 +00:00
< p > Multiplies all the elements together if they are positive, throws an < code > IllegalArgumentException< / code > otherwise.< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The shape to use.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > The number of elements.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "validateShape(long[])" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > validateShape< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static boolean validateShape​ (long[] shape)< / pre >
< div class = "block" > Checks that the shape is a valid shape for a Java array (i.e. that the values are all positive
and representable by an int).< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > shape< / code > - The shape to check.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > True if the shape is valid.< / dd >
< / dl >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< a id = "flattenString(java.lang.Object)" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "blockListLast" >
< li class = "blockList" >
< h4 > flattenString< / h4 >
2022-08-12 19:55:22 +00:00
< pre class = "methodSignature" > public static java.lang.String[] flattenString​ (java.lang.Object o)< / pre >
< div class = "block" > Flatten a multidimensional String array into a single dimensional String array, reading it in a
multidimensional row-major order.< / div >
2019-12-15 20:58:06 +00:00
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > o< / code > - A multidimensional String array.< / dd >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > A single dimensional String array.< / dd >
< / dl >
< / li >
< / ul >
< / li >
< / ul >
2022-08-12 19:55:22 +00:00
< / section >
2019-12-15 20:58:06 +00:00
< / li >
< / ul >
< / div >
< / div >
2022-08-12 19:55:22 +00:00
< / main >
2019-12-15 20:58:06 +00:00
<!-- ========= END OF CLASS DATA ========= -->
2022-08-12 19:55:22 +00:00
< footer role = "contentinfo" >
< nav role = "navigation" >
2019-12-15 20:58:06 +00:00
<!-- ======= START OF BOTTOM NAVBAR ====== -->
2022-08-12 19:55:22 +00:00
< div class = "bottomNav" > < a id = "navbar.bottom" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< div class = "skipNav" > < a href = "#skip.navbar.bottom" title = "Skip navigation links" > Skip navigation links< / a > < / div >
2022-08-12 19:55:22 +00:00
< a id = "navbar.bottom.firstrow" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a >
< ul class = "navList" title = "Navigation" >
2022-08-12 19:55:22 +00:00
< li > < a href = "../../index.html" > Overview< / a > < / li >
< li > < a href = "package-summary.html" > Package< / a > < / li >
2019-12-15 20:58:06 +00:00
< li class = "navBarCell1Rev" > Class< / 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" id = "allclasses_navbar_bottom" >
2022-08-12 19:55:22 +00:00
< li > < a href = "../../allclasses.html" > All Classes< / a > < / li >
2019-12-15 20:58:06 +00:00
< / 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 >
2022-08-12 19:55:22 +00:00
< noscript >
< div > JavaScript is disabled on your browser.< / div >
< / noscript >
2019-12-15 20:58:06 +00:00
< / div >
< div >
< ul class = "subNavList" >
< li > Summary: < / li >
< li > Nested | < / li >
< li > Field | < / li >
< li > Constr | < / li >
< li > < a href = "#method.summary" > Method< / a > < / li >
< / ul >
< ul class = "subNavList" >
< li > Detail: < / li >
< li > Field | < / li >
< li > Constr | < / li >
< li > < a href = "#method.detail" > Method< / a > < / li >
< / ul >
< / div >
2022-08-12 19:55:22 +00:00
< a id = "skip.navbar.bottom" >
2019-12-15 20:58:06 +00:00
<!-- -->
< / a > < / div >
<!-- ======== END OF BOTTOM NAVBAR ======= -->
2022-08-12 19:55:22 +00:00
< / nav >
< / footer >
2019-12-15 20:58:06 +00:00
< / body >
< / html >