Tree-M

 view release on metacpan or  search on metacpan

GiST/GiST.cpp  view on Meta::CPAN


	// Get union of node
	GiSTentry *actual=node->Union();

	actual->SetPtr(node->Path().Page());
	if(!entry->IsEqual(*actual)) {
		int pos=entry->Position();

		P->DeleteEntry(pos);
		P->InsertBefore(*actual, pos);
		// A split may be necessary.
		// XXX: should we do Forced Reinsert here too?
		if(P->IsOverFull(*store)) {
			Split(parent, *actual);

			GiSTpage page=node->Path().Page();

			node->Path()=P->Path();
			node->Path().MakeChild(page);
		}
        else {

MT/MTnode.cpp  view on Meta::CPAN

#include <string.h>
#include "MT.h"
#include "MTpredicate.h"

double MIN_UTIL = 0.35;	// minimum node utilization
pp_function PROMOTE_PART_FUNCTION = CONFIRMED;	// promotion method
pv_function PROMOTE_VOTE_FUNCTION = mM_RAD;	// confirmed promotion method (if needed)
pp_function SECONDARY_PART_FUNCTION = RANDOM;	// root promotion method (can't use stored distances): used only for confirmed and MAX_UB_DIST methods
r_function RADIUS_FUNCTION = LB;	// mM_RAD promotion method (if needed)
int NUM_CANDIDATES = 10;	// number of candidates for sampling
s_function SPLIT_FUNCTION = BAL_G_HYPERPL;	// split method

extern int IOread;

// used to quick-sort the entries in a node according to their distance from the parent
int
MTentrycmp(const void *x, const void *y)
{
	double d=(*(MTentry **)x)->Key()->distance-(*(MTentry **)y)->Key()->distance;
	int i=0;



( run in 0.670 second using v1.01-cache-2.11-cpan-5511b514fd6 )