📄 intvector.html
字号:
setSize</H3><PRE>public void <B>setSize</B>(int size)</PRE><DL><DD>Sets the size of the vector. The provided size can't be greater than the capacity of the vector.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Size.</DL></DD></DL><HR><A NAME="set(int)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(int s)</PRE><DL><DD>Sets the value of an element.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the value for the element</DL></DD></DL><HR><A NAME="set(int, int, int[], int)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(int i0, int i1, int[] v, int j0)</PRE><DL><DD>Sets the values of elements from an int 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 last element<DD><CODE>v</CODE> - the int array that stores the values<DD><CODE>j0</CODE> - the index of the first element in the int array</DL></DD></DL><HR><A NAME="set(int, int, weka.classifiers.functions.pace.IntVector, int)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(int i0, int i1, <A HREF="../../../../weka/classifiers/functions/pace/IntVector.html" title="class in weka.classifiers.functions.pace">IntVector</A> v, int j0)</PRE><DL><DD>Sets the values of elements from another IntVector.<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 last element<DD><CODE>v</CODE> - the IntVector that stores the values<DD><CODE>j0</CODE> - the index of the first element in the IntVector</DL></DD></DL><HR><A NAME="set(weka.classifiers.functions.pace.IntVector)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(<A HREF="../../../../weka/classifiers/functions/pace/IntVector.html" title="class in weka.classifiers.functions.pace">IntVector</A> v)</PRE><DL><DD>Sets the values of elements from another IntVector.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>v</CODE> - the IntVector that stores the values</DL></DD></DL><HR><A NAME="seq(int, int)"><!-- --></A><H3>seq</H3><PRE>public static <A HREF="../../../../weka/classifiers/functions/pace/IntVector.html" title="class in weka.classifiers.functions.pace">IntVector</A> <B>seq</B>(int i0, int i1)</PRE><DL><DD>Generates an IntVector that stores all integers inclusively between two integers.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i0</CODE> - the first integer<DD><CODE>i1</CODE> - the second integer</DL></DD></DL><HR><A NAME="sort()"><!-- --></A><H3>sort</H3><PRE>public void <B>sort</B>()</PRE><DL><DD>Sorts the elements in place<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getArrayCopy()"><!-- --></A><H3>getArrayCopy</H3><PRE>public int[] <B>getArrayCopy</B>()</PRE><DL><DD>Returns a copy of the internal one-dimensional array.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>One-dimensional array copy of vector elements.</DL></DD></DL><HR><A NAME="capacity()"><!-- --></A><H3>capacity</H3><PRE>public int <B>capacity</B>()</PRE><DL><DD>Returns the capacity of the vector<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setCapacity(int)"><!-- --></A><H3>setCapacity</H3><PRE>public void <B>setCapacity</B>(int capacity)</PRE><DL><DD>Sets the capacity of the vector<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>capacity</CODE> - the new capacity of the vector</DL></DD></DL><HR><A NAME="set(int, int)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(int i, int s)</PRE><DL><DD>Sets a single 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 new value</DL></DD></DL><HR><A NAME="get(int)"><!-- --></A><H3>get</H3><PRE>public int <B>get</B>(int i)</PRE><DL><DD>Gets the value of an element.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the index of the element<DT><B>Returns:</B><DD>the value of the element</DL></DD></DL><HR><A NAME="copy()"><!-- --></A><H3>copy</H3><PRE>public <A HREF="../../../../weka/classifiers/functions/pace/IntVector.html" title="class in weka.classifiers.functions.pace">IntVector</A> <B>copy</B>()</PRE><DL><DD>Makes a deep copy of the vector<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public java.lang.Object <B>clone</B>()</PRE><DL><DD>Clones the IntVector object.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="subvector(int, int)"><!-- --></A><H3>subvector</H3><PRE>public <A HREF="../../../../weka/classifiers/functions/pace/IntVector.html" title="class in weka.classifiers.functions.pace">IntVector</A> <B>subvector</B>(int i0, int i1)</PRE><DL><DD>Returns a subvector.<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 last element<DT><B>Returns:</B><DD>the subvector</DL></DD></DL><HR><A NAME="subvector(weka.classifiers.functions.pace.IntVector)"><!-- --></A><H3>subvector</H3><PRE>public <A HREF="../../../../weka/classifiers/functions/pace/IntVector.html" title="class in weka.classifiers.functions.pace">IntVector</A> <B>subvector</B>(<A HREF="../../../../weka/classifiers/functions/pace/IntVector.html" title="class in weka.classifiers.functions.pace">IntVector</A> index)</PRE><DL><DD>Returns a subvector as indexed by an IntVector.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the subvector</DL></DD></DL><HR><A NAME="swap(int, int)"><!-- --></A><H3>swap</H3><PRE>public void <B>swap</B>(int i, int j)</PRE><DL><DD>Swaps the values stored at i and j<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the index i<DD><CODE>j</CODE> - the index j</DL></DD></DL><HR><A NAME="shift(int, int)"><!-- --></A><H3>shift</H3><PRE>public void <B>shift</B>(int i, int j)</PRE><DL><DD>Shifts an element to another position. Elements between them are shifted one position left.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the index of the element<DD><CODE>j</CODE> - the index of the new position</DL></DD></DL><HR><A NAME="shiftToEnd(int)"><!-- --></A><H3>shiftToEnd</H3><PRE>public void <B>shiftToEnd</B>(int j)</PRE><DL><DD>Shifts an element to the end of the vector. Elements between them are shifted one position left.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>j</CODE> - the index of the new position</DL></DD></DL><HR><A NAME="isEmpty()"><!-- --></A><H3>isEmpty</H3><PRE>public boolean <B>isEmpty</B>()</PRE><DL><DD>Returns true if the vector is empty<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Converts the IntVecor to a string<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="toString(int, boolean)"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>(int digits, boolean trailing)</PRE><DL><DD>Convert the IntVecor to a string<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>digits</CODE> - number of digits to be shown<DD><CODE>trailing</CODE> - true if trailing zeros are to be shown</DL></DD></DL><HR><A NAME="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</B>(java.lang.String[] args)</PRE><DL><DD>Tests the IntVector class<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../Tutorial.pdf"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/index.html"><FONT CLASS="NavBarFont1"><B>Weka's home</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../weka/classifiers/functions/pace/FloatingPointFormat.html" title="class in weka.classifiers.functions.pace"><B>PREV CLASS</B></A> <A HREF="../../../../weka/classifiers/functions/pace/Maths.html" title="class in weka.classifiers.functions.pace"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="IntVector.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -