doublevector.html

来自「数据挖掘的最常用工具。由于开源」· HTML 代码 · 共 1,838 行 · 第 1/5 页

HTML
1,838
字号
<DL><DD>Constructs a vector directly from a double array<P><DL><DT><B>Parameters:</B><DD><CODE>v</CODE> - the array</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="set(int, double)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(int&nbsp;i,                double&nbsp;s)</PRE><DL><DD>Set a single element.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - Index.<DD><CODE>s</CODE> - a[i].</DL></DD></DL><HR><A NAME="set(double)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(double&nbsp;s)</PRE><DL><DD>Set all elements to a value<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the value</DL></DD></DL><HR><A NAME="set(int, int, double)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(int&nbsp;i0,                int&nbsp;i1,                double&nbsp;s)</PRE><DL><DD>Set some elements to a value<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i0</CODE> - the index of the first element<DD><CODE>i1</CODE> - the index of the second element<DD><CODE>s</CODE> - the value</DL></DD></DL><HR><A NAME="set(int, int, double[], int)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(int&nbsp;i0,                int&nbsp;i1,                double[]&nbsp;v,                int&nbsp;j0)</PRE><DL><DD>Set some elements using a 2-D array<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i0</CODE> - the index of the first element<DD><CODE>i1</CODE> - the index of the second element<DD><CODE>j0</CODE> - the index of the starting element in the 2-D array<DD><CODE>v</CODE> - the values</DL></DD></DL><HR><A NAME="set(weka.core.matrix.DoubleVector)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(<A HREF="../../../weka/core/matrix/DoubleVector.html" title="class in weka.core.matrix">DoubleVector</A>&nbsp;v)</PRE><DL><DD>Set the elements using a DoubleVector<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>v</CODE> - the DoubleVector</DL></DD></DL><HR><A NAME="set(int, int, weka.core.matrix.DoubleVector, int)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(int&nbsp;i0,                int&nbsp;i1,                <A HREF="../../../weka/core/matrix/DoubleVector.html" title="class in weka.core.matrix">DoubleVector</A>&nbsp;v,                int&nbsp;j0)</PRE><DL><DD>Set some elements using a DoubleVector.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i0</CODE> - the index of the first element<DD><CODE>i1</CODE> - the index of the second element<DD><CODE>v</CODE> - the DoubleVector<DD><CODE>j0</CODE> - the index of the starting element in the DoubleVector</DL></DD></DL><HR><A NAME="getArray()"><!-- --></A><H3>getArray</H3><PRE>public double[] <B>getArray</B>()</PRE><DL><DD>Access the internal one-dimensional array.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Pointer to the one-dimensional array of vector elements.</DL></DD></DL><HR><A NAME="getArrayCopy()"><!-- --></A><H3>getArrayCopy</H3><PRE>public double[] <B>getArrayCopy</B>()</PRE><DL><DD>Returns a copy of the DoubleVector usng a double array.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the one-dimensional array.</DL></DD></DL><HR><A NAME="sort()"><!-- --></A><H3>sort</H3><PRE>public void <B>sort</B>()</PRE><DL><DD>Sorts the array in place<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="sortWithIndex()"><!-- --></A><H3>sortWithIndex</H3><PRE>public <A HREF="../../../weka/core/matrix/IntVector.html" title="class in weka.core.matrix">IntVector</A> <B>sortWithIndex</B>()</PRE><DL><DD>Sorts the array in place with index returned<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="sortWithIndex(int, int, weka.core.matrix.IntVector)"><!-- --></A><H3>sortWithIndex</H3><PRE>public void <B>sortWithIndex</B>(int&nbsp;xi,                          int&nbsp;xj,                          <A HREF="../../../weka/core/matrix/IntVector.html" title="class in weka.core.matrix">IntVector</A>&nbsp;index)</PRE><DL><DD>Sorts the array in place with index changed<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>xi</CODE> - first index<DD><CODE>xj</CODE> - last index<DD><CODE>index</CODE> - array that stores all indices</DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Gets the size of the vector.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the size</DL></DD></DL><HR><A NAME="setSize(int)"><!-- --></A><H3>setSize</H3><PRE>public void <B>setSize</B>(int&nbsp;m)</PRE><DL><DD>Sets the size of the vector<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>m</CODE> - the size</DL></DD></DL><HR><A NAME="capacity()"><!-- --></A><H3>capacity</H3><PRE>public int <B>capacity</B>()</PRE><DL><DD>Gets the capacity of the vector.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the capacity.</DL></DD></DL><HR><A NAME="setCapacity(int)"><!-- --></A><H3>setCapacity</H3><PRE>public void <B>setCapacity</B>(int&nbsp;n)</PRE><DL><DD>Sets the capacity of the vector<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the capacity.</DL></DD></DL><HR><A NAME="get(int)"><!-- --></A><H3>get</H3><PRE>public double <B>get</B>(int&nbsp;i)</PRE><DL><DD>Gets a single element.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - Index.<DT><B>Returns:</B><DD>the value of the i-th element</DL></DD></DL><HR><A NAME="setPlus(int, double)"><!-- --></A><H3>setPlus</H3><PRE>public void <B>setPlus</B>(int&nbsp;i,                    double&nbsp;s)</PRE><DL><DD>Adds a value to an element<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the index of the element<DD><CODE>s</CODE> - the value</DL></DD></DL><HR><A NAME="setTimes(int, double)"><!-- --></A><H3>setTimes</H3><PRE>public void <B>setTimes</B>(int&nbsp;i,                     double&nbsp;s)</PRE><DL><DD>Multiplies a value to an element<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the index of the element<DD><CODE>s</CODE> - the value</DL></DD></DL><HR><A NAME="addElement(double)"><!-- --></A><H3>addElement</H3><PRE>public void <B>addElement</B>(double&nbsp;x)</PRE><DL><DD>Adds an element into the vector<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - the value of the new element</DL></DD></DL><HR><A NAME="square()"><!-- --></A><H3>square</H3><PRE>public <A HREF="../../../weka/core/matrix/DoubleVector.html" title="class in weka.core.matrix">DoubleVector</A> <B>square</B>()</PRE><DL><DD>Returns the squared vector<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="sqrt()"><!-- --></A><H3>sqrt</H3><PRE>public <A HREF="../../../weka/core/matrix/DoubleVector.html" title="class in weka.core.matrix">DoubleVector</A> <B>sqrt</B>()</PRE><DL><DD>Returns the square-root of all the elements in the vector<P><DD><DL></DL></DD><DD><DL></DL></DD>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?