libigl v2.5.0
Loading...
Searching...
No Matches
slice.h File Reference
#include "igl_inline.h"
#include <Eigen/Sparse>
#include <vector>
#include "slice.cpp"

Go to the source code of this file.

Namespaces

namespace  igl
 

Functions

template<typename TX , typename TY , typename DerivedR , typename DerivedC >
void igl::slice (const Eigen::SparseMatrix< TX > &X, const Eigen::DenseBase< DerivedR > &R, const Eigen::DenseBase< DerivedC > &C, Eigen::SparseMatrix< TY > &Y)
 Act like the matlab X(row_indices,col_indices) operator, where row_indices, col_indices are non-negative integer indices.
 
template<typename MatX , typename DerivedR , typename MatY >
void igl::slice (const MatX &X, const Eigen::DenseBase< DerivedR > &R, const int dim, MatY &Y)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class T >
void igl::slice (const std::vector< T > &X, std::vector< size_t > const &R, std::vector< T > &Y)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename DerivedX , typename DerivedY , typename DerivedR >
void igl::slice (const Eigen::DenseBase< DerivedX > &X, const Eigen::DenseBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedY > &Y)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename DerivedX , typename DerivedR , typename DerivedC , typename DerivedY >
void igl::slice (const Eigen::DenseBase< DerivedX > &X, const Eigen::DenseBase< DerivedR > &R, const Eigen::DenseBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedY > &Y)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename DerivedX , typename DerivedR >
DerivedX igl::slice (const Eigen::DenseBase< DerivedX > &X, const Eigen::DenseBase< DerivedR > &R)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename DerivedX , typename DerivedR >
DerivedX igl::slice (const Eigen::DenseBase< DerivedX > &X, const Eigen::DenseBase< DerivedR > &R, const int dim)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Detailed Description

| igl | Eigen v3.4 | |----------------—0-----—|---------------------------------—| | igl::slice(X,I,J,Y) | Y = X(I,J) | | igl::slice(X,I,1,Y) | Y = X(I,Eigen::all) | | igl::slice(X,J,2,Y) | Y = X(Eigen::all,J) | | igl::slice_into(Z,I,J,X) | X(I,J) = Z | | igl::slice_into(Z,I,1,X) | X(I,Eigen::all) = Z | | igl::slice_into(Z,J,2,X) | X(Eigen::all,J) = Z | | igl::slice_mask(X,M,N,Y) | Y = X(igl::find(M),igl::find(N)) | | not available | X(igl::find(M),igl::find(N)) = Z |

Eigen's slicing supports much more than arrays of indices as input, as well.

Unfortunately, Eigen v3.4 does not support slicing on sparse matrices.