Tapkee
synonyms.hpp
Go to the documentation of this file.
00001 /* This software is distributed under BSD 3-clause license (see LICENSE file).
00002  *
00003  * Copyright (c) 2012-2013 Sergey Lisitsyn
00004  */
00005 
00006 #ifndef TAPKEE_DEFINES_SYNONYMS_H_
00007 #define TAPKEE_DEFINES_SYNONYMS_H_
00008 
00009 /* Tapkee includes */
00010 #include <tapkee/defines/types.hpp>
00011 #include <tapkee/defines/stdtypes.hpp>
00012 /* End of Tapkee includes */
00013 
00014 namespace tapkee
00015 {
00016 namespace tapkee_internal
00017 {
00018 
00019 #ifdef EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
00020     template <typename T> struct Triplet
00021     {
00022         Triplet(IndexType colIndex, IndexType rowIndex, T valueT) : 
00023             col_(colIndex), row_(rowIndex), value_(valueT)
00024         {
00025         }
00026         IndexType col() const { return col_; };
00027         IndexType row() const { return row_; };
00028         T value() const { return value_; };
00029         IndexType col_;
00030         IndexType row_;
00031         T value_;
00032     };
00033     typedef Triplet<tapkee::ScalarType> SparseTriplet;
00034 #else // EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
00035     typedef Eigen::Triplet<tapkee::ScalarType> SparseTriplet;
00036 #endif // EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
00037 
00038     typedef TAPKEE_INTERNAL_VECTOR<tapkee::tapkee_internal::SparseTriplet> SparseTriplets;
00039     typedef TAPKEE_INTERNAL_VECTOR<tapkee::IndexType> LocalNeighbors;
00040     typedef TAPKEE_INTERNAL_VECTOR<tapkee::tapkee_internal::LocalNeighbors> Neighbors;
00041     typedef TAPKEE_INTERNAL_PAIR<tapkee::DenseMatrix,tapkee::DenseVector> EigendecompositionResult;
00042     typedef TAPKEE_INTERNAL_VECTOR<tapkee::IndexType> Landmarks;
00043     typedef TAPKEE_INTERNAL_PAIR<tapkee::SparseWeightMatrix,tapkee::DenseDiagonalMatrix> Laplacian;
00044     typedef TAPKEE_INTERNAL_PAIR<tapkee::DenseSymmetricMatrix,tapkee::DenseSymmetricMatrix> DenseSymmetricMatrixPair;
00045     typedef TAPKEE_INTERNAL_PAIR<tapkee::SparseMatrix,tapkee::tapkee_internal::Neighbors> SparseMatrixNeighborsPair;
00046 
00047 #if defined(TAPKEE_USE_PRIORITY_QUEUE) && defined(TAPKEE_USE_FIBONACCI_HEAP)
00048     #error "Can't use both priority queue and fibonacci heap at the same time"
00049 #endif
00050 #if !defined(TAPKEE_USE_PRIORITY_QUEUE) && !defined(TAPKEE_USE_FIBONACCI_HEAP)
00051     #define TAPKEE_USE_PRIORITY_QUEUE
00052 #endif
00053 
00054 } // End of namespace tapkee_internal
00055 
00056 }
00057 
00058 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines