资源简介
代码片段和文件信息
package rtree;
import java.util.*;
import java.io.*;
/**
* Implements basic functions of Node interface. Also implements splitting functions.
*
* Created: Tue May 18 15:57:56 1999
*
* @author Hadjieleftheriou Marios
* @version 1.1
*/
public abstract class AbstractNode implements Node {
/** Level of this node. Leaves always have a level equal to 0. */
protected int level;
/** Parent of all nodes. */
protected transient RTree tree;
/** The pageNumber where the parent of this node is stored. */
protected int parent;
/** The pageNumber where this node is stored. */
protected int pageNumber;
/**
* All node data are stored into this array. It must have a size of nodeCapacity + 1 to hold
* all data plus an overflow HyperCube when the node must be split.
*/
protected HyperCube[] data;
/**
* Holds the pageNumbers containing the children of this node. Always has same size with the data array.
* If this is a Leaf node than all branches should point to the real data objects.
*/
protected int[] branches;
/** How much space is used up into this node. If equal to nodeCapacity then node is full. */
protected int usedSpace;
//
// Initialization.
//
protected AbstractNode(RTree tree int parent int pageNumber int level) {
this.parent = parent;
this.tree = tree;
this.pageNumber = pageNumber;
this.level = level;
data = new HyperCube[tree.getNodeCapacity()+1];
branches = new int[tree.getNodeCapacity()+1];
usedSpace = 0;
}
//
// Node interface.
//
/**
* Returns the node level. Always zero for leaf nodes.
*
* @return Level of node.
*/
public int getLevel() {
return level;
}
/**
* Returns true if this node is the root node.
*/
public boolean isRoot() {
return (parent == RTree.NIL);
}
/**
* Returns true if this node is an Index. Root node is an Index too unless it is a Leaf.
*/
public boolean isIndex() {
return (level != 0);
}
/**
* Returns true if this node is a Leaf. Root may be a Leaf too.
*/
public boolean isLeaf() {
return (level == 0);
}
/**
* Returns the mbb of all HyperCubes present in this node.
*
* @return A new HyperCube object representing the mbb of this node.
*/
public HyperCube getNodeMbb() {
if (usedSpace > 0) {
HyperCube[] h = new HyperCube[usedSpace];
System.arraycopy(data 0 h 0 usedSpace);
return HyperCube.getUnionMbb(h);
} else {
return new HyperCube(new Point(new float[] {0 0}) new Point(new float[] {0 0}));
}
}
/**
* Returns a unique id for this node. The page number is unique for every node but
* it doen‘t signify anything about where in the path from the root this node lies it is random.
* This function returns a point separated list of page numbers from the root up to the
* current node. It is expensive though
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 13639 1999-12-07 13:08 AbstractNode.java
文件 3657 1999-12-07 13:03 CachedPersistentPageFile.java
文件 183 1999-12-07 10:21 Comparator.java
文件 399 1999-12-07 16:07 Data.java
目录 0 1999-12-10 11:43 doc\
文件 98 1999-10-23 20:09 doc.bat
文件 1660 1999-12-10 11:43 doc\allclasses-fr
文件 3518 1999-12-10 11:43 doc\deprecated-list.html
文件 7292 1999-12-10 11:43 doc\help-doc.html
文件 36133 1999-12-10 11:43 doc\index-all.html
文件 660 1999-12-10 11:45 doc\index.html
文件 5208 1999-12-10 11:43 doc\overview-tree.html
文件 0 1999-12-10 11:43 doc\package-list
文件 684 1999-12-10 11:43 doc\packages.html
目录 0 1999-12-10 11:43 doc\rtree\
文件 27649 1999-12-10 11:43 doc\rtree\AbstractNode.html
文件 13257 1999-12-10 11:43 doc\rtree\CachedPersistentPageFile.html
目录 0 1999-12-10 11:43 doc\rtree\class-use\
文件 17231 1999-12-10 11:43 doc\rtree\class-use\AbstractNode.html
文件 3911 1999-12-10 11:43 doc\rtree\class-use\CachedPersistentPageFile.html
文件 4802 1999-12-10 11:43 doc\rtree\class-use\Comparator.html
文件 3771 1999-12-10 11:43 doc\rtree\class-use\Data.html
文件 19513 1999-12-10 11:43 doc\rtree\class-use\HyperCube.html
文件 3778 1999-12-10 11:43 doc\rtree\class-use\Index.html
文件 7150 1999-12-10 11:43 doc\rtree\class-use\Leaf.html
文件 3841 1999-12-10 11:43 doc\rtree\class-use\MemoryPageFile.html
文件 5251 1999-12-10 11:43 doc\rtree\class-use\Node.html
文件 9618 1999-12-10 11:43 doc\rtree\class-use\PageFaultError.html
文件 7312 1999-12-10 11:43 doc\rtree\class-use\PageFile.html
文件 4887 1999-12-10 11:43 doc\rtree\class-use\PersistentPageFile.html
文件 9243 1999-12-10 11:43 doc\rtree\class-use\Point.html
............此处省略29个文件信息
- 上一篇:JAVAEE图书管理系统
- 下一篇:java实现的sift全部代码
相关资源
- java实现的sift全部代码
- JAVAEE图书管理系统
- java 简单购物车
- JAVA学生教师信息录入小系统
- servlet jar包
- hibernate.jar
- java 复数的类Complex
-
Java+sql数据库+fr
ame图形化界面 - 会议室预定系统java
- java画出一个八边形
- JAVA在服务器端和客户端传输图片和文
- myaql5.0.8驱动程序jar包:mysql-connector
- 超市收银系统 JAVA
- java实现基于websocket的聊天室
- Java反序列化生成Payload附利用脚本
- 达梦数据库jar包包含达梦67
- GsonFormat
-
javax.xm
l.bind.jar - JAVA 音频文件PCM转WAV Utils类
- java读取注册表的简单方法
- 魔板游戏java报告
- java(Mysql)简单的用户登录和注册
- 疯狂Java讲义(第4版)地址.txt
- java实现基于服务器的签到系统
- java 学生成绩管理系统 源代码
- JavaFx 2.X 记事本
- 《Java Web从入门到精通》 明日科技 随
- java反弹球的程序
- java2word.jar
- java学生管理系统 源代码和实验报告
评论
共有 条评论