LCOV - code coverage report
Current view: top level - utils - naming.hpp (source / functions) Hit Total Coverage
Test: clean.info Lines: 32 35 91.4 %
Date: 2013-05-24 Functions: 3 3 100.0 %
Branches: 46 87 52.9 %

           Branch data     Line data    Source code
       1                 :            : /* This software is distributed under BSD 3-clause license (see LICENSE file).
       2                 :            :  *
       3                 :            :  * Copyright (c) 2012-2013 Sergey Lisitsyn
       4                 :            :  */
       5                 :            : 
       6                 :            : #ifndef TAPKEE_NAMING_H_
       7                 :            : #define TAPKEE_NAMING_H_
       8                 :            : 
       9                 :            : namespace tapkee
      10                 :            : {
      11                 :            : 
      12                 :            : /** Returns the name of the provided method */
      13                 :         39 : std::string get_method_name(DimensionReductionMethod m)
      14                 :            : {
      15   [ +  -  +  +  :         39 :         switch (m)
          +  +  +  +  +  
          +  +  +  +  +  
          +  +  +  +  +  
                   -  - ]
      16                 :            :         {
      17         [ +  - ]:          3 :                 case KernelLocallyLinearEmbedding: return "Kernel Locally Linear Embedding";
      18         [ #  # ]:          0 :                 case KernelLocalTangentSpaceAlignment: return "Local Tangent Space Alignment";
      19         [ +  - ]:          1 :                 case DiffusionMap: return "Diffusion Map";
      20         [ +  - ]:         10 :                 case MultidimensionalScaling: return "Classic Multidimensional Scaling";
      21         [ +  - ]:          1 :                 case LandmarkMultidimensionalScaling: return "Landmark Multidimensional Scaling";
      22         [ +  - ]:          1 :                 case Isomap: return "Isomap";
      23         [ +  - ]:          1 :                 case LandmarkIsomap: return "Landmark Isomap";
      24         [ +  - ]:          1 :                 case NeighborhoodPreservingEmbedding: return "Neighborhood Preserving Embedding";
      25         [ +  - ]:          1 :                 case LinearLocalTangentSpaceAlignment: return "Linear Local Tangent Space Alignment";
      26         [ +  - ]:          1 :                 case HessianLocallyLinearEmbedding: return "Hessian Locally Linear Embedding";
      27         [ +  - ]:          2 :                 case LaplacianEigenmaps: return "Laplacian Eigenmaps";
      28         [ +  - ]:          1 :                 case LocalityPreservingProjections: return "Locality Preserving Embedding";
      29         [ +  - ]:          1 :                 case PCA: return "Principal Component Analysis";
      30         [ +  - ]:          5 :                 case KernelPCA: return "Kernel Principal Component Analysis";
      31         [ +  - ]:          1 :                 case StochasticProximityEmbedding: return "Stochastic Proximity Embedding";
      32         [ +  - ]:          6 :                 case PassThru: return "passing through";
      33         [ +  - ]:          1 :                 case RandomProjection: return "Random Projection";
      34         [ +  - ]:          1 :                 case FactorAnalysis: return "Factor Analysis";
      35         [ +  - ]:          1 :                 case tDistributedStochasticNeighborEmbedding: return "t-distributed Stochastic Neighbor Embedding";
      36         [ #  # ]:          0 :                 case ManifoldSculpting: return "manifold sculpting";
      37                 :            :         }
      38         [ #  # ]:         39 :         return "hello";
      39                 :            : }
      40                 :            : 
      41                 :            : /** Returns the name of the provided neighbors method */
      42                 :         14 : std::string get_neighbors_method_name(NeighborsMethod m)
      43                 :            : {
      44   [ +  -  +  - ]:         14 :         switch (m)
      45                 :            :         {
      46         [ +  - ]:          2 :                 case Brute: return "Brute-force";
      47         [ #  # ]:          0 :                 case VpTree: return "VP-tree";
      48                 :            : #ifdef TAPKEE_USE_LGPL_COVERTREE
      49         [ +  - ]:         12 :                 case CoverTree: return "Cover Tree";
      50                 :            : #endif
      51                 :            :         }
      52         [ #  # ]:         14 :         return "hello";
      53                 :            : }
      54                 :            : 
      55                 :            : /** Returns the name of the provided eigen method */
      56                 :         32 : std::string get_eigen_method_name(EigenMethod m)
      57                 :            : {
      58   [ +  +  +  - ]:         32 :         switch (m)
      59                 :            :         {
      60                 :            : #ifdef TAPKEE_WITH_ARPACK
      61         [ +  - ]:         27 :                 case Arpack: return "Arpack";
      62                 :            : #endif
      63         [ +  - ]:          2 :                 case Dense: return "Dense";
      64         [ +  - ]:          3 :                 case Randomized: return "Randomized";
      65                 :            :         }
      66         [ #  # ]:         32 :         return "hello";
      67                 :            : }
      68                 :            : 
      69                 :            : }
      70                 :            : #endif

Generated by: LCOV version 1.9