Library Classes


MT class

This class implements the M-tree index structure; it is a sub-class of the basic GiST class. Objects of the MT class can be created as usual, and linked to a file stored on disk by using the Open method of the GiSTclass, providing the file name. As an example:


MT *tree=new MT;
tree->Open("index.M3");
... // use of the tree
delete tree;

Methods and attributes

Object class

Instances of this class are the objects indexed by the M-tree. This is the only class in the whole project that needs a redefinition according to the application defined by the user.

When the user redefines the Object class, he/she has to provide all the information necessary to compute the distance between two Objects. Attributes of the Object class, therefore, are represented only by such information (e.g. in the vector space example, the only attribute of the Object class is the array of the coordinates).

Besides, a number of methods should be redefined, in order to obtain the desired behavior for the indexed objects.

Methods and attributes

Other Functions

MTkey class

This class contains the representation of the metric space region associated to each entry of the M-tree. Since the M-tree uses balls to organize the space, each region is defined by an Object (the center of the region) and a radius.

Methods and attributes

MTpenalty class

This is a service class which should never be istantiated nor referred by the user. It is a redefinition of the basic Penalty class of GiST and it is used when inserting objects in the M-tree.

MTentry class

Instances of the MTentry class are the entries contained in each node and represent nodes at the next lower level for internal nodes, and objects for leaf nodes.

Methods and attributes

MTfile class

This is a redefinition of the basic GiSTfile class in order to do some book-keeping, like counting disk access requests, etc.

The user can modify the size in bytes of each disk page (through the PageSize method) in order to tailor nodes fanout for his/her application.

Methods and attributes

MTnode class

The MTnode class implements the logic for inserting an entry in a node and for node splitting. This is a service class which should never be istantiated nor referred by the user.

MTpred class

This is the base class for predicates supported by M-tree. It is a virtual class and simple predicates are defined by way of the Pred sub-class, whereas complex predicates for the fuzzy language are defined by way of the AndPred, OrPred, and NotPred sub-classes. If the user wishes to define other complex predicates, such as those created by using the "weighted sum" language, he/she has to derive sub-classes from the MTpred class, and to compose predicates using the Pred class.

Methods and attributes

Pred class

Objects of this class are simple predicates, i.e. leaves of the predicate tree. Each Pred contains the reference to a simple Object, and the distance between the predicate and an object is simply computed as the distance between the two Objects.

Methods and attributes

AndPred class

This class defines the conjunction between two sub-predicates. The semantics of the conjunction is given through the query_language variable, assuming one of the following values:

and the two functions:

Methods and attributes

OrPred class

This class defines the disjunction between two sub-predicates. The semantics of the disjunction is given in the same way of the conjunction.

Methods and attributes

NotPred class

This class defines the negation of a predicate. The distance between an Object o and a negated predicate p is given as:


Dist2Sim(1-Sim2Dist(p->Pred()->distance(o)))

Methods and attributes

MTquery class

This is the base class for range queries supported by M-tree.

Methods and attributes

SimpleQuery class

This class implements the simple range query. It is used in the MT::RangeSearch() method.

Methods and attributes

TopQuery class

This class implements the simple top query. It is used in the MT::TopSearch() method.

Methods and attributes

MTcursor class

This class implements the sorted access for the M-tree index structure.

Methods and attributes