libigl v2.5.0
Loading...
Searching...
No Matches
sort.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_SORT_H
9#define IGL_SORT_H
10#include "igl_inline.h"
11
12#include <vector>
13#include <Eigen/Core>
14namespace igl
15{
16
30 template <typename DerivedX, typename DerivedY, typename DerivedIX>
32 const Eigen::DenseBase<DerivedX>& X,
33 const int dim,
34 const bool ascending,
35 Eigen::PlainObjectBase<DerivedY>& Y,
36 Eigen::PlainObjectBase<DerivedIX>& IX);
38 template <typename DerivedX, typename DerivedY>
40 const Eigen::DenseBase<DerivedX>& X,
41 const int dim,
42 const bool ascending,
43 Eigen::PlainObjectBase<DerivedY>& Y);
48 template <typename DerivedX, typename DerivedY, typename DerivedIX>
50 const Eigen::DenseBase<DerivedX>& X,
51 const int dim,
52 const bool ascending,
53 Eigen::PlainObjectBase<DerivedY>& Y,
54 Eigen::PlainObjectBase<DerivedIX>& IX);
57 template <typename DerivedX, typename DerivedY, typename DerivedIX>
59 const Eigen::DenseBase<DerivedX>& X,
60 const int dim,
61 const bool ascending,
62 Eigen::PlainObjectBase<DerivedY>& Y,
63 Eigen::PlainObjectBase<DerivedIX>& IX);
66 template <typename DerivedX, typename DerivedY, typename DerivedIX>
68 const Eigen::DenseBase<DerivedX>& X,
69 const int dim,
70 const bool ascending,
71 Eigen::PlainObjectBase<DerivedY>& Y,
72 Eigen::PlainObjectBase<DerivedIX>& IX);
79 template <class T>
81 const std::vector<T> &unsorted,
82 const bool ascending,
83 std::vector<T> &sorted,
84 std::vector<size_t> &index_map);
85}
86
87#ifndef IGL_STATIC_LIBRARY
88# include "sort.cpp"
89#endif
90
91#endif
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void sort_new(const Eigen::DenseBase< DerivedX > &X, const int dim, const bool ascending, Eigen::PlainObjectBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedIX > &IX)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void sort2(const Eigen::DenseBase< DerivedX > &X, const int dim, const bool ascending, Eigen::PlainObjectBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedIX > &IX)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void sort3(const Eigen::DenseBase< DerivedX > &X, const int dim, const bool ascending, Eigen::PlainObjectBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedIX > &IX)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void sort(const Eigen::DenseBase< DerivedX > &X, const int dim, const bool ascending, Eigen::PlainObjectBase< DerivedY > &Y, Eigen::PlainObjectBase< DerivedIX > &IX)
Sort the elements of a matrix X along a given dimension like matlabs sort function.