TGS2.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (C) 2007  A.N. Yzelman
00003  *  Released under LGPL, see license.txt
00004  *
00005  *  Last modified at 1st of June, 2007, by A.N. Yzelman
00006  *
00007  *  TGS2.h: Definition of a bulk-loaded R-tree, intersection volume as measurement.
00008  *
00009  */
00010 
00011 #ifndef _H_TGS2
00012 #define _H_TGS2
00013 
00014 #include "TGS.h"
00015 #include "Cart.h"
00016 
00017 typedef Current_Metric Cart;
00018 
00020 template< typename base_tree >
00021 class TGS2_tree : public TGS_tree< base_tree > {
00022 
00023    protected:
00025         virtual double cost_function( const BB_type *x, const BB_type *y ) const;       
00026 
00027    public:
00029         TGS2_tree( R_tree_props *props ) : TGS_tree< base_tree >( props ) {}
00030         
00031 };
00032 
00033 template< typename base_tree >
00034 double TGS2_tree< base_tree >::cost_function( const BB_type *x, const BB_type *y ) const {
00035         return Current_Metric::Volume( x->intersect( *y ) );
00036         //return TGS_tree< base_tree >::cost_function( x, y ) + Current_Metric::Volume( x->intersect( *y ) );
00037 }
00038 
00039 #endif

Generated on Sat Oct 13 17:34:42 2007 for R-Tree by  doxygen 1.5.2