LCOV - code coverage report
Current view: top level - util/cgm - AbstractTree.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 2 3 66.7 %
Date: 2020-06-30 00:58:45 Functions: 6 39 15.4 %
Branches: 3 8 37.5 %

           Branch data     Line data    Source code
       1                 :            : //------------------------------------------------------------------
       2                 :            : //- Class:   AbstractTree
       3                 :            : //- Author:  Kevin Albrecht 
       4                 :            : //- Created: 2 October 2003
       5                 :            : //-
       6                 :            : //- Description:
       7                 :            : //-   Abstract class to act as superclass of spacial data structures
       8                 :            : //-   such as KDDTree and RTree.
       9                 :            : //------------------------------------------------------------------
      10                 :            : 
      11                 :            : #ifndef ABSTRACTTREE_HPP
      12                 :            : #define ABSTRACTTREE_HPP
      13                 :            : 
      14                 :            : #include "CubitVector.hpp"
      15                 :            : #include "CubitBox.hpp"
      16                 :            : #include "DLIList.hpp"
      17                 :            : 
      18                 :         95 : template <class Z> class AbstractTree 
      19                 :            : {
      20                 :            :   public:
      21                 :            :     //// Other members
      22                 :            :     typedef double (*DistSqFunc)(CubitVector &a, Z& b);
      23                 :            : 
      24                 :            :     //// Pure virtual methods; required by all subclasses 
      25                 :            :     virtual CubitStatus add (Z data) = 0;
      26                 :            :     virtual void set_tol (double tol) = 0;
      27                 :            :     virtual double get_tol () = 0;
      28                 :            :     virtual CubitBoolean remove (Z data) = 0;
      29                 :            :     virtual CubitStatus find (const CubitBox &range_box, DLIList <Z> &range_members) = 0;
      30                 :            :     virtual CubitStatus k_nearest_neighbor (CubitVector &q, int k, double &closest_dist,
      31                 :            :                                             DLIList<Z> &nearest_neighbors,
      32                 :            :                                             DistSqFunc dist_sq_point_data) = 0;
      33                 :            : 
      34                 :            :     //// Optional methods for subclasses   
      35                 :          0 :     virtual CubitStatus balance () { return CUBIT_SUCCESS; };
      36                 :            : 
      37                 :            :     //// Destructor
      38 [ -  + ][ -  + ]:        190 :     virtual ~AbstractTree () {};
         [ #  # ][ -  + ]
      39                 :            : };
      40                 :            : 
      41                 :            : #endif

Generated by: LCOV version 1.11