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

📄 mergetree.h

📁 有计算机图形学、图像处理、dbms、sniffer、中游俄罗斯外挂、othello、遗传算法、舌苔分析等程序。
💻 H
字号:
// MergeTree.h: interface for the CMergeTree class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MERGETREE_H__86B8334F_62DB_4669_A06C_EA1AF1C61294__INCLUDED_)
#define AFX_MERGETREE_H__86B8334F_62DB_4669_A06C_EA1AF1C61294__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "BTNODE.h"
#include "Memory.h"
//#include "IndexFile.h"
//#include "Buffer.h"
#include "Result.h"

class CMergeTree  
{
public:
	BYTE KeyNum;
	BYTE KeyType;
	WORD KeyLength;
    unsigned short M;
	BTNODE *m_root;
	BTNODE * m_sqt;
	UINT CurrentFile;
	BOOL Dup;//是否允许重复键.与KEY中的Dup不同
	//double m_dbFillDegree;
	//unsigned int m_uiKeyCount;
	//unsigned int m_uiEffectKey;
	PDB ROOT;
	PDB SQT;

public:
	//BOOL DeleteKey(BTNODE *pNode,KEY x,int pos);
	//CBplusTree & operator =(CBplusTree &T);
	CResult SearchBTree(KEY key);
	int InsertBTree(KEY key,PDB db_addr,PDB pdbNode,int   pos);
	CMergeTree();
	CMergeTree(BOOL D,BYTE KT,BYTE KN,UINT currentf);
	virtual ~CMergeTree();
protected:
    BOOL InsertKey(BTNODE *pNode,KEY x,PDB db_addr,int pos,BTNODE *pApNode);
private:
	int Position(BTNODE *pNode,BTNODE *parent);
	void NewRoot(BTNODE *pNode,KEY key,BTNODE *pApNode,PDB key_db_addr);//key_db_addr只在没有根结点时使用
	int Position(KEY key,BTNODE *pNode);
	KEY Split(BTNODE *pNode,unsigned int s,BTNODE *pApNode);//改变next和keynum
};

#endif // !defined(AFX_MERGETREE_H__86B8334F_62DB_4669_A06C_EA1AF1C61294__INCLUDED_)

⌨️ 快捷键说明

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