|
@@ -9,12 +9,11 @@
|
|
#define IGL_SLICE_H
|
|
#define IGL_SLICE_H
|
|
#include "igl_inline.h"
|
|
#include "igl_inline.h"
|
|
|
|
|
|
-#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
|
|
|
|
#include <Eigen/Sparse>
|
|
#include <Eigen/Sparse>
|
|
-
|
|
|
|
namespace igl
|
|
namespace igl
|
|
{
|
|
{
|
|
- // Act like the matlab X(row_indices,col_indices) operator
|
|
|
|
|
|
+ // Act like the matlab X(row_indices,col_indices) operator, where
|
|
|
|
+ // row_indices, col_indices are non-negative integer indices.
|
|
//
|
|
//
|
|
// Inputs:
|
|
// Inputs:
|
|
// X m by n matrix
|
|
// X m by n matrix
|
|
@@ -22,6 +21,8 @@ namespace igl
|
|
// C list of column indices
|
|
// C list of column indices
|
|
// Output:
|
|
// Output:
|
|
// Y #R by #C matrix
|
|
// Y #R by #C matrix
|
|
|
|
+ //
|
|
|
|
+ // See also: slice_mask
|
|
template <typename T>
|
|
template <typename T>
|
|
IGL_INLINE void slice(
|
|
IGL_INLINE void slice(
|
|
const Eigen::SparseMatrix<T>& X,
|
|
const Eigen::SparseMatrix<T>& X,
|
|
@@ -46,18 +47,6 @@ namespace igl
|
|
const Eigen::Matrix<int,Eigen::Dynamic,1> & R,
|
|
const Eigen::Matrix<int,Eigen::Dynamic,1> & R,
|
|
const Eigen::Matrix<int,Eigen::Dynamic,1> & C,
|
|
const Eigen::Matrix<int,Eigen::Dynamic,1> & C,
|
|
Eigen::PlainObjectBase<DerivedX> & Y);
|
|
Eigen::PlainObjectBase<DerivedX> & Y);
|
|
- template <typename DerivedX>
|
|
|
|
- IGL_INLINE void slice_mask(
|
|
|
|
- const Eigen::PlainObjectBase<DerivedX> & X,
|
|
|
|
- const Eigen::Array<bool,Eigen::Dynamic,1> & R,
|
|
|
|
- const Eigen::Array<bool,Eigen::Dynamic,1> & C,
|
|
|
|
- Eigen::PlainObjectBase<DerivedX> & Y);
|
|
|
|
- template <typename DerivedX>
|
|
|
|
- IGL_INLINE void slice_mask(
|
|
|
|
- const Eigen::PlainObjectBase<DerivedX> & X,
|
|
|
|
- const Eigen::Array<bool,Eigen::Dynamic,1> & R,
|
|
|
|
- const int dim,
|
|
|
|
- Eigen::PlainObjectBase<DerivedX> & Y);
|
|
|
|
|
|
|
|
template <typename DerivedX>
|
|
template <typename DerivedX>
|
|
IGL_INLINE void slice(
|
|
IGL_INLINE void slice(
|
|
@@ -74,16 +63,7 @@ namespace igl
|
|
const Eigen::PlainObjectBase<DerivedX>& X,
|
|
const Eigen::PlainObjectBase<DerivedX>& X,
|
|
const Eigen::Matrix<int,Eigen::Dynamic,1> & R,
|
|
const Eigen::Matrix<int,Eigen::Dynamic,1> & R,
|
|
const int dim);
|
|
const int dim);
|
|
- template <typename DerivedX>
|
|
|
|
- IGL_INLINE Eigen::PlainObjectBase<DerivedX> slice_mask(
|
|
|
|
- const Eigen::PlainObjectBase<DerivedX> & X,
|
|
|
|
- const Eigen::Array<bool,Eigen::Dynamic,1> & R,
|
|
|
|
- const Eigen::Array<bool,Eigen::Dynamic,1> & C);
|
|
|
|
- template <typename DerivedX>
|
|
|
|
- IGL_INLINE Eigen::PlainObjectBase<DerivedX> slice_mask(
|
|
|
|
- const Eigen::PlainObjectBase<DerivedX> & X,
|
|
|
|
- const Eigen::Array<bool,Eigen::Dynamic,1> & R,
|
|
|
|
- const int dim);
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
#ifndef IGL_STATIC_LIBRARY
|
|
#ifndef IGL_STATIC_LIBRARY
|