📄 node.html
字号:
<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#Node()">Node</A></B>()</CODE>
<BR>
This is only for subclasses</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#Node(java.io.RandomAccessFile, java.lang.String, long, boolean, rtree.Element[], rtree.FileHdr, int, long, int, int, boolean, rtree.Rect)">Node</A></B>(java.io.RandomAccessFile file, java.lang.String fileName, long nodeIndex, boolean sorted, <A HREF="../rtree/Element.html" title="class in rtree">Element</A>[] elmts, <A HREF="../rtree/FileHdr.html" title="class in rtree">FileHdr</A> fileHdr, int totalElements, long parent, int elmtSize, int elmtType, boolean dirty, <A HREF="../rtree/Rect.html" title="class in rtree">Rect</A> nodeMBR)</CODE>
<BR>
A stupid internal constructor for the clone method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#Node(java.io.RandomAccessFile, java.lang.String, long, rtree.FileHdr)">Node</A></B>(java.io.RandomAccessFile file, java.lang.String fileName, long ndIndex, <A HREF="../rtree/FileHdr.html" title="class in rtree">FileHdr</A> flHdr)</CODE>
<BR>
Reading existing nodes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#Node(java.io.RandomAccessFile, java.lang.String, long, int, rtree.FileHdr)">Node</A></B>(java.io.RandomAccessFile file, java.lang.String fileName, long prnt, int elmtType, <A HREF="../rtree/FileHdr.html" title="class in rtree">FileHdr</A> flHdr)</CODE>
<BR>
for a new node Remember if the file is new this constructor will overwrite the <code>parent</code> parameter with 'NOT_DEFINED' as it will be the root node.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#clone()">clone</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#deleteElement(int, boolean)">deleteElement</A></B>(int index, boolean force)</CODE>
<BR>
This method delets the element with the given index from the node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#deleteNode()">deleteNode</A></B>()</CODE>
<BR>
Adds the node to the free stack.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#flush()">flush</A></B>()</CODE>
<BR>
This is a new methos that will help the phylosophy where one should write to tbe cache only when required.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../rtree/Element.html" title="class in rtree">Element</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#getAllElements()">getAllElements</A></B>()</CODE>
<BR>
Although it returns all the elements but the total elements will not be equal to the length of the returned array.Therefore <br><b>Never Use <code>.length</code> field With the Returned Array </b>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) <A HREF="../rtree/Rect.html" title="class in rtree">Rect</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#getAllRectangles()">getAllRectangles</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) <A HREF="../rtree/Element.html" title="class in rtree">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#getElement(int)">getElement</A></B>(int index)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#getElementIndex(long)">getElementIndex</A></B>(long ptr)</CODE>
<BR>
returns index of the element with the pointer passed in the parameter</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#getElementType()">getElementType</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../rtree/Element.html" title="class in rtree">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#getLeastEnlargement(rtree.Element)">getLeastEnlargement</A></B>(<A HREF="../rtree/Element.html" title="class in rtree">Element</A> elmt)</CODE>
<BR>
Returns the element(of the current node) whose rectangle needs the least enlargment to include <code>elmt</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#getNodeIndex()">getNodeIndex</A></B>()</CODE>
<BR>
will return the index of the node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../rtree/Rect.html" title="class in rtree">Rect</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#getNodeMBR()">getNodeMBR</A></B>()</CODE>
<BR>
This function runs a loop on the elements to calculate the total MBR.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#getParent()">getParent</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#getTotalElements()">getTotalElements</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#insertElement(rtree.Element)">insertElement</A></B>(<A HREF="../rtree/Element.html" title="class in rtree">Element</A> elmt)</CODE>
<BR>
to add an element at the end As elements are allocated to this node, each allocated element's children node's parent are reset.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#insertElement(rtree.Element[], boolean)">insertElement</A></B>(<A HREF="../rtree/Element.html" title="class in rtree">Element</A>[] elmts, boolean updateChldrn)</CODE>
<BR>
to add more than onr element at the end.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#isDirty()">isDirty</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#isInsertPossible()">isInsertPossible</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#lnrPickSeeds(rtree.Element[])">lnrPickSeeds</A></B>(<A HREF="../rtree/Element.html" title="class in rtree">Element</A>[] elmts)</CODE>
<BR>
The linear Pick Seed method from Guttman.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#modifyElement(int, rtree.Element)">modifyElement</A></B>(int index, <A HREF="../rtree/Element.html" title="class in rtree">Element</A> elmt)</CODE>
<BR>
Used to overwrite the old Element with the new one.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#modifyElement(int, long)">modifyElement</A></B>(int index, long pointer)</CODE>
<BR>
Overloaded</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#modifyElement(int, rtree.Rect)">modifyElement</A></B>(int index, <A HREF="../rtree/Rect.html" title="class in rtree">Rect</A> rect)</CODE>
<BR>
Overloaded</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#quadPickSeeds(rtree.Element[])">quadPickSeeds</A></B>(<A HREF="../rtree/Element.html" title="class in rtree">Element</A>[] elmts)</CODE>
<BR>
The quadratic Pick Seed method from Guttman.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private <A HREF="../rtree/Element.html" title="class in rtree">Element</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#readElement(long)">readElement</A></B>(long index)</CODE>
<BR>
<B>Deprecated.</B> <I>In-fact it has never been used except in early development days.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#refreshNode()">refreshNode</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#refreshNodeMBR()">refreshNodeMBR</A></B>()</CODE>
<BR>
Will refresh the <code>nodeMBR</code> for the <code>elements</code></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#seekCurrNode()">seekCurrNode</A></B>()</CODE>
<BR>
this function simply places the file pointer, it does not check for any condition like placing the pointer beyond the end of file</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#seekElement(int)">seekElement</A></B>(int elmtIndex)</CODE>
<BR>
seek the specified element.No checking</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#seekElementPtr(int)">seekElementPtr</A></B>(int elmtIndex)</CODE>
<BR>
seek the specified element's pointer.No checking</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#seekLastElement()">seekLastElement</A></B>()</CODE>
<BR>
Seek the last element of the node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#seekNode(long)">seekNode</A></B>(long nodeIdx)</CODE>
<BR>
seek the specified node</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#setDirty(boolean)">setDirty</A></B>(boolean val)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#setParent(long)">setParent</A></B>(long prnt)</CODE>
<BR>
No error echecking at all.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../rtree/Node.html" title="class in rtree">Node</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#splitNode(rtree.Element, long)">splitNode</A></B>(<A HREF="../rtree/Element.html" title="class in rtree">Element</A> elmtM1, long slotIndex)</CODE>
<BR>
See ./Logic.txt Linear split Algo.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../rtree/Node.html#sweepSort()">sweepSort</A></B>()</CODE>
<BR>
This method is added to sort the elements in this node to help sweepline algorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -