|
|
@@ -1,9 +1,9 @@
|
|
|
// This file is part of libigl, a simple c++ geometry processing library.
|
|
|
-//
|
|
|
+//
|
|
|
// Copyright (C) 2013 Alec Jacobson <[email protected]>
|
|
|
//
|
|
|
-// This Source Code Form is subject to the terms of the Mozilla Public License
|
|
|
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
|
|
+// This Source Code Form is subject to the terms of the Mozilla Public License
|
|
|
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
|
|
// obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
#ifndef IGL_SLICE_H
|
|
|
#define IGL_SLICE_H
|
|
|
@@ -14,7 +14,7 @@ namespace igl
|
|
|
{
|
|
|
// Act like the matlab X(row_indices,col_indices) operator, where
|
|
|
// row_indices, col_indices are non-negative integer indices.
|
|
|
- //
|
|
|
+ //
|
|
|
// Inputs:
|
|
|
// X m by n matrix
|
|
|
// R list of row indices
|
|
|
@@ -24,7 +24,7 @@ namespace igl
|
|
|
//
|
|
|
// See also: slice_mask
|
|
|
template <
|
|
|
- typename TX,
|
|
|
+ typename TX,
|
|
|
typename TY,
|
|
|
typename DerivedR,
|
|
|
typename DerivedC>
|
|
|
@@ -49,7 +49,7 @@ namespace igl
|
|
|
const int dim,
|
|
|
MatY& Y);
|
|
|
template <
|
|
|
- typename DerivedX,
|
|
|
+ typename DerivedX,
|
|
|
typename DerivedR,
|
|
|
typename DerivedC,
|
|
|
typename DerivedY>
|
|
|
@@ -59,6 +59,17 @@ namespace igl
|
|
|
const Eigen::MatrixBase<DerivedC> & C,
|
|
|
Eigen::PlainObjectBase<DerivedY> & Y);
|
|
|
|
|
|
+ template <
|
|
|
+ typename DerivedX,
|
|
|
+ typename DerivedR,
|
|
|
+ typename DerivedC,
|
|
|
+ typename DerivedY>
|
|
|
+IGL_INLINE void slice(
|
|
|
+ const Eigen::ArrayBase<DerivedX> &X,
|
|
|
+ const Eigen::MatrixBase<DerivedR> &R,
|
|
|
+ const Eigen::MatrixBase<DerivedC> &C,
|
|
|
+ Eigen::PlainObjectBase<DerivedY> &Y);
|
|
|
+
|
|
|
template <typename DerivedX, typename DerivedY, typename DerivedR>
|
|
|
IGL_INLINE void slice(
|
|
|
const Eigen::MatrixBase<DerivedX> & X,
|