MappedSparseMatrix.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_MAPPED_SPARSEMATRIX_H
11 #define EIGEN_MAPPED_SPARSEMATRIX_H
12 
13 namespace Eigen {
14 
25 namespace internal {
26 template<typename _Scalar, int _Flags, typename _StorageIndex>
27 struct traits<MappedSparseMatrix<_Scalar, _Flags, _StorageIndex> > : traits<SparseMatrix<_Scalar, _Flags, _StorageIndex> >
28 {};
29 } // end namespace internal
30 
31 template<typename _Scalar, int _Flags, typename _StorageIndex>
33  : public Map<SparseMatrix<_Scalar, _Flags, _StorageIndex> >
34 {
36 
37  public:
38 
39  typedef typename Base::StorageIndex StorageIndex;
40  typedef typename Base::Scalar Scalar;
41 
42  inline MappedSparseMatrix(Index rows, Index cols, Index nnz, StorageIndex* outerIndexPtr, StorageIndex* innerIndexPtr, Scalar* valuePtr, StorageIndex* innerNonZeroPtr = 0)
43  : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZeroPtr)
44  {}
45 
47  inline ~MappedSparseMatrix() {}
48 };
49 
50 namespace internal {
51 
52 template<typename _Scalar, int _Options, typename _StorageIndex>
53 struct evaluator<MappedSparseMatrix<_Scalar,_Options,_StorageIndex> >
54  : evaluator<SparseCompressedBase<MappedSparseMatrix<_Scalar,_Options,_StorageIndex> > >
55 {
58 
59  evaluator() : Base() {}
60  explicit evaluator(const XprType &mat) : Base(mat) {}
61 };
62 
63 }
64 
65 } // end namespace Eigen
66 
67 #endif // EIGEN_MAPPED_SPARSEMATRIX_H
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::internal::evaluator< MappedSparseMatrix< _Scalar, _Options, _StorageIndex > >::evaluator
evaluator()
Definition: MappedSparseMatrix.h:59
Eigen::internal::evaluator< MappedSparseMatrix< _Scalar, _Options, _StorageIndex > >::evaluator
evaluator(const XprType &mat)
Definition: MappedSparseMatrix.h:60
mat
MatrixXf mat
Definition: Tutorial_AdvancedInitialization_CommaTemporary.cpp:1
Eigen::MappedSparseMatrix::StorageIndex
Base::StorageIndex StorageIndex
Definition: MappedSparseMatrix.h:39
rows
int rows
Definition: Tutorial_commainit_02.cpp:1
Eigen::internal::evaluator< MappedSparseMatrix< _Scalar, _Options, _StorageIndex > >::Base
evaluator< SparseCompressedBase< XprType > > Base
Definition: MappedSparseMatrix.h:57
Eigen::MappedSparseMatrix::Base
Map< SparseMatrix< _Scalar, _Flags, _StorageIndex > > Base
Definition: MappedSparseMatrix.h:35
Eigen::MapBase
Definition: ForwardDeclarations.h:112
Eigen::MappedSparseMatrix::Scalar
Base::Scalar Scalar
Definition: MappedSparseMatrix.h:40
Eigen::internal::evaluator
Definition: CoreEvaluators.h:90
Eigen::Map
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:94
Eigen::MappedSparseMatrix::MappedSparseMatrix
MappedSparseMatrix(Index rows, Index cols, Index nnz, StorageIndex *outerIndexPtr, StorageIndex *innerIndexPtr, Scalar *valuePtr, StorageIndex *innerNonZeroPtr=0)
Definition: MappedSparseMatrix.h:42
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::MappedSparseMatrix::~MappedSparseMatrix
~MappedSparseMatrix()
Definition: MappedSparseMatrix.h:47
internal
Definition: BandTriangularSolver.h:13
cols
int cols
Definition: Tutorial_commainit_02.cpp:1
Eigen::MappedSparseMatrix
Sparse matrix.
Definition: MappedSparseMatrix.h:32
Eigen::internal::evaluator< MappedSparseMatrix< _Scalar, _Options, _StorageIndex > >::XprType
MappedSparseMatrix< _Scalar, _Options, _StorageIndex > XprType
Definition: MappedSparseMatrix.h:56
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:33:32