libigl v2.5.0
Loading...
Searching...
No Matches
find.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) 2013 Alec Jacobson <alecjacobson@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_FIND_H
9#define IGL_FIND_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>
14#include <vector>
15namespace igl
16{
26 template <
27 typename T,
28 typename DerivedI,
29 typename DerivedJ,
30 typename DerivedV>
32 const Eigen::SparseMatrix<T>& X,
33 Eigen::DenseBase<DerivedI> & I,
34 Eigen::DenseBase<DerivedJ> & J,
35 Eigen::DenseBase<DerivedV> & V);
37 template < typename T>
38 IGL_INLINE std::vector<Eigen::Triplet<T> > find(
39 const Eigen::SparseMatrix<T>& X);
41 template <
42 typename DerivedX,
43 typename DerivedI,
44 typename DerivedJ,
45 typename DerivedV>
47 const Eigen::DenseBase<DerivedX>& X,
48 Eigen::PlainObjectBase<DerivedI> & I,
49 Eigen::PlainObjectBase<DerivedJ> & J,
50 Eigen::PlainObjectBase<DerivedV> & V);
54 template <
55 typename DerivedX,
56 typename DerivedI>
58 const Eigen::DenseBase<DerivedX>& X,
59 Eigen::PlainObjectBase<DerivedI> & I);
61 template <typename T>
63 const Eigen::SparseVector<T>& X,
64 Eigen::Matrix<int,Eigen::Dynamic,1> & I,
65 Eigen::Matrix<T,Eigen::Dynamic,1> & V);
80 template <int RowsAtCompileTime, int MaxRowsAtCompileTime>
81 IGL_INLINE std::vector<int> find(
82 const Eigen::Array<bool,RowsAtCompileTime,1,0,MaxRowsAtCompileTime,1> & M);
83}
84
85#ifndef IGL_STATIC_LIBRARY
86# include "find.cpp"
87#endif
88
89#endif
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void find(const Eigen::SparseMatrix< T > &X, Eigen::DenseBase< DerivedI > &I, Eigen::DenseBase< DerivedJ > &J, Eigen::DenseBase< DerivedV > &V)
Find the non-zero entries and there respective indices in a sparse matrix.