/usr/include/shogun/mathematics/eigen3.h is in libshogun-dev 3.2.0-7.5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96  | /*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * Copyright (C) 2012 Sergey Lisitsyn
 */
#ifndef EIGEN3_H_
#define EIGEN3_H_
#include <shogun/lib/config.h>
#ifdef HAVE_EIGEN3
	//#define EIGEN_RUNTIME_NO_MALLOC
	#include <Eigen/Eigen>
	#include <Eigen/Dense>
	#if EIGEN_VERSION_AT_LEAST(3,0,93)
		#include <Eigen/Sparse>
	#else
		#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
		#include <unsupported/Eigen/SparseExtra>
		#ifndef DOXYGEN_SHOULD_SKIP_THIS
		// Triplet definition for Eigen3 backword compatibility
		namespace Eigen {
		template <typename T> struct Triplet
		{
			Triplet(index_t colIndex, index_t rowIndex, T valueT) :
			ecol(colIndex), erow(rowIndex), evalue(valueT)
			{
			}
			index_t col() const { return ecol; };
			index_t row() const { return erow; };
			T value() const { return evalue; };
			index_t ecol;
			index_t erow;
			T evalue;
		};
		// SimplicialLLT definition for Eigen3 backword compatibility
		template <typename T> class SimplicialLLT
		: public SimplicialCholesky<T,Lower>
		{
		public:
			SimplicialLLT()
			{
				SimplicialCholesky<T>::setMode(SimplicialCholeskyLLt);
			}
			inline const T matrixL()
			{
				return SimplicialCholesky<T>::m_matrix;
			}
			inline const T matrixU()
			{
				return SimplicialCholesky<T>::m_matrix.transpose();
			}
		};
		}
		#endif //DOXYGEN_SHOULD_SKIP_THIS
	#endif	//EIGEN_VERSION_AT_LEAST(3,0,93)
#if ((EIGEN_WORLD_VERSION == 3) && (EIGEN_MAJOR_VERSION == 2) && \
	((EIGEN_MINOR_VERSION == 91) || (EIGEN_MINOR_VERSION == 92)))
	// Regression has been introduced to eigen develop (3.3alpha1+):
	// http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1229
	// until this is not fixed we need to copy the matrix and calculate the log
	#define EIGEN_WITH_LOG_BUG_1229 1
#endif
namespace shogun
{
template<class T> class SGSparseMatrix;
/** @brief This class contains some utilities for Eigen3 Sparse Matrix
 * integration with shogun. Currently it provides a method for
 * converting SGSparseMatrix to Eigen3 SparseMatrix.
 */
template<typename T> class EigenSparseUtil
{
	public:
	/** Converts a SGSparseMatrix to Eigen3 SparseMatrix by copying
	 * its non-zero co-efficients to a eigen3 SparseMatrix.
	 *
	 * @param sg_matrix the SGSparseMatrix
	 * @return Eigen3 SparseMatrix representation of sg_matrix
	 */
	static Eigen::SparseMatrix<T> toEigenSparse(SGSparseMatrix<T> sg_matrix);
};
}
#endif	//HAVE_EIGEN3
#endif
 |