libigl v2.5.0
Loading...
Searching...
No Matches
slice_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_SLICE_CACHED_H
9#define IGL_SLICE_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{
16
45 template <typename TX, typename TY, typename DerivedI>
47 const Eigen::SparseMatrix<TX>& X,
48 const Eigen::Matrix<int,Eigen::Dynamic,1> & R,
49 const Eigen::Matrix<int,Eigen::Dynamic,1> & C,
50 Eigen::MatrixBase<DerivedI>& data,
51 Eigen::SparseMatrix<TY>& Y);
57 template <typename TX, typename TY, typename DerivedI>
59 const Eigen::SparseMatrix<TX>& X,
60 const Eigen::MatrixBase<DerivedI>& data,
61 Eigen::SparseMatrix<TY>& Y);
62}
63
64#ifndef IGL_STATIC_LIBRARY
65# include "slice_cached.cpp"
66#endif
67
68#endif
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void slice_cached(const Eigen::SparseMatrix< TX > &X, const Eigen::MatrixBase< DerivedI > &data, Eigen::SparseMatrix< TY > &Y)
Slice X by cached C,R indices into Y.
void slice_cached_precompute(const Eigen::SparseMatrix< TX > &X, const Eigen::Matrix< int, Eigen::Dynamic, 1 > &R, const Eigen::Matrix< int, Eigen::Dynamic, 1 > &C, Eigen::MatrixBase< DerivedI > &data, Eigen::SparseMatrix< TY > &Y)
Act like the matlab X(row_indices,col_indices) operator, where row_indices, col_indices are non-negat...