⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gvector.html

📁 JAVA多媒体开发类库说明
💻 HTML
📖 第 1 页 / 共 4 页
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#norm()">norm</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the square root of the sum of the squares of this vector (its length in n-dimensional space).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#normalize()">normalize</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Normalizes this vector in place.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#normalize(javax.vecmath.GVector)">normalize</A></B>(<A HREF="../../javax/vecmath/GVector.html" title="class in javax.vecmath">GVector</A>&nbsp;v1)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the normalization of vector v1.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#normSquared()">normSquared</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sum of the squares of this    vector (its length squared in n-dimensional space).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#scale(double)">scale</A></B>(double&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Scales this vector by the scale factor s.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#scale(double, javax.vecmath.GVector)">scale</A></B>(double&nbsp;s,      <A HREF="../../javax/vecmath/GVector.html" title="class in javax.vecmath">GVector</A>&nbsp;v1)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the scalar multiplication of the scale factor with the vector v1.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#scaleAdd(double, javax.vecmath.GVector, javax.vecmath.GVector)">scaleAdd</A></B>(double&nbsp;s,         <A HREF="../../javax/vecmath/GVector.html" title="class in javax.vecmath">GVector</A>&nbsp;v1,         <A HREF="../../javax/vecmath/GVector.html" title="class in javax.vecmath">GVector</A>&nbsp;v2)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the scalar multiplication by s of vector v1 plus vector v2 (this = s*v1 + v2).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#set(double[])">set</A></B>(double[]&nbsp;vector)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the values found in the array  parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#set(javax.vecmath.GVector)">set</A></B>(<A HREF="../../javax/vecmath/GVector.html" title="class in javax.vecmath">GVector</A>&nbsp;vector)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the values found in vector vector.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#set(javax.vecmath.Tuple2f)">set</A></B>(<A HREF="../../javax/vecmath/Tuple2f.html" title="class in javax.vecmath">Tuple2f</A>&nbsp;tuple)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the values in tuple</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#set(javax.vecmath.Tuple3d)">set</A></B>(<A HREF="../../javax/vecmath/Tuple3d.html" title="class in javax.vecmath">Tuple3d</A>&nbsp;tuple)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the values in tuple</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#set(javax.vecmath.Tuple3f)">set</A></B>(<A HREF="../../javax/vecmath/Tuple3f.html" title="class in javax.vecmath">Tuple3f</A>&nbsp;tuple)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the values in tuple</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#set(javax.vecmath.Tuple4d)">set</A></B>(<A HREF="../../javax/vecmath/Tuple4d.html" title="class in javax.vecmath">Tuple4d</A>&nbsp;tuple)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the values in tuple</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#set(javax.vecmath.Tuple4f)">set</A></B>(<A HREF="../../javax/vecmath/Tuple4f.html" title="class in javax.vecmath">Tuple4f</A>&nbsp;tuple)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the values in tuple</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#setElement(int, double)">setElement</A></B>(int&nbsp;index,           double&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Modifies the value at the specified index of this vector.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#setSize(int)">setSize</A></B>(int&nbsp;length)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changes the size of this vector dynamically.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#sub(javax.vecmath.GVector)">sub</A></B>(<A HREF="../../javax/vecmath/GVector.html" title="class in javax.vecmath">GVector</A>&nbsp;vector)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the vector difference of itself and vector (this = this - vector).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#sub(javax.vecmath.GVector, javax.vecmath.GVector)">sub</A></B>(<A HREF="../../javax/vecmath/GVector.html" title="class in javax.vecmath">GVector</A>&nbsp;vector1,    <A HREF="../../javax/vecmath/GVector.html" title="class in javax.vecmath">GVector</A>&nbsp;vector2)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of this vector to the vector difference of vectors vector1 and vector2 (this = vector1 - vector2).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#SVDBackSolve(javax.vecmath.GMatrix, javax.vecmath.GMatrix, javax.vecmath.GMatrix, javax.vecmath.GVector)">SVDBackSolve</A></B>(<A HREF="../../javax/vecmath/GMatrix.html" title="class in javax.vecmath">GMatrix</A>&nbsp;U,             <A HREF="../../javax/vecmath/GMatrix.html" title="class in javax.vecmath">GMatrix</A>&nbsp;W,             <A HREF="../../javax/vecmath/GMatrix.html" title="class in javax.vecmath">GMatrix</A>&nbsp;V,             <A HREF="../../javax/vecmath/GVector.html" title="class in javax.vecmath">GVector</A>&nbsp;b)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Solves for x in Ax = b, where x is this vector (nx1), A is mxn,  b is mx1, and A = U*W*transpose(V); U,W,V must  be precomputed and can be found by taking the singular value   decomposition (SVD) of A using the method SVD found in the   GMatrix class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string that contains the values of this GVector.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#zero()">zero</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets all the values in this vector to zero.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_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>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="GVector(int)"><!-- --></A><H3>GVector</H3><PRE>public <B>GVector</B>(int&nbsp;length)</PRE><DL><DD>Constructs a new GVector of the specified length with all vector elements initialized to 0.<P><DL><DT><B>Parameters:</B><DD><CODE>length</CODE> - the number of elements in this GVector.</DL></DL><HR><A NAME="GVector(double[])"><!-- --></A><H3>GVector</H3><PRE>public <B>GVector</B>(double[]&nbsp;vector)</PRE><DL><DD>Constructs a new GVector from the specified array elements. The length of this GVector is set to the length of the specified array.  The array elements are copied into this new GVector.<P><DL><DT><B>Parameters:</B><DD><CODE>vector</CODE> - the values for the new GVector.</DL></DL><HR><A NAME="GVector(javax.vecmath.GVector)"><!-- --></A><H3>GVector</H3><PRE>public <B>GVector</B>(<A HREF="../../javax/vecmath/GVector.html" title="class in javax.vecmath">GVector</A>&nbsp;vector)</PRE><DL><DD>Constructs a new GVector from the specified vector. The vector elements are copied into this new GVector.<P><DL><DT><B>Parameters:</B><DD><CODE>vector</CODE> - the source GVector for this new GVector.</DL></DL><HR><A NAME="GVector(javax.vecmath.Tuple2f)"><!-- --></A><H3>GVector</H3><PRE>public <B>GVector</B>(<A HREF="../../javax/vecmath/Tuple2f.html" title="class in javax.vecmath">Tuple2f</A>&nbsp;tuple)</PRE><DL><DD>Constructs a new GVector and copies the initial values from the specified tuple.<P><DL><DT><B>Parameters:</B><DD><CODE>tuple</CODE> - the source for the new GVector's initial values</DL></DL><HR><A NAME="GVector(javax.vecmath.Tuple3f)"><!-- --></A><H3>GVector</H3><PRE>public <B>GVector</B>(<A HREF="../../javax/vecmath/Tuple3f.html" title="class in javax.vecmath">Tuple3f</A>&nbsp;tuple)</PRE><DL><DD>Constructs a new GVector and copies the initial values from the specified tuple.<P><DL><DT><B>Parameters:</B><DD><CODE>tuple</CODE> - the source for the new GVector's initial values</DL></DL><HR><A NAME="GVector(javax.vecmath.Tuple3d)"><!-- --></A><H3>GVector</H3><PRE>public <B>GVector</B>(<A HREF="../../javax/vecmath/Tuple3d.html" title="class in javax.vecmath">Tuple3d</A>&nbsp;tuple)</PRE><DL><DD>Constructs a new GVector and copies the initial values from the specified tuple.<P><DL><DT><B>Parameters:</B><DD><CODE>tuple</CODE> - the source for the new GVector's initial values</DL></DL><HR><A NAME="GVector(javax.vecmath.Tuple4f)"><!-- --></A><H3>GVector</H3><PRE>public <B>GVector</B>(<A HREF="../../javax/vecmath/Tuple4f.html" title="class in javax.vecmath">Tuple4f</A>&nbsp;tuple)</PRE><DL><DD>Constructs a new GVector and copies the initial values from the specified tuple.<P><DL><DT><B>Parameters:</B><DD><CODE>tuple</CODE> - the source for the new GVector's initial values</DL></DL><HR><A NAME="GVector(javax.vecmath.Tuple4d)"><!-- --></A><H3>GVector</H3><PRE>public <B>GVector</B>(<A HREF="../../javax/vecmath/Tuple4d.html" title="class in javax.vecmath">Tuple4d</A>&nbsp;tuple)</PRE><DL><DD>Constructs a new GVector and copies the initial values from the specified tuple.<P><DL><DT><B>Parameters:</B><DD><CODE>tuple</CODE> - the source for the new GVector's initial values</DL></DL><HR><A NAME="GVector(double[], int)"><!-- --></A><H3>GVector</H3><PRE>public <B>GVector</B>(double[]&nbsp;vector,               int&nbsp;length)</PRE><DL><DD>Constructs a new GVector of the specified length and initializes it by copying the specified number of elements from the specified array.  The array must contain at least <code>length</code> elements (i.e., <code>vector.length</code> >= <code>length</code>.  The length of this new GVector is set to the specified length.<P><DL><DT><B>Parameters:</B><DD><CODE>vector</CODE> - The array from which the values will be copied.<DD><CODE>length</CODE> - The number of values copied from 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="norm()"><!-- --></A><H3>norm</H3><PRE>public final double <B>norm</B>()</PRE><DL><DD>Returns the square root of the sum of the squares of this vector (its length in n-dimensional space).<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>length of this vector</DL></DD></DL><HR><A NAME="normSquared()"><!-- --></A><H3>normSquared</H3><PRE>public final double <B>normSquared</B>()</PRE><DL><DD>Returns the sum of the squares of this    vector (its length squared in n-dimensional space).<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>length squared of this vector</DL>

⌨️ 快捷键说明

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