LCOV - code coverage report
Current view: top level - home/blackburn/Work/tapkee/include/tapkee - methods.hpp (source / functions) Hit Total Coverage
Test: clean.info Lines: 180 198 90.9 %
Date: 2013-05-24 Functions: 84 280 30.0 %
Branches: 1874 10343 18.1 %

           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, Fernando Iglesias
       4                 :            :  */
       5                 :            : 
       6                 :            : #ifndef TAPKEE_METHODS_H_
       7                 :            : #define TAPKEE_METHODS_H_
       8                 :            : 
       9                 :            : /* Tapkee includes */
      10                 :            : #include <tapkee/defines.hpp>
      11                 :            : #include <tapkee/utils/naming.hpp>
      12                 :            : #include <tapkee/utils/time.hpp>
      13                 :            : #include <tapkee/utils/logging.hpp>
      14                 :            : #include <tapkee/utils/conditional_select.hpp>
      15                 :            : #include <tapkee/utils/features.hpp>
      16                 :            : #include <tapkee/parameters/defaults.hpp>
      17                 :            : #include <tapkee/parameters/context.hpp>
      18                 :            : #include <tapkee/routines/locally_linear.hpp>
      19                 :            : #include <tapkee/routines/eigendecomposition.hpp>
      20                 :            : #include <tapkee/routines/generalized_eigendecomposition.hpp>
      21                 :            : #include <tapkee/routines/multidimensional_scaling.hpp>
      22                 :            : #include <tapkee/routines/diffusion_maps.hpp>
      23                 :            : #include <tapkee/routines/laplacian_eigenmaps.hpp>
      24                 :            : #include <tapkee/routines/isomap.hpp>
      25                 :            : #include <tapkee/routines/pca.hpp>
      26                 :            : #include <tapkee/routines/random_projection.hpp>
      27                 :            : #include <tapkee/routines/spe.hpp>
      28                 :            : #include <tapkee/routines/fa.hpp>
      29                 :            : #include <tapkee/routines/manifold_sculpting.hpp>
      30                 :            : #include <tapkee/neighbors/neighbors.hpp>
      31                 :            : #include <tapkee/external/barnes_hut_sne/tsne.hpp>
      32                 :            : /* End of Tapkee includes */
      33                 :            : 
      34                 :            : namespace tapkee
      35                 :            : {
      36                 :            : //! Main namespace for all internal routines, should not be exposed as public API
      37                 :            : namespace tapkee_internal
      38                 :            : {
      39                 :            : 
      40                 :            : template <class RandomAccessIterator, class KernelCallback,
      41                 :            :           class DistanceCallback, class FeaturesCallback>
      42 [ +  - ][ +  - ]:         39 : class ImplementationBase
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
      43                 :            : {
      44                 :            : public:
      45                 :            : 
      46                 :         39 :         ImplementationBase(RandomAccessIterator b, RandomAccessIterator e,
      47                 :            :                            KernelCallback k, DistanceCallback d, FeaturesCallback f,
      48                 :            :                            ParametersSet& pmap, const Context& ctx) : 
      49                 :            :                 parameters(pmap), context(ctx), kernel(k), distance(d), features(f),
      50                 :            :                 plain_distance(PlainDistance<RandomAccessIterator,DistanceCallback>(distance)),
      51                 :            :                 kernel_distance(KernelDistance<RandomAccessIterator,KernelCallback>(kernel)),
      52                 :            :                 begin(b), end(e), 
      53                 :            :                 eigen_method(), neighbors_method(), eigenshift(), traceshift(),
      54                 :            :                 check_connectivity(), n_neighbors(), width(), timesteps(),
      55                 :            :                 ratio(), max_iteration(), tolerance(), n_updates(), perplexity(), 
      56                 :            :                 theta(), squishing_rate(), global_strategy(), epsilon(), target_dimension(),
      57 [ +  - ][ +  - ]:         39 :                 n_vectors(0), current_dimension(0)
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
      58                 :            :         {
      59                 :         39 :                 n_vectors = (end-begin);
      60                 :            : 
      61 [ +  - ][ +  - ]:         39 :                 target_dimension = parameters(keywords::target_dimension);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
      62 [ +  - ][ +  - ]:         39 :                 n_neighbors = parameters(keywords::num_neighbors).checked().positive();
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
      63                 :            :                 
      64 [ +  - ][ +  - ]:         39 :                 if (n_vectors > 0)
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ -  + ]
      65                 :            :                 {
      66 [ +  - ][ +  - ]:         37 :                         target_dimension.checked()
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ #  # ]
      67                 :            :                                 .inRange(static_cast<IndexType>(1),static_cast<IndexType>(n_vectors));
      68 [ +  - ][ +  - ]:         37 :                         n_neighbors.checked()
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ #  # ]
      69                 :            :                                 .inRange(static_cast<IndexType>(3),static_cast<IndexType>(n_vectors));
      70                 :            :                 }
      71                 :            : 
      72 [ +  - ][ +  - ]:         39 :                 eigen_method = parameters(keywords::eigen_method);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
      73 [ +  - ][ +  - ]:         39 :                 neighbors_method = parameters(keywords::neighbors_method);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
      74 [ +  - ][ +  - ]:         39 :                 check_connectivity = parameters(keywords::check_connectivity);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
      75 [ +  - ][ +  - ]:         39 :                 width = parameters(keywords::gaussian_kernel_width).checked().positive();
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
      76 [ +  - ][ +  - ]:         39 :                 timesteps = parameters(keywords::diffusion_map_timesteps).checked().positive();
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
      77 [ +  - ][ +  - ]:         39 :                 eigenshift = parameters(keywords::nullspace_shift);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
      78 [ +  - ][ +  - ]:         39 :                 traceshift = parameters(keywords::klle_shift);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
      79 [ +  - ][ +  - ]:         39 :                 max_iteration = parameters(keywords::max_iteration);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
      80 [ +  - ][ +  - ]:         39 :                 tolerance = parameters(keywords::spe_tolerance).checked().positive();
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
      81 [ +  - ][ +  - ]:         39 :                 n_updates = parameters(keywords::spe_num_updates).checked().positive();
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
      82 [ +  - ][ +  - ]:         39 :                 theta = parameters(keywords::sne_theta).checked().nonNegative();
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
      83 [ +  - ][ +  - ]:         39 :                 squishing_rate = parameters(keywords::squishing_rate);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
      84 [ +  - ][ +  - ]:         39 :                 global_strategy = parameters(keywords::spe_global_strategy);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
      85 [ +  - ][ +  - ]:         39 :                 epsilon = parameters(keywords::fa_epsilon).checked().nonNegative();
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
      86 [ +  - ][ +  - ]:         39 :                 perplexity = parameters(keywords::sne_perplexity).checked().nonNegative();
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
      87 [ +  - ][ +  - ]:         39 :                 ratio = parameters(keywords::landmark_ratio);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
      88                 :            : 
      89                 :            :                 if (!is_dummy<FeaturesCallback>::value)
      90                 :            :                 {
      91         [ +  - ]:         29 :                         current_dimension = features.dimension();
      92                 :            :                 }
      93                 :            :                 else
      94                 :            :                 {
      95                 :         10 :                         current_dimension = 0;
      96                 :            :                 }
      97                 :         39 :         }
      98                 :            : 
      99                 :         39 :         TapkeeOutput embedUsing(DimensionReductionMethod method)
     100                 :            :         {
     101 [ -  + ][ -  + ]:         39 :                 if (context.is_cancelled()) 
         [ -  + ][ -  + ]
         [ -  + ][ -  + ]
         [ -  + ][ -  + ]
                 [ +  + ]
     102                 :          1 :                         throw cancelled_exception();
     103                 :            : 
     104                 :            :                 using std::mem_fun_ref_t;
     105                 :            :                 using std::mem_fun_ref;
     106                 :            :                 typedef std::mem_fun_ref_t<TapkeeOutput,ImplementationBase> ImplRef;
     107                 :            : 
     108                 :            : #define tapkee_method_handle(X)                                                                                                                                 \
     109                 :            :                 case X:                                                                                                                                                                 \
     110                 :            :                 {                                                                                                                                                                               \
     111                 :            :                         timed_context tctx__("[+] embedding with " # X);                                                                      \
     112                 :            :                         ImplRef ref = conditional_select<                                                                                                    \
     113                 :            :                                 ((!MethodTraits<X>::needs_kernel)   || (!is_dummy<KernelCallback>::value))   &&     \
     114                 :            :                                 ((!MethodTraits<X>::needs_distance) || (!is_dummy<DistanceCallback>::value)) &&     \
     115                 :            :                                 ((!MethodTraits<X>::needs_features) || (!is_dummy<FeaturesCallback>::value)),       \
     116                 :            :                                         ImplRef>()(mem_fun_ref(&ImplementationBase::embed##X),                                           \
     117                 :            :                                                    mem_fun_ref(&ImplementationBase::embedEmpty));                                   \
     118                 :            :                         return ref(*this);                                                                                                                                      \
     119                 :            :                 }                                                                                                                                                                               \
     120                 :            :                 break                                                                                                                                                                   \
     121                 :            : 
     122   [ +  -  +  +  :         38 :                 switch (method)
          +  +  +  +  +  
          +  +  +  +  +  
          +  +  +  +  +  
           -  - ][ -  -  
          -  +  -  -  -  
          -  -  -  -  -  
          -  +  -  -  -  
             -  -  -  - ]
           [ -  -  -  +  
          -  -  -  -  -  
          -  -  -  -  -  
          -  -  +  -  -  
           -  - ][ -  -  
          -  -  -  -  -  
          -  -  -  -  -  
          -  +  -  -  +  
             -  -  -  - ]
           [ -  -  -  +  
          -  -  -  -  -  
          -  -  -  -  +  
          -  -  +  -  -  
           -  - ][ -  -  
          -  +  -  -  -  
          -  -  -  -  -  
          -  -  -  -  -  
             -  -  -  - ]
           [ -  -  -  -  
          -  -  -  -  -  
          -  +  -  -  -  
          -  -  -  -  -  
           -  - ][ +  -  
          -  -  -  -  -  
          -  -  -  -  -  
          -  +  -  -  -  
             -  -  -  - ]
           [ -  -  -  -  
          -  -  -  -  -  
          -  -  -  -  -  
          -  -  +  -  -  
                   -  - ]
     123                 :            :                 {
     124 [ +  - ][ +  - ]:          3 :                         tapkee_method_handle(KernelLocallyLinearEmbedding);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ -  + ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     125 [ #  # ][ #  # ]:          0 :                         tapkee_method_handle(KernelLocalTangentSpaceAlignment);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     126 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(DiffusionMap);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     127 [ +  - ][ +  - ]:         10 :                         tapkee_method_handle(MultidimensionalScaling);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  + ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     128 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(LandmarkMultidimensionalScaling);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     129 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(Isomap);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     130 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(LandmarkIsomap);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     131 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(NeighborhoodPreservingEmbedding);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     132 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(LinearLocalTangentSpaceAlignment);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     133 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(HessianLocallyLinearEmbedding);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     134 [ +  - ][ +  - ]:          2 :                         tapkee_method_handle(LaplacianEigenmaps);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ -  + ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     135 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(LocalityPreservingProjections);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     136 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(PCA);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     137 [ +  - ][ +  - ]:          5 :                         tapkee_method_handle(KernelPCA);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     138 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(RandomProjection);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     139 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(StochasticProximityEmbedding);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     140 [ +  - ][ +  - ]:          5 :                         tapkee_method_handle(PassThru);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
     141 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(FactorAnalysis);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     142 [ +  - ][ +  - ]:          1 :                         tapkee_method_handle(tDistributedStochasticNeighborEmbedding);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     143 [ #  # ][ #  # ]:          0 :                         tapkee_method_handle(ManifoldSculpting);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     144                 :            :                 }
     145                 :            : #undef tapkee_method_handle
     146                 :         34 :                 return TapkeeOutput();
     147                 :            :         }
     148                 :            : 
     149                 :            : private:
     150                 :            : 
     151                 :            :         static const IndexType SkipOneEigenvalue = 1;
     152                 :            :         static const IndexType SkipNoEigenvalues = 0;
     153                 :            : 
     154                 :            :         ParametersSet parameters;
     155                 :            :         Context context;
     156                 :            :         KernelCallback kernel;
     157                 :            :         DistanceCallback distance;
     158                 :            :         FeaturesCallback features;
     159                 :            :         PlainDistance<RandomAccessIterator,DistanceCallback> plain_distance;
     160                 :            :         KernelDistance<RandomAccessIterator,KernelCallback> kernel_distance;
     161                 :            : 
     162                 :            :         RandomAccessIterator begin;
     163                 :            :         RandomAccessIterator end;
     164                 :            : 
     165                 :            :         Parameter eigen_method;
     166                 :            :         Parameter neighbors_method;
     167                 :            :         Parameter eigenshift;
     168                 :            :         Parameter traceshift;
     169                 :            :         Parameter check_connectivity;
     170                 :            :         Parameter n_neighbors;
     171                 :            :         Parameter width;
     172                 :            :         Parameter timesteps;
     173                 :            :         Parameter ratio;
     174                 :            :         Parameter max_iteration;
     175                 :            :         Parameter tolerance;
     176                 :            :         Parameter n_updates;
     177                 :            :         Parameter perplexity;
     178                 :            :         Parameter theta;
     179                 :            :         Parameter squishing_rate;       
     180                 :            :         Parameter global_strategy;
     181                 :            :         Parameter epsilon;
     182                 :            :         Parameter target_dimension;
     183                 :            : 
     184                 :            :         IndexType n_vectors;
     185                 :            :         IndexType current_dimension;
     186                 :            : 
     187                 :            :         template<class Distance>
     188                 :         11 :         Neighbors findNeighborsWith(Distance d)
     189                 :            :         {
     190                 :         11 :                 return find_neighbors(neighbors_method,begin,end,d,n_neighbors,check_connectivity);
     191                 :            :         }
     192                 :            : 
     193                 :         25 :         static tapkee::ProjectingFunction unimplementedProjectingFunction() 
     194                 :            :         {
     195                 :         25 :                 return tapkee::ProjectingFunction();
     196                 :            :         }
     197                 :            : 
     198                 :          0 :         TapkeeOutput embedEmpty()
     199                 :            :         {
     200 [ #  # ][ #  # ]:          0 :                 throw unsupported_method_error("Some callback is missed");
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     201                 :            :                 return TapkeeOutput();
     202                 :            :         }
     203                 :            : 
     204                 :          3 :         TapkeeOutput embedKernelLocallyLinearEmbedding()
     205                 :            :         {
     206                 :          3 :                 Neighbors neighbors = findNeighborsWith(kernel_distance);
     207                 :            :                 SparseWeightMatrix weight_matrix =
     208 [ +  - ][ +  - ]:          2 :                         linear_weight_matrix(begin,end,neighbors,kernel,eigenshift,traceshift);
           [ +  -  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
         [ #  # ][ #  # ]
     209                 :            :                 DenseMatrix embedding = 
     210                 :            :                         eigendecomposition<SparseWeightMatrix,SparseInverseMatrixOperation>(eigen_method,
     211 [ +  - ][ +  - ]:          2 :                                 weight_matrix,target_dimension,SkipOneEigenvalue).first;
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     212                 :            : 
     213 [ +  - ][ +  - ]:          2 :                 return TapkeeOutput(embedding, unimplementedProjectingFunction());
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     214                 :            :         }
     215                 :            : 
     216                 :          0 :         TapkeeOutput embedKernelLocalTangentSpaceAlignment()
     217                 :            :         {
     218                 :          0 :                 Neighbors neighbors = findNeighborsWith(kernel_distance);
     219                 :            :                 SparseWeightMatrix weight_matrix = 
     220 [ #  # ][ #  # ]:          0 :                         tangent_weight_matrix(begin,end,neighbors,kernel,target_dimension,eigenshift);
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
         [ #  # ][ #  # ]
     221                 :            :                 DenseMatrix embedding =
     222                 :            :                         eigendecomposition<SparseWeightMatrix,SparseInverseMatrixOperation>(eigen_method,
     223 [ #  # ][ #  # ]:          0 :                                 weight_matrix,target_dimension,SkipOneEigenvalue).first;
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     224                 :            : 
     225 [ #  # ][ #  # ]:          0 :                 return TapkeeOutput(embedding, unimplementedProjectingFunction());
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     226                 :            :         }
     227                 :            : 
     228                 :          1 :         TapkeeOutput embedDiffusionMap()
     229                 :            :         {
     230                 :            :                 #ifdef TAPKEE_GPU
     231                 :            :                         #define DM_MATRIX_OP GPUDenseImplicitSquareMatrixOperation
     232                 :            :                 #else
     233                 :            :                         #define DM_MATRIX_OP DenseImplicitSquareSymmetricMatrixOperation
     234                 :            :                 #endif
     235                 :            : 
     236                 :            :                 DenseSymmetricMatrix diffusion_matrix =
     237                 :          1 :                         compute_diffusion_matrix(begin,end,distance,timesteps,width);
     238                 :            :                 DenseMatrix embedding =
     239                 :            :                         eigendecomposition<DenseSymmetricMatrix,DM_MATRIX_OP>(eigen_method,diffusion_matrix,
     240 [ +  - ][ +  - ]:          1 :                                 target_dimension,SkipNoEigenvalues).first;
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     241                 :            : 
     242 [ +  - ][ +  - ]:          1 :                 return TapkeeOutput(embedding, unimplementedProjectingFunction());
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     243                 :            : 
     244                 :            :                 #undef DM_MATRIX_OP
     245                 :            :         }
     246                 :            : 
     247                 :         10 :         TapkeeOutput embedMultidimensionalScaling()
     248                 :            :         {
     249                 :            :                 #ifdef TAPKEE_GPU
     250                 :            :                         #define MDS_MATRIX_OP GPUDenseImplicitSquareMatrixOperation
     251                 :            :                 #else
     252                 :            :                         #define MDS_MATRIX_OP DenseMatrixOperation
     253                 :            :                 #endif
     254                 :            : 
     255                 :         10 :                 DenseSymmetricMatrix distance_matrix = compute_distance_matrix(begin,end,distance);
     256   [ +  -  +  -  :          9 :                 centerMatrix(distance_matrix);
          +  -  #  #  +  
          -  +  -  #  #  
             #  #  #  # ]
     257 [ +  - ][ +  - ]:          9 :                 distance_matrix.array() *= -0.5;
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     258                 :            :                 EigendecompositionResult embedding = 
     259                 :            :                         eigendecomposition<DenseSymmetricMatrix,MDS_MATRIX_OP>(eigen_method,
     260 [ +  - ][ +  - ]:          9 :                                 distance_matrix,target_dimension,SkipNoEigenvalues);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  + ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     261                 :            : 
     262 [ +  - ][ +  + ]:         24 :                 for (IndexType i=0; i<static_cast<IndexType>(target_dimension); i++)
         [ +  - ][ +  + ]
         [ +  - ][ +  + ]
         [ #  # ][ #  # ]
         [ +  - ][ +  + ]
         [ +  - ][ +  + ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     263 [ +  - ][ +  - ]:         16 :                         embedding.first.col(i).array() *= sqrt(embedding.second(i));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     264 [ +  - ][ +  - ]:          9 :                 return TapkeeOutput(embedding.first, unimplementedProjectingFunction());
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     265                 :            :                 #undef MDS_MATRIX_OP
     266                 :            :         }
     267                 :            : 
     268                 :          1 :         TapkeeOutput embedLandmarkMultidimensionalScaling()
     269                 :            :         {
     270                 :          1 :                 ratio.checked()
     271                 :            :                         .inClosedRange(static_cast<ScalarType>(3.0/n_vectors),
     272                 :            :                                        static_cast<ScalarType>(1.0));
     273                 :            : 
     274                 :            :                 Landmarks landmarks = 
     275                 :          1 :                         select_landmarks_random(begin,end,ratio);
     276                 :            :                 DenseSymmetricMatrix distance_matrix = 
     277   [ +  -  #  #  :          1 :                         compute_distance_matrix(begin,end,landmarks,distance);
          #  #  #  #  #  
          #  #  #  #  #  
             #  #  #  # ]
     278 [ +  - ][ +  - ]:          1 :                 DenseVector landmark_distances_squared = distance_matrix.colwise().mean();
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     279 [ +  - ][ #  # ]:          1 :                 centerMatrix(distance_matrix);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     280 [ +  - ][ +  - ]:          1 :                 distance_matrix.array() *= -0.5;
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     281                 :            :                 EigendecompositionResult landmarks_embedding = 
     282                 :            :                         eigendecomposition<DenseSymmetricMatrix,DenseMatrixOperation>(eigen_method,
     283 [ +  - ][ +  - ]:          1 :                                 distance_matrix,target_dimension,SkipNoEigenvalues);
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     284 [ +  - ][ +  + ]:          3 :                 for (IndexType i=0; i<static_cast<IndexType>(target_dimension); i++)
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     285 [ +  - ][ +  - ]:          2 :                         landmarks_embedding.first.col(i).array() *= sqrt(landmarks_embedding.second(i));
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     286                 :            :                 return TapkeeOutput(triangulate(begin,end,distance,landmarks,
     287 [ +  - ][ +  - ]:          1 :                         landmark_distances_squared,landmarks_embedding,target_dimension), unimplementedProjectingFunction());
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     288                 :            :         }
     289                 :            : 
     290                 :          1 :         TapkeeOutput embedIsomap()
     291                 :            :         {
     292                 :          1 :                 Neighbors neighbors = findNeighborsWith(plain_distance);
     293                 :            :                 DenseSymmetricMatrix shortest_distances_matrix = 
     294   [ +  -  #  #  :          1 :                         compute_shortest_distances_matrix(begin,end,neighbors,distance);
          #  #  #  #  #  
          #  #  #  #  #  
             #  #  #  # ]
     295 [ +  - ][ +  - ]:          1 :                 shortest_distances_matrix = shortest_distances_matrix.array().square();
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     296 [ +  - ][ #  # ]:          1 :                 centerMatrix(shortest_distances_matrix);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     297 [ +  - ][ +  - ]:          1 :                 shortest_distances_matrix.array() *= -0.5;
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     298                 :            :                 
     299                 :            :                 EigendecompositionResult embedding = 
     300                 :            :                         eigendecomposition<DenseSymmetricMatrix,DenseMatrixOperation>(eigen_method,
     301 [ +  - ][ +  - ]:          1 :                                 shortest_distances_matrix,target_dimension,SkipNoEigenvalues);
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     302                 :            : 
     303 [ +  - ][ +  + ]:          3 :                 for (IndexType i=0; i<static_cast<IndexType>(target_dimension); i++)
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     304 [ +  - ][ +  - ]:          2 :                         embedding.first.col(i).array() *= sqrt(embedding.second(i));
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     305                 :            : 
     306 [ +  - ][ +  - ]:          1 :                 return TapkeeOutput(embedding.first, unimplementedProjectingFunction());
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     307                 :            :         }
     308                 :            : 
     309                 :          1 :         TapkeeOutput embedLandmarkIsomap()
     310                 :            :         {
     311                 :          1 :                 ratio.checked()
     312                 :            :                         .inClosedRange(static_cast<ScalarType>(3.0/n_vectors),
     313                 :            :                                        static_cast<ScalarType>(1.0));
     314                 :            : 
     315                 :          1 :                 Neighbors neighbors = findNeighborsWith(plain_distance);
     316                 :            :                 Landmarks landmarks = 
     317         [ +  - ]:          1 :                         select_landmarks_random(begin,end,ratio);
           [ +  -  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
                 [ #  # ]
     318                 :            :                 DenseMatrix distance_matrix = 
     319 [ +  - ][ #  # ]:          1 :                         compute_shortest_distances_matrix(begin,end,landmarks,neighbors,distance);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     320 [ +  - ][ +  - ]:          1 :                 distance_matrix = distance_matrix.array().square();
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     321                 :            :                 
     322 [ +  - ][ +  - ]:          1 :                 DenseVector col_means = distance_matrix.colwise().mean();
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     323 [ +  - ][ +  - ]:          1 :                 DenseVector row_means = distance_matrix.rowwise().mean();
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     324 [ +  - ][ #  # ]:          1 :                 ScalarType grand_mean = distance_matrix.mean();
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     325 [ +  - ][ +  - ]:          1 :                 distance_matrix.array() += grand_mean;
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     326 [ +  - ][ +  - ]:          1 :                 distance_matrix.colwise() -= row_means;
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     327 [ +  - ][ +  - ]:          1 :                 distance_matrix.rowwise() -= col_means.transpose();
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     328 [ +  - ][ +  - ]:          1 :                 distance_matrix.array() *= -0.5;
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     329                 :            : 
     330 [ +  - ][ #  # ]:          1 :                 EigendecompositionResult landmarks_embedding;
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     331                 :            :                 
     332 [ +  - ][ -  + ]:          1 :                 if (eigen_method.is(Dense))
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     333                 :            :                 {
     334 [ #  # ][ #  # ]:          0 :                         DenseMatrix distance_matrix_sym = distance_matrix*distance_matrix.transpose();
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     335 [ #  # ][ #  # ]:          0 :                         landmarks_embedding = eigendecomposition<DenseSymmetricMatrix,DenseImplicitSquareMatrixOperation>
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     336                 :            :                                 (eigen_method,distance_matrix_sym,target_dimension,SkipNoEigenvalues);
     337                 :            :                 }
     338                 :            :                 else 
     339                 :            :                 {
     340 [ +  - ][ +  - ]:          1 :                         landmarks_embedding = eigendecomposition<DenseSymmetricMatrix,DenseImplicitSquareMatrixOperation>
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     341                 :            :                                 (eigen_method,distance_matrix,target_dimension,SkipNoEigenvalues);
     342                 :            :                 }
     343                 :            : 
     344 [ +  - ][ +  - ]:          1 :                 DenseMatrix embedding = distance_matrix.transpose()*landmarks_embedding.first;
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     345                 :            : 
     346 [ +  - ][ +  + ]:          3 :                 for (IndexType i=0; i<static_cast<IndexType>(target_dimension); i++)
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     347 [ +  - ][ +  - ]:          2 :                         embedding.col(i).array() /= sqrt(sqrt(landmarks_embedding.second(i)));
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     348 [ +  - ][ +  - ]:          1 :                 return TapkeeOutput(embedding,unimplementedProjectingFunction());
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     349                 :            :         }
     350                 :            : 
     351                 :          1 :         TapkeeOutput embedNeighborhoodPreservingEmbedding()
     352                 :            :         {
     353                 :          1 :                 Neighbors neighbors = findNeighborsWith(kernel_distance);
     354                 :            :                 SparseWeightMatrix weight_matrix = 
     355 [ +  - ][ +  - ]:          1 :                         linear_weight_matrix(begin,end,neighbors,kernel,eigenshift,traceshift);
           [ +  -  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
         [ #  # ][ #  # ]
     356                 :            :                 DenseSymmetricMatrixPair eig_matrices =
     357                 :            :                         construct_neighborhood_preserving_eigenproblem(weight_matrix,begin,end,
     358 [ +  - ][ +  - ]:          1 :                                 features,current_dimension);
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     359                 :            :                 EigendecompositionResult projection_result = 
     360                 :            :                         generalized_eigendecomposition<DenseSymmetricMatrix,DenseSymmetricMatrix,DenseInverseMatrixOperation>(
     361 [ +  - ][ +  - ]:          1 :                                 eigen_method,eig_matrices.first,eig_matrices.second,target_dimension,SkipNoEigenvalues);
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     362                 :            :                 DenseVector mean_vector = 
     363 [ +  - ][ #  # ]:          1 :                         compute_mean(begin,end,features,current_dimension);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     364 [ +  - ][ +  - ]:          1 :                 tapkee::ProjectingFunction projecting_function(new tapkee::MatrixProjectionImplementation(projection_result.first,mean_vector));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     365 [ +  - ][ +  - ]:          1 :                 return TapkeeOutput(project(projection_result.first,mean_vector,begin,end,features,current_dimension),projecting_function);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     366                 :            :         }
     367                 :            : 
     368                 :          1 :         TapkeeOutput embedHessianLocallyLinearEmbedding()
     369                 :            :         {
     370                 :          1 :                 Neighbors neighbors = findNeighborsWith(kernel_distance);
     371                 :            :                 SparseWeightMatrix weight_matrix =
     372         [ +  - ]:          1 :                         hessian_weight_matrix(begin,end,neighbors,kernel,target_dimension);
           [ +  -  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
                 [ #  # ]
     373                 :            :                 return TapkeeOutput(eigendecomposition<SparseWeightMatrix,SparseInverseMatrixOperation>(eigen_method,
     374 [ +  - ][ +  - ]:          1 :                         weight_matrix,target_dimension,SkipOneEigenvalue).first, unimplementedProjectingFunction());
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     375                 :            :         }
     376                 :            : 
     377                 :          2 :         TapkeeOutput embedLaplacianEigenmaps()
     378                 :            :         {
     379                 :          2 :                 Neighbors neighbors = findNeighborsWith(plain_distance);
     380                 :            :                 Laplacian laplacian = 
     381         [ +  - ]:          2 :                         compute_laplacian(begin,end,neighbors,distance,width);
           [ +  -  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  +  - ]
           [ +  -  #  # ]
           [ #  #  #  # ]
                 [ #  # ]
     382                 :            :                 return TapkeeOutput(generalized_eigendecomposition<SparseWeightMatrix,DenseDiagonalMatrix,SparseInverseMatrixOperation>(
     383 [ +  - ][ +  - ]:          2 :                         eigen_method,laplacian.first,laplacian.second,target_dimension,SkipOneEigenvalue).first, unimplementedProjectingFunction());
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ -  + ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     384                 :            :         }
     385                 :            : 
     386                 :          1 :         TapkeeOutput embedLocalityPreservingProjections()
     387                 :            :         {
     388                 :          1 :                 Neighbors neighbors = findNeighborsWith(plain_distance);
     389                 :            :                 Laplacian laplacian = 
     390         [ +  - ]:          1 :                         compute_laplacian(begin,end,neighbors,distance,width);
           [ +  -  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
                 [ #  # ]
     391                 :            :                 DenseSymmetricMatrixPair eigenproblem_matrices =
     392                 :            :                         construct_locality_preserving_eigenproblem(laplacian.first,laplacian.second,begin,end,
     393 [ +  - ][ #  # ]:          1 :                                         features,current_dimension);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     394                 :            :                 EigendecompositionResult projection_result = 
     395                 :            :                         generalized_eigendecomposition<DenseSymmetricMatrix,DenseSymmetricMatrix,DenseInverseMatrixOperation>(
     396 [ +  - ][ +  - ]:          1 :                                 eigen_method,eigenproblem_matrices.first,eigenproblem_matrices.second,target_dimension,SkipNoEigenvalues);
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     397                 :            :                 DenseVector mean_vector = 
     398 [ +  - ][ #  # ]:          1 :                         compute_mean(begin,end,features,current_dimension);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     399 [ +  - ][ +  - ]:          1 :                 tapkee::ProjectingFunction projecting_function(new tapkee::MatrixProjectionImplementation(projection_result.first,mean_vector));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     400 [ +  - ][ +  - ]:          1 :                 return TapkeeOutput(project(projection_result.first,mean_vector,begin,end,features,current_dimension), projecting_function);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     401                 :            :         }
     402                 :            : 
     403                 :          1 :         TapkeeOutput embedPCA()
     404                 :            :         {
     405                 :            :                 DenseVector mean_vector = 
     406                 :          1 :                         compute_mean(begin,end,features,current_dimension);
     407                 :            :                 DenseSymmetricMatrix centered_covariance_matrix = 
     408   [ +  -  #  #  :          1 :                         compute_covariance_matrix(begin,end,mean_vector,features,current_dimension);
          #  #  #  #  #  
          #  #  #  #  #  
             #  #  #  # ]
     409                 :            :                 EigendecompositionResult projection_result = 
     410 [ +  - ][ +  - ]:          1 :                         eigendecomposition<DenseSymmetricMatrix,DenseMatrixOperation>(eigen_method,centered_covariance_matrix,target_dimension,SkipNoEigenvalues);
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     411 [ +  - ][ +  - ]:          1 :                 tapkee::ProjectingFunction projecting_function(new tapkee::MatrixProjectionImplementation(projection_result.first,mean_vector));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     412 [ +  - ][ +  - ]:          1 :                 return TapkeeOutput(project(projection_result.first,mean_vector,begin,end,features,current_dimension), projecting_function);
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     413                 :            :         }
     414                 :            : 
     415                 :          1 :         TapkeeOutput embedRandomProjection()
     416                 :            :         {
     417                 :            :                 DenseMatrix projection_matrix = 
     418                 :          1 :                         gaussian_projection_matrix(current_dimension, target_dimension);
     419                 :            :                 DenseVector mean_vector = 
     420   [ +  -  #  #  :          1 :                         compute_mean(begin,end,features,current_dimension);
          #  #  #  #  #  
          #  #  #  #  #  
             #  #  #  # ]
     421                 :            : 
     422 [ +  - ][ +  - ]:          1 :                 tapkee::ProjectingFunction projecting_function(new tapkee::MatrixProjectionImplementation(projection_matrix,mean_vector));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     423 [ +  - ][ +  - ]:          1 :                 return TapkeeOutput(project(projection_matrix,mean_vector,begin,end,features,current_dimension), projecting_function);
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     424                 :            :         }
     425                 :            : 
     426                 :          5 :         TapkeeOutput embedKernelPCA()
     427                 :            :         {
     428                 :            :                 DenseSymmetricMatrix centered_kernel_matrix = 
     429                 :          5 :                         compute_centered_kernel_matrix(begin,end,kernel);
     430                 :            :                 EigendecompositionResult embedding = eigendecomposition<DenseSymmetricMatrix,DenseMatrixOperation>(eigen_method,
     431 [ +  - ][ +  - ]:          5 :                         centered_kernel_matrix,target_dimension,SkipNoEigenvalues);
           [ +  -  +  - ]
                 [ +  - ]
           [ +  -  #  # ]
                 [ #  # ]
           [ #  #  +  - ]
                 [ +  - ]
           [ +  -  +  - ]
                 [ +  - ]
           [ +  -  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  +  - ]
                 [ +  - ]
           [ +  -  #  # ]
         [ #  # ][ #  # ]
     432 [ +  - ][ +  + ]:         15 :                 for (IndexType i=0; i<static_cast<IndexType>(target_dimension); i++)
         [ +  - ][ +  + ]
         [ #  # ][ #  # ]
         [ +  - ][ +  + ]
         [ +  - ][ +  + ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  + ]
         [ #  # ][ #  # ]
     433 [ +  - ][ +  - ]:         10 :                         embedding.first.col(i).array() *= sqrt(embedding.second(i));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     434 [ +  - ][ +  - ]:          5 :                 return TapkeeOutput(embedding.first, unimplementedProjectingFunction());
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
     435                 :            :         }
     436                 :            : 
     437                 :          1 :         TapkeeOutput embedLinearLocalTangentSpaceAlignment()
     438                 :            :         {
     439                 :          1 :                 Neighbors neighbors = findNeighborsWith(kernel_distance);
     440                 :            :                 SparseWeightMatrix weight_matrix = 
     441 [ +  - ][ +  - ]:          1 :                         tangent_weight_matrix(begin,end,neighbors,kernel,target_dimension,eigenshift);
           [ +  -  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
                 [ #  # ]
           [ #  #  #  # ]
         [ #  # ][ #  # ]
     442                 :            :                 DenseSymmetricMatrixPair eig_matrices =
     443                 :            :                         construct_lltsa_eigenproblem(weight_matrix,begin,end,
     444 [ +  - ][ +  - ]:          1 :                                 features,current_dimension);
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     445                 :            :                 EigendecompositionResult projection_result = 
     446                 :            :                         generalized_eigendecomposition<DenseSymmetricMatrix,DenseSymmetricMatrix,DenseInverseMatrixOperation>(
     447 [ +  - ][ +  - ]:          1 :                                 eigen_method,eig_matrices.first,eig_matrices.second,target_dimension,SkipNoEigenvalues);
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     448                 :            :                 DenseVector mean_vector = 
     449 [ +  - ][ #  # ]:          1 :                         compute_mean(begin,end,features,current_dimension);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     450 [ +  - ][ +  - ]:          1 :                 tapkee::ProjectingFunction projecting_function(new tapkee::MatrixProjectionImplementation(projection_result.first,mean_vector));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     451                 :            :                 return TapkeeOutput(project(projection_result.first,mean_vector,begin,end,features,current_dimension),
     452 [ +  - ][ +  - ]:          1 :                                 projecting_function);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     453                 :            :         }
     454                 :            : 
     455                 :          1 :         TapkeeOutput embedStochasticProximityEmbedding()
     456                 :            :         {
     457                 :          1 :                 Neighbors neighbors;
     458         [ +  - ]:          1 :                 if (global_strategy.is(false))
           [ -  +  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
                 [ #  # ]
     459                 :            :                 {
     460 [ #  # ][ #  # ]:          0 :                         neighbors = findNeighborsWith(plain_distance);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     461                 :            :                 }
     462                 :            : 
     463                 :            :                 return TapkeeOutput(spe_embedding(begin,end,distance,neighbors,
     464 [ +  - ][ +  - ]:          1 :                                 target_dimension,global_strategy,tolerance,n_updates,max_iteration), unimplementedProjectingFunction());
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     465                 :            :         }
     466                 :            : 
     467                 :          5 :         TapkeeOutput embedPassThru()
     468                 :            :         {
     469                 :            :                 DenseMatrix feature_matrix =
     470                 :          5 :                         dense_matrix_from_features(features, current_dimension, begin, end);
     471 [ +  - ][ +  - ]:          5 :                 return TapkeeOutput(feature_matrix.transpose(),tapkee::ProjectingFunction());
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
     472                 :            :         }
     473                 :            : 
     474                 :          1 :         TapkeeOutput embedFactorAnalysis()
     475                 :            :         {
     476                 :          1 :                 DenseVector mean_vector = compute_mean(begin,end,features,current_dimension);
     477                 :            :                 return TapkeeOutput(project(begin,end,features,current_dimension,max_iteration,epsilon,
     478 [ +  - ][ +  - ]:          1 :                                                                         target_dimension, mean_vector), unimplementedProjectingFunction());
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     479                 :            :         }
     480                 :            : 
     481                 :          1 :         TapkeeOutput embedtDistributedStochasticNeighborEmbedding()
     482                 :            :         {
     483                 :          1 :                 perplexity.checked()
     484                 :            :                         .inClosedRange(static_cast<ScalarType>(0.0),
     485                 :            :                                        static_cast<ScalarType>((n_vectors-1)/3.0));
     486                 :            : 
     487                 :            :                 DenseMatrix data = 
     488                 :          1 :                         dense_matrix_from_features(features, current_dimension, begin, end);
     489                 :            : 
     490         [ +  - ]:          1 :                 DenseMatrix embedding(static_cast<IndexType>(target_dimension),n_vectors);
           [ +  -  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
           [ #  #  #  # ]
                 [ #  # ]
     491                 :            :                 tsne::TSNE tsne;
     492 [ +  - ][ +  - ]:          1 :                 tsne.run(data.data(),n_vectors,current_dimension,embedding.data(),target_dimension,perplexity,theta);
         [ +  - ][ +  - ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     493                 :            : 
     494 [ +  - ][ +  - ]:          1 :                 return TapkeeOutput(embedding.transpose(), unimplementedProjectingFunction());
         [ +  - ][ +  - ]
         [ +  - ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     495                 :            :         }
     496                 :            : 
     497                 :          0 :         TapkeeOutput embedManifoldSculpting()
     498                 :            :         {
     499                 :          0 :                 squishing_rate.checked()
     500                 :            :                         .inRange(static_cast<ScalarType>(0.0),
     501                 :            :                                  static_cast<ScalarType>(1.0));
     502                 :            : 
     503                 :            :                 DenseMatrix embedding =
     504                 :          0 :                         dense_matrix_from_features(features, current_dimension, begin, end);
     505                 :            : 
     506   [ #  #  #  #  :          0 :                 Neighbors neighbors = findNeighborsWith(plain_distance);
          #  #  #  #  #  
          #  #  #  #  #  
             #  #  #  # ]
     507                 :            : 
     508 [ #  # ][ #  # ]:          0 :                 manifold_sculpting_embed(begin, end, embedding, target_dimension, neighbors, distance, max_iteration, squishing_rate);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     509                 :            : 
     510 [ #  # ][ #  # ]:          0 :                 return TapkeeOutput(embedding, tapkee::ProjectingFunction());   
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     511                 :            :         }
     512                 :            : 
     513                 :            : };
     514                 :            : 
     515                 :            : template <class RandomAccessIterator, class KernelCallback,
     516                 :            :           class DistanceCallback, class FeaturesCallback>
     517                 :            : ImplementationBase<RandomAccessIterator,KernelCallback,DistanceCallback,FeaturesCallback>
     518                 :         39 :         initialize(RandomAccessIterator begin, RandomAccessIterator end,
     519                 :            :                    KernelCallback kernel, DistanceCallback distance, FeaturesCallback features,
     520                 :            :                    ParametersSet& pmap, const Context& ctx)
     521                 :            : {
     522                 :            :         return ImplementationBase<RandomAccessIterator,KernelCallback,DistanceCallback,FeaturesCallback>(
     523                 :         39 :                         begin,end,kernel,distance,features,pmap,ctx);
     524                 :            : }
     525                 :            : 
     526                 :            : } // End of namespace tapkee_internal
     527                 :            : } // End of namespace tapkee
     528                 :            : 
     529                 :            : #endif

Generated by: LCOV version 1.9