libigl v2.5.0
Loading...
Searching...
No Matches
sparse_cached.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2017 Daniele Panozzo <daniele.panozzo@gmail.com>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8#ifndef IGL_SPARSE_CACHED_H
9#define IGL_SPARSE_CACHED_H
10#include "igl_inline.h"
11#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
12#include <Eigen/Dense>
13#include <Eigen/Sparse>
14namespace igl
15{
40 template <typename DerivedI, typename Scalar>
42 const Eigen::MatrixBase<DerivedI> & I,
43 const Eigen::MatrixBase<DerivedI> & J,
44 Eigen::VectorXi& data,
45 Eigen::SparseMatrix<Scalar>& X
46 );
49 template <typename Scalar>
51 const std::vector<Eigen::Triplet<Scalar> >& triplets,
52 Eigen::VectorXi& data,
53 Eigen::SparseMatrix<Scalar>& X
54 );
60 template <typename Scalar>
62 const std::vector<Eigen::Triplet<Scalar> >& triplets,
63 const Eigen::VectorXi& data,
64 Eigen::SparseMatrix<Scalar>& X);
67 template <typename DerivedV, typename Scalar>
69 const Eigen::MatrixBase<DerivedV>& V,
70 const Eigen::VectorXi& data,
71 Eigen::SparseMatrix<Scalar>& X
72 );
73
74}
75
76#ifndef IGL_STATIC_LIBRARY
77# include "sparse_cached.cpp"
78#endif
79
80#endif
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void sparse_cached(const std::vector< Eigen::Triplet< Scalar > > &triplets, const Eigen::VectorXi &data, Eigen::SparseMatrix< Scalar > &X)
Build a sparse matrix from cached list of data and values.
void sparse_cached_precompute(const Eigen::MatrixBase< DerivedI > &I, const Eigen::MatrixBase< DerivedI > &J, Eigen::VectorXi &data, Eigen::SparseMatrix< Scalar > &X)
Build a sparse matrix from list of indices and values (I,J,V), similarly to the sparse function in ma...